D_UC3 - luist18/feup-aeda-proj GitHub Wiki
Use case 3: Rent Vehicle
Rational
Main flow | Question: what class ... | Answer | Justification |
---|---|---|---|
1. The user chooses to rent a vehicle. | ... interacts with the user? | RentVehicleUI | Pure Fabrication. |
... coordinates the use case? | RentVehicleController | Controller. | |
2. The system shows the information of the vehicle (i.e. specs, price and available schedule). | ... knows the vehicle's information? | Offer | Information Expert: the Offer knows all the information of the vehicle |
... knows the vehicle specs? | Vehicle | Information Expert: Vehicle knows its own information | |
3. The system requests a schedule, i.e., start and finish time. | |||
4. The renter inserts the schedule. | ... validates the schedule internally? | Schedule | Information Expert. |
... validates the schedule globally? | Offer | Information Expert: The Offer knows the available schedules. | |
... creates the rental? | RentalManager | Creator: RentalManager aggregates all Rentals. | |
... calculates the price? | Rental | Information Expert: Rentals knows all the important information to calculate the price. | |
5. The system shows all the information to the renter, requesting confirmation | |||
6. The renter confirms. | ... saves the Rental? | RentalManager | Information Expert: RentalManager aggregates all Rentals. |
7. The system informs about the success of the operation |
Systematization
From the rational results that the conceptual classes promoted to software classes are:
- Rental
- Offer
- Vehicle
- Schedule
- Company
Other identified software classes (e.g. Pure Fabrication):
- RentVehicleUI
- RentVehicleController
- RentalManager