The Vehicle Rental System is a Java-based application demonstrating core Object-Oriented Programming (OOP) concepts such as Inheritance, Abstraction, and Encapsulation. The system enables users to rent various types of vehicles, manage bookings, and calculate rental costs.
- Manage Vehicles:
- Add, update, and remove vehicles.
- Manage different types of vehicles (cars, bikes, trucks).
- Booking System:
- Rent vehicles based on availability.
- Return rented vehicles.
- Cost Calculation:
- Calculate rental costs based on vehicle type and rental duration.
- User-Friendly Interface:
- Simple console-based menu for sellers and customers.
Vehicle_Rental_System/
│
├── src/
│ ├── models/ # Core OOP classes
│ │ ├── Vehicle.java
│ │ ├── Car.java
│ │ ├── Bike.java
│ │ ├── Truck.java
│ │ ├── Booking.java
│ │ └── Customer.java
│ ├── services/ # Service layer for operations
│ │ ├── VehicleService.java
│ │ ├── BookingService.java
│ │ └── CustomerService.java
│ |
│ │
│ └── Main.java # Entry point
├── README.md # Project documentation
└── .gitignore # Git ignored files
- Java: Core programming language.
- Git: Version control.
- IDE: IntelliJ IDEA or any Java-supported IDE.
- Java Development Kit (JDK) installed.
- Git installed.
- Clone the repository:
git clone https://github.com/grasyPatel/Vehicle-Rental-System-OOPS.git
- Navigate to the project directory:
cd Vehicle_Rental_System
- Compile the code:
javac src/Main.java
- Run the application:
java src.Main
- Vehicle: Base class for all vehicles.
- Car, Bike, Truck: Inherit from
Vehicle
and represent specific vehicle types. - Booking: Represents rental transactions.
- Customer: Manages customer information.
- VehicleService: Handles adding, updating, and removing vehicles.
- BookingService: Manages bookings and rental cost calculations.
- CustomerService: Handles customer information and operations.
-
Add a Vehicle:
- Add a car, bike, or truck with details such as name, type, and rate.
-
Book a Vehicle:
- Enter customer details and vehicle ID to book.
-
Return a Vehicle:
- Calculate and display the total rental cost.
-
View Available Vehicles:
- Display all available vehicles.