A Java-based console application designed to manage vehicle leasing operations for "RoyalRentals." This system allows employees to manage a fleet of vehicles, maintain a client registry, and process lease agreements and returns using a text-based interface.
This project implements a vehicle management system using Polymorphism, Inheritance, and Array manipulation. It handles three distinct packages (Client, Driver, Vehicles) to separate logic for vehicle attributes, client information, and the main execution driver.
- Fleet Management:
- Add, delete, and update vehicles (Electric Trucks, Electric Cars, Diesel Trucks, Gasoline Cars).
- List all vehicles by category.
- Identify specific vehicle stats (e.g., truck with the largest capacity).
- Client Management:
- Register new clients.
- Edit existing client details.
- Remove clients from the system.
- Leasing Operations:
- Lease a specific vehicle to a registered client.
- Process vehicle returns.
- View all active leases for a specific client.
- View all currently leased vehicles across the company.
- Dual Modes:
- Interactive Mode: User inputs data manually via the console.
- Pre-set Scenario: Runs a hard-coded simulation of the leasing process.
The project is organized into three main packages within the src directory:
src/
βββ Client/
β βββ Client.java # Client attributes (ID, Name)
β βββ Lease.java # Lease object definition
β βββ LeasingService.java # Logic for handling leases
βββ Driver/
β βββ Driver.java # Main entry point (Menu & User Input)
βββ Vehicles/
β βββ Vehicle.java # Abstract base class
β βββ Electric_Car.java # Subclass
β βββ Electric_Truck.java # Subclass
β βββ Gasoline_Car.java # Subclass
β βββ Diesel_Truck.java # Subclass
βββ settings.json # IDE Configuration