Software

UML Class Diagram of a car rental company

Car Rental Company UML class diagram.png

This example has the next 4 entities:

  1. Car Rental Company: company itself, which is the “whole“.
  2. Car: cars owned by the company.
  3. Rental: rental entity (like contract), which is the “whole” for Car and Renter entities.
  4. Renter: a person who rent car.

All of the connections are composition. The system has the next generalization connections:

  • Car Rental Company Car: the company can have 0 or many cars; a car can have only 1 company.
  • Car Rental Company – Rental: the company can have 0 or many rentals; a renal can have only 1 company.
  • Car Rental Company – Renter: the company can have 0 or many renters; a renter assigned only o 1 company.
  • Rental – Car: 1 rental can be assigned to 1 car and vise versa.
  • Rental – Renter: each rental can have only 1 renter but a renter can have 0 or many rental.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.