Skip to content

Saumyajeet-Varma/RideBuddy-LLD-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Ride Sharing System — LLD Implementation

This project is a Low-Level Design (LLD) of a simple ride-sharing system, similar to platforms like Uber or Ola. The system demonstrates object-oriented principles, service-based design, and basic ride booking logic in Java.

Features

  • Rider can request a ride by specifying source and destination.
  • Drivers are registered with the system along with vehicle details.
  • The system matches available drivers to ride requests using a service-based approach (FindingDriverService).
  • Fare calculation based on the type of vehicle:
    • Bike = baseFaree * 1.00
    • Car = baseFare * 1.50
    • Luxury = baseFare * 2.00
  • Ride status tracking: REQUESTEDONGOINGCOMPLETED.
  • Simple logging of ride start, completion, and fare.

Classes Overview

Model

  • User → Abstract base class for Rider and Driver.
  • Rider → Represents a rider, stores current location, can request rides.
  • Driver → Represents a driver, stores vehicle info and availability.
  • Vehicle → Represents a vehicle with type and license plate.
  • Ride → Represents a ride, stores rider, driver, source, destination, fare, and status.

Service

  • FindingDriverService → Interface for driver matching strategy.
  • FindingRandomDriverService → Implementation that finds the first available driver.

Manager

  • RideManager → Singleton class managing drivers, rides, and matching logic.

About

This project is a Low-Level Design (LLD) of a simple Ride Sharing System.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages