Saint Louis University |
Computer Science 150
|
Dept. of Math & Computer Science |
Topic: Object-Oriented Design
Related Reading: Ch. 1 of Goldwasser/Letscher supplement
Due:
a`vF^`vFc``l-Fhp6#,$-F[yF\a`lF`p7%-F
Please make sure you adhere to the policies on academic integrity.
Practice 1-11 on page 35
Though we suggest that the university registration system include a Course class, we never discussed any details of its design. Please develop an initial design.
Practice 1-20 on page 36
Add a class Staff to the hierarchy under the Person class.
Describe an initial design for a SodaMachine class
In modeling the purchase of a sandwich at Au Bon Pain in the Busch Student Center we might use three classes: Cashier, Customer and SandwichMaker. There are a variety of interactions that occur between objects in this model. Each of these interactions should involve a pair of objects, with one being the initiator of the interaction. There also may be additional information sent in one direction or another as part of that interaction.
Give a sequence diagram which represents a series of interactions which take place in the process of ordering and buying a sandwich. Your diagram should include at least six distinct interactions. For each, your diagram should clearly demonstrate
Exercise 1-21 on page 36.
Consider the high-level design of two classes, BasicClock, representing a basic digital clock, and AlarmClock, representing a clock with an alarm.
Describe the high-level design of both of these classes using inheritance to model an AlarmClock based upon a BasicClock. List the attributes and behaviors that you would include in each class.
Think of some objects you see everyday that form a hierarchy. You do not need to detail the precise members of each class, only the relationships among classes. Your hierarchy should have at least 3 levels and include 10 or more overall classes.
The Au Bon Pain problem above was a real-world scenario which involved the interaction between two or more objects.
Model some other real-world scenario, describing your model in
similar fashion as with that earlier problem.
(please pick a scenario that does not involve the purchase of something)