This project was developed as the third assignment for the course "Programming Lab I" (C++).
It implements a vehicle rental management system, modeling clients, vehicles, rentals, and additional services using object-oriented programming concepts, UML design, and advanced C++ features such as operator overloading and dynamic casting.
The system simulates the daily operations of a vehicle rental company.
It manages the company’s fleet of vehicles, list of clients, and rental records, while also supporting maintenance and financial tracking.
-
Vehicles (abstract class with inheritance):
- Motorcycles (optional helmet rentals)
- Cars (optional child safety seats)
- Pickup trucks (child safety seats and/or roof racks)
- Vans/Traffics (child safety seats and/or foldable auxiliary seats)
-
Vehicle attributes:
- License plate, chassis number, insurance policy, color
- Last maintenance date
- Rental price per day (fixed per category)
- Passenger capacity
-
Rental management:
- Associates a client with a vehicle
- Records additional equipment requested
- Stores rental start and end dates
- Calculates total rental cost (base fee + per-day charge + extras)
-
Maintenance system:
- Each vehicle type has its own maintenance steps (
PasosMantenimiento) - Automatically updates the last maintenance date
- Each vehicle type has its own maintenance steps (
-
Advanced programming requirements:
- UML class design with relationships
to_stringand printing methods for all classes- Getters and setters as needed
- Overloaded operators:
- Print operator
<<for vehicles +operator for adding items to lists[]operator for accessing list elements
- Print operator
- Use of at least one dynamic_cast and virtual methods
-
Statistics:
- List all rentals by vehicle type
- Calculate total profit from rentals
- Language: C++
- Paradigm: Object-Oriented Programming (OOP)
- UML Class Design
- Operator overloading
- Inheritance and polymorphism
- Dynamic casting
- Custom list class with extensions
- Clone the repository:
git clone https://github.com/PieriFra/LABPROGA-TP3.git cd LABPROGA-TP3 - Compile the program:
g++ -o VehicleRentalSystem main.cpp- Run the system:
./VehicleRentalSystem- Adding vehicles to the company fleet
- Renting a vehicle to a client with optional extras
- Performing maintenance on a vehicle and updating its records
- Listing all rentals by type of vehicle
- Printing daily profit summary
This project allowed the application of:
- UML modeling and translation into C++ classes
- Inheritance, abstract classes, and polymorphism
- Operator overloading (<<, +, [])
- Dynamic memory management and dynamic_cast
- Building a modular object-oriented project