Skip to main content

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)

ClassAttributes
OfficeofficeId, address, phone
CarregNo, make, model, status (available/rented/maintenance), dailyRate
CustomercustomerId, name, licenceNo, address
RentalrentalId, startDate, endDate, terms, status
BillbillId, amount, date
DriverdriverId, name, licenceNo, available
MaintenanceRecorddate, type, cost

Relationships

  • RentalAgency 1 - 1..* Office (composition: the agency has multiple offices).
  • Office **1 - *** Car (a car belongs to an office).
  • Customer 1 - *** Rental; Rental *** - 1 Car; Rental 1 - 1 Bill; Bill **1 - *** Payment.
  • Rental *** - 0..1** Driver, through DriverAssignment: 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 one Car.
+--------------+ 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

All Object Oriented Analysis and Design chapter 2 questions →