Due: Monday February 2, 2004 at the beginning of class
- Follow the general homework directions.
- Make sure you cite all your references and contacts.
- Read Chapters 4 and 5.
- (2 points) Draw a use case diagram for a ticket distributor for a train system. The system includes two actors: a traveler, who purchases different types of tickets, and a central computer system, which maintains a reference database for the tariff. Use cases should include: BuyOneWayTicket, BuyWeeklyCard, BuyMonthlyCard, and UpdateTariff. Also include the following exceptional cases: Time-Out (i.e., traveler took too long to insert the right amount), TransactionAborted (i.e., traveler selected the cancel button without completing the transaction), DistributorOutOfChange, and DistributorOutOfPaper.
- (2 points) Draw a class diagram representing a book defined by the following statement: A book is composed of a number of parts, which in turn are composed of a number of chapters. Chapters are composed of sections. Focus only on classes and relationships.
- (2 points) Add multiplicity to the class diagrams you produced in Exercise 2.
- (2 points) Consider the process of ordering a pizza over the phone. Draw an activity diagram representing each step of the process, from the moment you pick up the phone to the point where you start eating the pizza. Do not represent any exceptions. Include activities that others need to perform.
- (2 points) Add exception handling to the activity diagram you developed in Exercise 4. Consider at least three exceptions (e.g., delivery person wrote down wrong address, delivery person brings wrong pizza, store out of anchovies).