A clean Object-Oriented Car Rental System built in Python.
Demonstrates Encapsulation, Inheritance, Polymorphism, and Abstraction through real-world entities β Customer, Vehicle, Car, Reservation, and Rental.
This project models how a real car rental company operates, including:
- Registering customers and vehicles
- Managing reservations and rentals
- Tracking fuel levels, odometer readings, and late fees
- Calculating total charges automatically
All code is organized into separate classes and modules for clarity and reusability.
| Concept | Example in Project |
|---|---|
| Encapsulation | Private attributes with property getters/setters |
| Inheritance | Car inherits from Vehicle, Customer inherits from Person |
| Polymorphism | Shared methods like vehicle_type() across subclasses |
| Abstraction | Abstract base classes (Vehicle, Person) enforce structure |
car-rental-system/ β βββ src/ β βββ enums.py β βββ person.py β βββ customer.py β βββ vehicle.py β βββ car.py β βββ reservation.py β βββ rental.py β βββ examples/ β βββ main.py β βββ README.md βββ LICENSE βββ requirements.txt βββ .gitignore
git clone https://github.com/DariAdams/car-rental-system.git
cd car-rental-system
python src/main.py
π¨βπ» Author
Adams Dari