720
6.
7.
9.There are actually only two classes in the proposed list in Exercise 8 in addition to
the file: “Participant” and “Time.” All of the other classes listed in Exercise 8 can be
represented as primitive types. However, there does need to be a “User Interface,”
which will be represented by the driver.
Class Name: MilkProduced Superclass: Cow Subclasses:
Responsibilities Collaborations
Create MilkProduced (name, ID number,
birth date, recent calving date)
None
Set milk amount (quantity)
Average is None
return double
Total output is None
return double
Set total to zero None
Class Name: Cow Superclass: Subclasses:
Responsibilities Collaborations
Create Cow (name, ID number, birth date,
recent calving date)
None
Know name None
return Name
Know ID number None
return String
Know birth date None
return Date
Know calving date None
return Date
T
E
A
M
F
L
Y
Team-Fly®