Object Oriented Frameworks
class, I sketched the creation of a calculator framework. That
this is a tiny application is of no relevance; the
ideas you need 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)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.
Part 1Unzip 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 2Here is the shell of your answer -- this gives little or nothing away, but use it or let it guide you.
the lecture notes that I posted.
- Do a good, clean (meaning professional) job. No sloppy code. Elegance and clarity is premium in this assignment.
strongly suggest that you follow the steps outlined in the lecture notes, one
"simple" change/evolution at a time. Save your work before
starting a new step and make sure before you start the new step your
current result is correct. The way you can really waste time and
screw up is if you do too many things at once, discover you made an error, and spend an hour trying to figure out where it is.
are to submit your Netbeans project with the Framework, DPlugIn, BIPlugIn, and Application packages.
In the PDF file, explain anything that is non-obvious.
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.