Example-Based Technique

TERMINOLOGY:

DESCRIPTION:

  1. Based on the requirements, define the functionality to be sought and find a suitable example.
    INPUTS: Functionality of application, set of examples
    OUTPUT: Example containing functionality and set of use cases.
    1. Run the examples provided. Select for further examination the example that contains the maximum coverage of the functionality sought. If there isn't one example that contains the entire range of functionality, find the largest set of functionality that is covered by one example, and concentrate on implementing just that set for now. Record the example used and your rationale for selecting it.
    2. Compare the original object model to the example. Which classes from your original object model seem to have a corresponding object in the example? (Run the example and explore its range of functionality to determine what components are likely to be objects: What window components exist? What components respond to user events? Build use cases to illustrate the system functionality you discover.)
    3. Use your original dynamic models for the classes identified in b to determine which operations are supported by the objects in the example. Are there operations in your original dynamic models which are missing from the example?
  2. Execute and study the example selected, with respect to the functionality being sought. Build an object model of the example, selecting appropriate features.
    INPUTS: Example and set of use cases, original object model
    OUTPUT: Event traces and object model for example
    1. Based on the increments, find the set of use cases for the functionality in this example which is relevant to the OMT system. For each use case, build an event trace that shows how the classes you identified above interact.
    2. Run the example. For each event trace:
      1. Find an object onscreen that participates in the event trace. Remember that objects in ET++ can be user-created objects, window components, etc.
      2. "Inspect-click" on the object you have identified. This brings up a list of all objects existing at that point on the screen. Select the topmost object listed that handles the functionality, and edit its source. Now we have reached the code for a class responsible for handling a portion of the functionality sought.
      3. Use the class definition and implementation to discover how this class handles the events you have identified in this event trace. Search through the code for this class to discover the attributes which are modified and the methods which are called; if you cannot locate a class operation which handles an event, remember to use the hierarchy browser to investigate the code for the ancestor classes as well. Does the implementation require objects which you have not identified in your original object model? Update the event trace correspondingly if so.
      4. Using the information discovered, incorporate this class into the object model of this example. Record the attributes and operations you encounter as you trace through the code. Record relationships between classes.
      5. While there are still classes in this event trace that haven't been fully documented, select another class from the event trace. Access its code either through "inspect-clicking" or directly through the code browser. Return to step iii.
      6. Once all of the relevant classes in all the event traces for all use cases are in the object model, go on to step 3.
  3. Add new needed features.
    INPUTS: Event traces and object model for example, original object model
    OUTPUT: List of classes from example to add to application
    1. Compare the object model for the example with your original object model. Determine which classes from the example will have to be added to your original model. Determine which attributes and operations are missing from your original object model that will have to be added to the class definitions.
  4. Instantiate solution.
    INPUTS: List of classes from example, application
    OUTPUT: New version of application
    1. Add new classes to your program. Modify the class definitions and implementation from the example to fit your application.
    2. Add new attributes and operations to existing classes. Find the code corresponding to the initialization of the attributes and the necessary operations; modify it as appropriate to fit your application. Write the code which is necessary to extend the functionality for your application or to integrate the new functionality with the existing system.
    3. Return to step 1 to implement the remaining functionality.

    The following must be turned in: 1. List of examples chosen and rationales for their selection. 2. Use cases, event traces and object models for the relevant functionality of each example. The order in which you created the event traces must be indicated.

Web Accessibility