A simple GUI-based Java application to manage a vehicle rental system using OOP concepts. It allows users to rent and return vehicles, view available vehicles, and track rentals through a unique rental ID.
- Rent vehicles (Car / Motorcycle)
- Return rented vehicles using Rental ID
- View available vehicles
- Unique rental ID generation (e.g., RC5, RM3)
- Basic input validation and error handling
- GUI with colorful modern buttons and font styling
- Java (JDK 8 or higher)
- Swing for GUI
- OOP Concepts (Encapsulation, Inheritance, Composition)
- IntelliJ
VehicleRentalSystem/ โ โโโ models/ # Vehicle, Car, Motorcycle, Customer classes โโโ system/ # RentalSystem, DataStore classes โโโ ui/ # GUI interfaces (MainMenuUI, RentalFormUI, ReturnFormUI, UIDesign ) โโโ VehicleRentalSystem.java # Entry point of the application
- Clone the repository or download the ZIP.
- Open the project in your preferred Java IDE.
- Compile the entire project.
- Run
VehicleRentalSystem.javato launch the application.
- Click on
Rent Vehicle - Select a vehicle
- Enter your Name and Contact Number
- Youโll get a unique rental ID like
RC3
- Click on
Return Vehicle - Enter your Rental ID (e.g.,
RM5) - Vehicle will be returned and added back to availability
- Contact number must be numeric and 10 digits
- Name field cannot be empty
- Rental ID format is validated during return
- No database integration; data is stored in memory using ArrayLists.
- Data is reset every time the application restarts.
- You can add more sample vehicles in
DataStorefor testing.
For improvements or questions, feel free to reach out!