Skip to content

An Object-Oriented Car Rental System built in Python demonstrating encapsulation, inheritance, abstraction, and polymorphism.

License

Notifications You must be signed in to change notification settings

DariAdams/car-rental-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš— Car Rental System (OOP β€’ Python)

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.


🧠 Project Overview

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.


🧩 OOP Concepts Demonstrated

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

πŸ—‚οΈ Folder 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


πŸš€ Run Instructions

git clone https://github.com/DariAdams/car-rental-system.git
cd car-rental-system
python src/main.py

πŸ‘¨β€πŸ’» Author

Adams Dari

About

An Object-Oriented Car Rental System built in Python demonstrating encapsulation, inheritance, abstraction, and polymorphism.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages