1.7. Exercises

1:Which of the following items belong in the same inheritance tree?
milk soda tea coffee sugar cream bread water 

What should the general class be? (Create a new one.)

2:What is the rule (generalization) for forming the plural of a noun in English? Give two examples. Give two examples of exceptions to this rule.
3:The platypus is an egg-laying mammal. If you were going to create an inheritance hierarchy that included mammals and reptiles, how would you handle the platypus?
4:An Airline Reservation System must deal with Passengers, Flights, Seats, Airports, Airplanes, and Itineraries. Study these potential classes and how they relate. Create an object model with appropriate associations.
5:Create two scenarios for the Library system ...

Get Navigating C++ and Object-Oriented Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.