- 2073 Bhadra · 8 marks
Rental car system candidate objects
Short answer
Candidate objects: RentalAgency, Office, Customer, Car, Rental, Bill, Payment, MaintenanceRecord, Driver, DriverAssignment, TestDrive. Relationships: Agency has Offices, each Office owns Cars; Customer makes Rentals for a Car, each Rental generates a Bill with Payments; a Rental may assign at most one Driver; Cars have MaintenanceRecords.
Consider a Rental Car System (RCS). A rental agency has multiple offices/locations where customer can test drive and select a car for rental. The period of rental, terms and conditions for rental is flexible. RCS has to take responsibility for loaning cars, keeping track of availability of cars, return of cars, billing, maintenance activities for cars and keeping track of driver's availability and assignment in case of chauffeur driver car rentals. Identify the candidate objects with relationships of above case.
Method: nouns and noun phrases in the description give the candidate objects. Irrelevant, vague or duplicate ones are removed, and then the relationships are identified.
Candidate objects (classes)
RentalAgency, Office (location), Customer, Car, Rental (rental agreement: period, terms and conditions), Reservation, Bill (Invoice), Payment, MaintenanceRecord (maintenance activity), Driver (chauffeur), DriverAssignment, TestDrive.
Rejected as classes: "responsibility", "system" (RCS itself), "period" and "terms" (attributes of Rental), "availability" (attribute or status of Car and Driver).
Attributes (examples)
| Class | Attributes |
|---|---|
| Office | officeId, address, phone |
| Car | regNo, make, model, status (available/rented/maintenance), dailyRate |
| Customer | customerId, name, licenceNo, address |
| Rental | rentalId, startDate, endDate, terms, status |
| Bill | billId, amount, date |
| Driver | driverId, name, licenceNo, available |
| MaintenanceRecord | date, type, cost |
Relationships
RentalAgency1 - 1..*Office(composition: the agency has multiple offices).Office**1 - ***Car(a car belongs to an office).Customer1 - ***Rental;Rental*** - 1Car;Rental1 - 1Bill;Bill**1 - ***Payment.Rental*** - 0..1**Driver, throughDriverAssignment: a rental has at most one chauffeur (only for chauffeur-driven rentals), and a driver can be assigned to many rentals over time.Car**1 - ***MaintenanceRecord.Customer**1 - ***TestDrive, each for oneCar.
+--------------+ 1 1..* +--------+ 1 * +--------+
| RentalAgency |<#>------| Office |-------| Car |
+--------------+ +--------+ +--------+
| 1 | 1
| * | *
+----------+ 1 * +--------+ * 1 | +-------------+
| Customer |-------| Rental |--------------+ | Maintenance |
+----------+ +--------+ | Record |
| 1 | * +-------------+
| 1 | 0..1
+------+ +----------------+
| Bill | | Driver |
+------+ | (chauffeur) |
| 1 +----------------+
| *
+---------+
| Payment |
+---------+
✓ Answer checked by Claude Sonnet 5.5
Related questions
- Video rental shop class diagram · Object Oriented Analysis and Design, chapter 2
- KUKL customer system design and code · Object Oriented Analysis and Design, chapter 4
- Food ordering system sequence diagram · Object Oriented Analysis and Design, chapter 2
- Prove mean annual flood has 2.33-year return period · Engineering Hydrology, chapter 6
- Test: mean weight of ten objects is 65 g · Probability and Statistics, chapter 6
- Flexible pavement design with 8 CBR values · Transportation Engineering II, chapter 2
- Flexible pavement life with 140 cvpd traffic · Transportation Engineering II, chapter 2
All Object Oriented Analysis and Design chapter 2 questions →