Composite Framework

changes in RED

Given the below example of a composite pattern: These classes and interfaces are in package P.  Create an almost identical package DP where the domain of instances that can be assigned to interface I are decorated instances of the domain of P.  (A decorator DL decorates L instances – so whenever an L object is created a DL-decorated L object is returned.  Similarly, a decorator DM decorates M instances – so whenever an M object is created, a DM-decorated M object is returned).  The ultimate goal is to write an application where packages DP and P can be easily swapped.  Now create a framework F that has P and DP as plug-ins so that effectively packages P and DP are easy to swap.

Here is the shell of your program. (The regression test and the Correct answers have been updated)  I've built package P, created an empty package P for you to fill in.  There is also an program, so that you can see how it works.  I've also provided a shell of, where I have created the factory classes needed, plus a test file, which tests the, and the two plugins, when you get it finished.

Your task is to finish the plugin DP, its use in, and ensure that the provided regression tests run correctly.

What to Submit

All of the below in a zip file (including your Netbeans or Eclipse Project). The zip file must unzip into <yourName>/<YourFilesAndDirectories>.
  1. Your program needs to run correctly on Linux machines, even though you may have developed them on Macs and Windoze.  The TA will grade your program running on Linux.

  2. A short description that the Grader needs to know to run your program, other than the above.

  3. Show that your program runs the regression test correctly.

  4. A short writeup explaining any additional tests that you have added to your program to verify that it works.

  5. A PDF file (in the required format) that the Grader should read to provide any information that is not obvious.  The contents of the PDF file can be minimal.

A critical part of any design is clarity and understandability.   Hence, you will be graded on the clarity of your project and its ability to work correctly.  Sloppy code, documentation, or anything that makes grading or understanding your program difficult will cost you points.  Beware, some of these "beauty" points are subjective. 

Remember: No late assignments/submissions will be accepted.