Java Reference
In-Depth Information
Programming Projects
Visit www.myprogramminglab.com to complete many of these Programming
Projects online and get instant feedback.
PP 9.1
Design and implement a class called MonetaryCoin that is
derived from the Coin class presented in Chapter 5. Store an
integer in the MonetaryCoin that represents its value and add
a method that returns its value. Create a main driver class
to instantiate and compute the sum of several MonetaryCoin
objects. Demonstrate that a monetary coin inherits its parent's
ability to be flipped.
PP 9.2
Design and implement a set of classes that define the employees
of a hospital: doctor, nurse, administrator, surgeon, receptionist,
janitor, and so on. Include methods in each class that are named
according to the services provided by that person and that print
an appropriate message. Create a main driver class to instantiate
and exercise several of the classes.
PP 9.3
Design and implement a set of classes that define various types
of reading material: books, novels, magazines, technical jour-
nals, textbooks, and so on. Include data values that describe
various attributes of the material, such as the number of pages
and the names of the primary characters. Include methods
that are named appropriately for each class and that print an
appropriate message. Create a main driver class to instantiate
and exercise several of the classes.
PP 9.4
Design and implement a set of classes that keeps track of
various sports statistics. Have each low-level class represent
a specific sport. Tailor the services of the classes to the sport
in question, and move common attributes to the higher-level
classes as appropriate. Create a main driver class to instantiate
and exercise several of the classes.
PP 9.5
Design and implement a set of classes that keeps track of demo-
graphic information about a set of people, such as age, national-
ity, occupation, income, and so on. Design each class to focus on
a particular aspect of data collection. Create a main driver class
to instantiate and exercise several of the classes.
PP 9.6
Modify the Rebound program from this chapter such that when
the mouse button is clicked the animation stops, and when it is
clicked again the animation resumes.
Search WWH ::




Custom Search