BuiltWithNOF
Rollodex

Your assignment is to first understand well the 2 code examples in the classes page for April 15.  You will then make your own data that will have a hierarchy. For example, if you wanted to keep track of Baseball players, all players might have a name and age, but pitchers would have era and wins, while position players might have a batting average and home runs.   Another example,  If you were keeping track of your friends, all friends (abstract class) would have a name, address, and phone. Your relatives might have a relation (uncle, sister...) while your work friends might have where you met and wife’s name..

You will then make at least one abstract class and at least 2 subclasses of this abstract class. You will provide get and set methods to access private data.  Then you will make a DRIVER class that will make arrays of each of your subclasses. Your interface will allow you to enter and print your information. You will also provide several buttons to do some processing of your data

Additions: First, try to develop a bigger data hierarchy.. maybe 3 levels.  Add the ability to edit your data. Make more and more difficult process.  Next time we will talk about how to make a GUI in an application. You can then save and load your data.  Also try to add swing classes to your program.

 

[Home] [Syllabus] [Sessions]