A Java-based Object-Oriented Vehicle Rental System that supports renting and returning various types of vehicles like Cars, Bikes, and Trucks. The project showcases the use of abstract classes, interfaces, inheritance, and encapsulation, and is designed with extensibility in mind. Final assessment of OOPs Prinicples course from learn.epam.com
- Abstract base class
Vehiclewith polymorphiccalculateRentalCostmethod. - Interface
Rentabledefining contract forrentVehicle()andreturnVehicle(). - Concrete vehicle types:
Car,Bike, andTruck. - Rental cost calculated per vehicle type and rental duration.
- Rental management through a
RentalServiceclass. - Console-based interface via
Main.java.
- Java 8+
- OOP Principles (Abstraction, Inheritance, Interface, Polymorphism)
- No external libraries required.
Vehicle (abstract)
├── Car
├── Bike
└── Truck
Interface
├── Rentable
Manager
├── RentalService
Vehicle_Rental_System/
│
├── Vehicle.java
├── Car.java
├── Bike.java
├── Truck.java
├── Rentable.java
├── RentalService.java
└── Main.java
- Clone the repository
git clone https://github.com/alloy77/Vehicle_Rental_System.git
cd Vehicle_Rental_System- Compile the project
javac *.java- Run the program
java Main