P4: Feature Refactoring

Due: TBD

In class we used class diagrams to illustrate how to partition an application into features.  Now it is your turn to try your hand at feature-refactoring a small code base. Here is a zip file of a Netbeans project that implements the following design:

Users can create containers (implemented by a doubly-linked list), can insert and delete nodes from it, and iterate of the contents of a container.  (While iterating, it is possible to delete the current node referenced by the iterator, and be able to continue iterating from there without problems).


Part 1  Decompose Diagram

Decompose this diagram into features.  Say what each feature is/does, and the order in which the features are composed.  Submit a collaboration diagram showing the decomposition and the feature composition order.  That is, your answer should be a diagram of the form:

Which says the composition order is Feature2Feature1Base.  You may need the RegTest jar file to run the original test files.  It can be found here.


Part 2 Decompose Code Base

Next your task is to actually decompose the code base along the lines of your answer in Part 1.  The zip file was given to you above.  You may discover that you initial partitioning may not exactly correspond to what you end up with. Adjust your answer in Part 1 so that it matches that of Part 2.  (Doing Part 1 first gives you an overview of what you need to do, which is better than simply hacking to begin with).

Here is some advice to follow:

You are to submit a netbeans project with your decomposition. Please note that the original zip file had a test that you should reuse -- you won't have to modify the test procedures at all.  But these tests should run correctly after you have partitioned.


Part 3 Try Different Compositions

Now that you have pulled this application apart, do the following:

  1. show at least one pair of commutative features

  2. show a composition of NOT all features that works and makes sense

To accomplish the above, you will likely need to comment out some features by hand and rebuild the inheritance chain.  Document your answers for both 1 and 2.


Submission

Submit a PDF file that contains your answers (and any necessary explanations) for parts 1 and 2.  Non-PDF submissions will be returned. There should be a bash run script that I can run to test your code on parts 2 and 3.