This project is a Car Rental System implemented in C++. It allows users to view available cars, rent a car for a specific number of days, and return a car when finished. Each car has details such as the brand, model, year, and price per day.
- Show Available Cars: Users can view the cars that are currently available for rent.
- Rent a Car: Users can rent a car for a specific number of days. The system calculates and displays the total cost based on the daily rental rate.
- Return a Car: Users can return a car they have rented, making it available again for others to rent.
- Show All Cars: Displays all cars in the system, including both available and rented cars.
- Exit: Users can exit the system.
-
Clone or download the project files.
-
Open the terminal and navigate to the project folder.
-
Compile the C++ code using the following command:
g++ car_rental.cpp -o carRental -
Run the executable:
./carRental -
Follow the on-screen menu to navigate the car rental system.
- 1. Show Available Cars: Displays a list of cars that are currently available for rent.
- 2. Rent a Car: Prompts the user to select a car by its index and input the number of days for the rental. Calculates and displays the total cost.
- 3. Return a Car: Users can return a rented car by selecting it by its index.
- 4. Show All Cars: Displays all cars, showing both available and rented cars.
- 5. Exit: Exits the program.
- Toyota Corolla (2020) - $50 per day
- Ford Fiesta (2019) - $40 per day
- Tesla Model 3 (2021) - $100 per day
- BMW X5 (2018) - $90 per day
- Add customer profiles and history of rentals.
- Add more car details, like mileage and fuel efficiency.
- Integrate payment processing functionality.
- Store rental data in a file for persistence across sessions.