Skip to content

Vehicle rental management system in C++. Models vehicles, clients, and rentals with OOP, UML design, inheritance, polymorphism, and operator overloading.

Notifications You must be signed in to change notification settings

PieriFra/VehicleRentalSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚗 Vehicle Rental Management System – C++ Simulator

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.


📌 Project Overview

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.

Main Features

  • 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
  • Advanced programming requirements:

    • UML class design with relationships
    • to_string and 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
    • Use of at least one dynamic_cast and virtual methods
  • Statistics:

    • List all rentals by vehicle type
    • Calculate total profit from rentals

🛠️ Technologies & Concepts

  • Language: C++
  • Paradigm: Object-Oriented Programming (OOP)
  • UML Class Design
  • Operator overloading
  • Inheritance and polymorphism
  • Dynamic casting
  • Custom list class with extensions

▶️ How to Run the Project

  1. Clone the repository:
    git clone https://github.com/PieriFra/LABPROGA-TP3.git
    cd LABPROGA-TP3
    
  2. Compile the program:
g++ -o VehicleRentalSystem main.cpp
  1. Run the system:
./VehicleRentalSystem

📊 Example Use Cases

  • 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

🎯 Learning Goals

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

About

Vehicle rental management system in C++. Models vehicles, clients, and rentals with OOP, UML design, inheritance, polymorphism, and operator overloading.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages