Object Oriented Frameworks


In class, I sketched the creation of a tiny calculator framework.  The ideas I covered in class to apply to create a framework with a few classes are the same for many, so be grateful that the application itself is small. You'll have plenty of problems to address.  Frankly, there is no way that anyone could understand Frameworks without trying an example or two. So here goes!

Personally I had a lot of fun doing this assignment.  I hope you take it as a fun challenge, too.

Here is the Netbeans zipfile that contains the Big Integer (BI), Double (D), and Application packages.  Your goal is to take the BI and D packages, and to create three packages: (the "stuff" common to BI and D) the Framework, BIPlugIn (the Framework plugin to implement the BI calculator), and DPlugIn (the Framework plugin to implement the D calculator).

You may work separately or in groups of 2 on this assignment (as you have done in previous assignments).

Part 1

Unzip and study the original applications (same link as above).  See what is common among both, see what is different.  The common part will get moved into the framework, and the application-specific part will be moved into the plug-in. I wish I had some simple regression tests, but this has proven harder or uglier than I would like.  What I did was to run each of the calculators, which have similar GUIs.  I know the BI is working if I enter a simple expression (40+5) and I get the right answer with no decimals (e.g., 45).  I know the D is working when I enter the same expression and get a slightly different answer (45.0) -- I see the decimal.  If any of you know how to automate this test, please let me know!


Part 2

Here is the shell of your answer -- this gives little or nothing away, but use it or let it guide you.  

Your Assignment

Follow the lecture notes that I posted.

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. 

No late assignments/submissions will be accepted.