CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
πŸŒ™β˜€οΈ
Log inStart free
Home/Templates/Automotive

πŸš— Automotive Β· Class UML

Car Rental System Class Model

An object model for a car rental service: branches, cars, customers, reservations, rentals and pricing.

More Automotive templates

Drawing diagram…

What this diagram shows

  • Reservations become rentals when the car is picked up
  • Pricing depends on car category and duration
  • Damage and fuel charges are added at return

Prompt used

Class diagram for car rental: Branch has many Cars; Car has a CarCategory (hatchback, sedan, SUV) and status; Customer with driving licence makes Reservations for a category at a branch; a Reservation becomes a Rental when a specific Car is assigned; Rental calculates the bill using a PricingPolicy and adds damage and fuel charges at return.

Mermaid code
classDiagram
  class Branch {
    +String id
    +String city
    +availableCars(category) List~Car~
  }
  class Car {
    +String regNo
    +CarCategory category
    +String status
  }
  class Customer {
    +String id
    +String name
    +String licenceNo
  }
  class Reservation {
    +String id
    +DateTime pickupAt
    +DateTime returnAt
    +confirm()
    +cancel()
  }
  class Rental {
    +int startOdometer
    +int endOdometer
    +returnCar(fuelLevel, damages)
    +bill() Decimal
  }
  class PricingPolicy {
    +dailyRate(category) Decimal
    +extraCharges(fuel, damages) Decimal
  }
  class CarCategory {
    <<enumeration>>
    HATCHBACK
    SEDAN
    SUV
  }
  Branch "1" --> "*" Car
  Car --> CarCategory
  Customer "1" --> "*" Reservation
  Reservation "1" --> "0..1" Rental
  Rental --> Car
  Rental ..> PricingPolicy : uses

Related templates

State MachineAutomotive

EV Charging Session State Machine

Every state of an electric vehicle charging session at a public charger, from plug-in to payment, including faults and idle fees.

C4 ArchitectureProAutomotive

Connected Car Platform Architecture

A connected vehicle platform: the telematics unit in the car, the cloud services that collect data and send commands, and the owner's mobile app.

SequenceAutomotive

Vehicle Software OTA Update

How a carmaker updates vehicle software over the air: campaign targeting, owner consent, download, safe installation and reporting.

C4 ArchitectureProAutomotive

EV Charging Network Architecture

A charge point operator's platform: chargers speaking OCPP, a central management system, driver app, payments and roaming.

DeploymentProAutomotive

Fleet Management Deployment

Where each part of a fleet management system runs: GPS devices in trucks, cloud services for tracking and analytics, and apps for managers and drivers.

SequenceAutomotive

Ride-Hailing Booking Sequence

What happens when a rider books a cab: fare estimate, driver matching, pickup, the trip and payment.