Low Level Design Car Rental System

Photo by why kei on Unsplash

Low Level Design Car Rental System

ยท

2 min read

Requirements

  • Show cars available for rent

  • Show stores based on location

  • Each Store has cars available for rent

  • In the future, this rental company may plan to start rents SUVs, trucks etc

  • The user can reserve a vehicle by giving a security deposit and required docs

  • The final amount to be paid/returned is decided in the end

User Flows

Happy Flow:

  1. User Registration:

    • User registers with personal information.
  2. Browse and Reserve:

    • User selects a location.

    • User browses available cars (including future SUVs/trucks).

    • User reserves a car, pays a deposit, and provides necessary documents.

  3. Payment & Confirmation:

    • System processes payment.

    • User receives booking confirmation.

  4. Pick-Up & Usage:

    • User picks up the car and enjoys the rental.
  5. Return & Inspection:

    • User returns the car.

    • Car inspection determines final charges.

  6. Feedback:

    • User provides feedback and reviews.

Unhappy Flow (Cancellation):

  1. Booking Cancellation:

    • User cancels the booking, and a refund is processed.

Edge Cases:

  1. Car Unavailability:

    • If a selected car becomes unavailable, alternatives are suggested.
  2. Late Return:

    • Late return incurs extra charges.
  3. Damage Dispute:

    • Disputes over car damage are facilitated.
  4. Emergency Assistance:

    • User can seek assistance in case of car problems.

Object/Model Identification (Building bottom up)

  • Vehicle

  • VehicleInventoryManager manages vehicles

  • The store has a Location, has its own VehicleInventoryManager,maintains a list of reservations

  • Location

  • Reservation: has User object and related info

  • User

  • VehicleRentalSystem:

    • getStore takes in a Location object and returns list of stores

    • instead of having a user List here we can have reference to different UserManager that manage related things it can also have a reference to VehicleInventory Management in case we need to search by vehicle irrespective of the location

Main

  • Bill , generated against a Reservation

  • Payment can have Payment Strategy to pay the bill

UML

ย