Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
May 7, 2009
See the website for a description of the problem. Note that these diagrams are suggested solutions. There are may valid ways to model most problems. Marks will be given for a reasonable model provided that the UML diagrams are correct. Fig1 shows a use case model for the e-car rental system. Note the use of the << extends >> and << includes >> relationships in the use case diagram. There is a general use case called Return a Vehicle. When the vehicle is returned by the user the functionality provided by the billing use case is included is also executed. Note that a customer may return a vehicle earlier or later than agreed. The use case diagram shows that in the event of an Early Return or a Late Return, the basic Return a Vehicle use case is invoked. However its functionality is extended to allow a ne to be charged or perhaps a discount to be applied on early return. A sequence diagram is shown in Fig.2. This sequence diagram matches the reserve a Vehicle Use Case specied in the LabWork handout(available on the course website). A class diagram for the E-Car Rental system is shown in Fig.3. Note the reserves association between the Customer and Vehicle classes, i.e a Customer reserves a Vehicle. This is an important or interesting relationship and we can model this relationship using an association class. This association class is the Reservation class which, as shown in Fig.3 contains zero or more insurance or protection plan products. Note the dashed line between the Reservation class and the reserves association connecting the Customer and Vehicle classes. the dashed line indicates that the Reservation class provides the functionality required when a customer makes a vehicle reservation.
Reserve a vehicle
Cancel a reservation
Billing
Pick up a vehicle customer <<include>> View car catalogue Add new car
Administrator
Early return
Late Return
Mechanic
Customer:
Depot:
Customer Profiles:
Vehicle Inventory:
Vehicle:
Protection Products:
Reservation:
make a reservation
prompt for ID
prompt for location provide location details retrieve vehicles for date/ time retrieve vehicles match criteria
Vehicle Inventory
1..*
reserves
1..*
Depot streetAddress : geographicState : location : populate() 0..* Protection Product dailyCost : liabilityLimits : newOperation()