Lab 4

CS203
Fall 2016

  • Design a software system for managing a car rental agency.
  • Determine the necessary classes from the problem description.
  • Use CRC cards to determine the responsibilities and collaborations.
  • Create a class diagram showing relationships and cardinalities.
  • Create sequence diagrams for a set of use cases.
  • This project is meant to be done in pairs.
  • Please put both names on each paper submission.
  • All work for this project is to be submitted in hard copy.
  • Given that most of the work is in diagram form, hand written work may be the easiest to produce.

Consider a software system for a car rental agency. Customers should be able to reserve a car, pick it up, return it, and pay for it. The rental agency keeps information about the customers (name, address, etc.), the cars (type, price, availability, etc.), and the rentals ( customer ID, car ID, date-out, date-returned, amount payed, or payment due, etc.). Note: This is a description supplied by the stakeholder and may not be complete. Additional assumptions may be required.

  • Create a class diagram showing the classes, their attributes and methods, and the relationships between the classes, including the cardinalities (one to many, etc.).
  • If the class diagram requires too much detail, show the attributes and methods for the classes on a separate page.
  • You may want to use CRC cards to start the process.
  • Remember that a good design distributes the responsibilities among the various classes. One “uber” class that does most of the work is generally not a good idea.
  • Do not clutter your designs with extra capabilities (we call that “blue sky thinking”). Just design the system to cover the basic use cases. A good design will allow us to evolve and extend the program later.
  • Create sequence diagrams for the following use cases:
  1. A customer chooses a car and reserves it.
  2. A customer picks up a car that has been reserved and supplies a credit card number.
  3. A customer returns a car and pays for it.
  • Have your sequence diagrams show the return arrows as well as the forward arrows (method invocations).
  1. It is normal for your classes and collaborations to change as you progress. The sequence diagrams may reveal that you should alter your class diagram. This is an iterative process.
  2. If this project takes more than one session, we will allocate additional time. Good work is more important than quick work.
  3. Good collaboration between developers is generally noisy collaboration! Be willing to make your case!