English • 🔤 النسخة العربية
This project is a console-based Car Rental Management System developed using Java and Object-Oriented Programming (OOP) principles. It simulates a real-world rental company system that manages:
- Vehicles
- Customers
- Rental contracts
- Revenue reports The system is fully interactive using a menu-driven console interface.
- Add new vehicles (Car, Motorcycle, Truck)
- Delete vehicle (only if not currently rented)
- Search vehicle by board number
- Display all vehicles
- Display available vehicles only
- Add customers (Person / Institution)
- Search customer by ID
- Display all customers
- Modify customer information (name, location, phone number)
- Create rental contracts
- Return vehicles with date tracking
- Prevent renting already rented vehicles
- Track delay days automatically
- View:
- Active contracts
- Finished contracts
- Late rentals
- Rentals by customer
- Rentals by date range
- Institution rentals
- Total revenue (active + finished rentals)
- Most rented vehicle
- VIP customers (frequent renters)
The project is built using OOP principles:
- Vehicle (abstract class)
- Customer (abstract class)
- Vehicle → Car, Motorcycle, Truck
- Customer → Person, Institution
- calcTotalCost()
- toString()
- Private fields with getters/setters
- Java SE
- Object-Oriented Programming (OOP)
- LocalDate API
- ArrayList Collections
- 📄 Main.java: The main execution gateway managing the interactive multi-level console menus.
- 📂 Models (Domain Domain Layer):
- 📄 Vehicle.java: Abstract base class representing core vehicle metadata.
- 📄 Car.java: Handles standard vehicle specifications, including fuel and comfort features.
- 📄 Motors.java: Manages motorcycle profiles and sidecar additions.
- 📄 Truck.java: Manages heavy transport vehicle profiles and refrigeration capabilities.
- 📄 Customer.java: Abstract representation of a system client with built-in regex-like validations.
- 📄 Person.java: Subclass for individual renters tracking legal age and driver licenses.
- 📄 Institution.java: Subclass for business entities tracking commercial registration and custom discount rates.
- 📂 Services (Business Logic Layer):
- 📄 VehiclesManagement.java: Controls data operations and inventory constraints for the fleet.
- 📄 CustomerManager.java: Controls client directories and profile mutation logic.
- 📄 Rentals.java: The core transaction entity storing rental timelines, state, and base billing.
- 📄 RentalsManager.java: The primary workflow coordinator handling rental lifecycle, check-ins, reporting, and analytic calculations.
- Run the program
- Choose from main menu:
- Vehicle Management
- Customer Management
- Rentals Management
- Reports
- Perform operations interactively via console input
- Vehicles cannot be deleted if currently rented
- Customers cannot rent unavailable vehicles
- Delay fees are automatically calculated
- Institution customers receive discount rates
- Revenue is separated into active and finished contracts
This project helped me improve:
- Object-Oriented Design
- System structuring
- Real-world business logic implementation
- Input validation
- Java Collections (ArrayList)
- Date handling using LocalDate
- Add database (MySQL / PostgreSQL)
- Add GUI (JavaFX / Swing)
- Add login system (Admin / User roles)
- Export reports to files
- Exception handling improvements
- This repository is a reflection of my learning journey. I am aware that the current code can be further optimized, and I am actively working on refactoring and adding new features to improve its performance and structure
| Profile | Details |
|---|---|
| Full Name | Mahmoud Hussain |
| Academic Role | Informatics Engineering Student |
| University | Damascus University |
| Focus Areas | Backend Development • Software Architecture • Algorithmic Problem Solving |
| Connect With Me | 📩 Official LinkedIn Profile |