Saint Louis University |
Computer Science 150
|
Dept. of Math & Computer Science |
Topic: Object-Oriented Design
Related Reading: Ch. 1 of Goldwasser/Letscher supplement
Due:
1:10pm, Wednesday 7 September 2005
Please make sure you adhere to the policies on academic integrity.
Write down the steps for an algorithm for a common everyday task. (The algorithm should have at least 7-10 steps.)
Consider the design of a Calculator representing a basic calculator.
Consider the design of a Television representing a typical television.
In modeling buying 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.
Please describe a sequence of such interactions that takes place in the process of ordering and buying a sandwich (include at least six distinct interactions). For each of these interactions, describe clearly
Think of some objects you see everyday that form a hierarchy. Diagram this hierarchy, indicating what attributes or behaviors a class has that are not inherited from a parent class. (The hierarchy should have at least 3 levels and 10 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)