Lab 12

The goal is to modify the Graph Editor framework to use reflection to load plugins.  The framework should provide the main method and plugins should not have to extend the Graph class.

Activity

  1. Download the source for the Graph Editor from Horstmann's web page
    Unzip the archive.  Look in the folder "Ch8" for "graphed" folder.
  2. Compile the application and run it to be sure you have built it correctly.
  3. Explore the features to understand its capabilities.
  4. Study the classes that comprise the application.  In particular, determine how the application currently loads the plugin classes (nodes and edges).
  5. Write down three alternative mechanisms for how the framework might obtain the names of the node and edge classes provided by the plugin.  For example, you might read the names from the command line in a manner similar to GridGameLoader. For each alternative, briefly list the pros and cons.  Decide which mechanism you will implement and justify your choice. Show your design to the instructor before proceeding.
  6. Determine how the high level design will need to be modified.  Draw a UML diagram that shows the components from Figure 8 in the text that you will be changing.  Include the names of any classes and methods that you will be deleting, modifying, or adding. 
    Show your design to the instructor before proceeding.
  7. Once approved by the instructor, implement your design.

Submission

Demonstrate your completed program to the instructor.
Create a zip file containing all the source code files AND the written tradeoff analysis from step 5. Name it Lab12.zip.
Submit the zip file via handin to the "Lab12" folder.