Beginning Java Objects: Chapter 2 Abstraction and Modeling
Exercises
1. Sketch a class hierarchy that relates all of the following classes in a reasonable manner:
Apple
Banana
Beef
Beverage
Cheese
Consumable
Dairy Product
Food
Fruit
Green Bean
Meat
Milk
Pork
Spinach
Vegetable
Note any challenges you faced in doing so.
2. What aspects of a television set would be important to abstract from the perspective of:
- A consumer wishing to buy one?
- An engineer responsible for designing one?
- A retailer who sells them?
- The manufacturer?
3. Select a problem area that you would like to model from an object-oriented perspective.
Ideally, this will be a problem that you are actually going to be working on at your place of
employment, or that you have a keen interest in. Assume that you are going to write a
program to automate some aspect of this problem area; write a one page overview of the
requirements for this program, patterned after the Student Registration System case study.
Make certain that your first paragraph summarizes the intent of the system, as the first
paragraph in the SRS case study does. Also, emphasize the functional requirements — that is,
those which a non technical end user might state as to how the system should behave and
avoid stating technical requirements — for example, "This system must run on a Windows NT
platform, and must use the TCP/IP protocol to ...".
4. Read the case study for a Conference Room Reservation System (CRRS) in Appendix B. In
your opinion, how effective is this case study as an abstraction: are there details that you think
could have been omitted, and/or missing details that you think would have been important to
include? If you had an opportunity to interview the intended users of the CRRS, what
additional questions might you ask them to better refine this abstraction?
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.
|