Skip to main content

Command Palette

Search for a command to run...

Low Level Design Car Rental System

Published
โ€ข2 min read
Low Level Design Car Rental System
P

Hello, I'm Paras Kaushik! ๐Ÿ‘‹ I'm a dedicated software engineer based in India, specializing in C++ and proficient in the MERN stack.

๐Ÿค Interested in collaborating on innovative projects that require my technical expertise.

๐Ÿ’ฌ Passionate about participating in discussions related to software architecture and best practices.

๐Ÿ“ง Feel free to reach out to me via email: [paraskaushik12@gmail.com]

๐Ÿ”— Connect with me on LinkedIn: [https://www.linkedin.com/in/the-paras-kaushik/]

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

More from this blog

Blogs by Paras

52 posts

Hello, I'm Paras Kaushik! ๐Ÿ‘‹ I'm a dedicated software engineer based in India, specializing in C++ and proficient in the MERN stack. ๐Ÿ’ผ Open to Collaboration