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:
User Registration:
- User registers with personal information.
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.
Payment & Confirmation:
System processes payment.
User receives booking confirmation.
Pick-Up & Usage:
- User picks up the car and enjoys the rental.
Return & Inspection:
User returns the car.
Car inspection determines final charges.
Feedback:
- User provides feedback and reviews.
Unhappy Flow (Cancellation):
Booking Cancellation:
- User cancels the booking, and a refund is processed.
Edge Cases:
Car Unavailability:
- If a selected car becomes unavailable, alternatives are suggested.
Late Return:
- Late return incurs extra charges.
Damage Dispute:
- Disputes over car damage are facilitated.
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