2.6. Exercises

  1. Sketch an abstraction hierarchy that relates all 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 want to model from an object-oriented perspective. Ideally, this will be a problem that you're actually going to be working on at your place of employment or that you have a keen interest in. Assume that you're 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 that a nontechnical 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 Vista platform, and must use the TCP/IP protocol to ...").

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset