A structured and modular sales management system built in Python to demonstrate advanced Object-Oriented Programming principles.
This project models real-world sales entities such as products, users, and employees using clean OOP architecture.
- Abstract Base Class (
Person) - Inheritance (
User,Employee) - Polymorphism (
display_infomethod) - Encapsulation (private & protected attributes)
- Inventory validation
- Shopping history tracking
- Salary management with percentage increase
- Randomized product assignment simulation
- Private attributes:
__price,__salary - Protected attributes:
_email,_address,_description - Controlled access via getters and setters
EmployeeandUserinherit from abstract base classPerson
display_info()implemented differently in each subclass- Unified interface used in
main.py
Personimplemented using Python'sabcmodule
oop-online-store-system/
├── models/
│ ├── employee.py
│ ├── person.py
│ ├── product.py
│ └── user.py
├── .gitignore
├── README.md
├── main.py
└── requirements.txt
- Clone the repository:
git clone https://github.com/nicktm8/oop-online-store-system.git- Navigate to the project directory:
cd oop-online-store-system- Run the program:
python main.py- Displays product inventory
- Updates product prices (+10% simulation)
- Demonstrates encapsulation via getters and setters
- Shows polymorphic display of users and employees
- Calculates total spending per user
- Increases employee salaries
This project was developed to strengthen understanding of:
- Clean OOP architecture
- Writing modular Python code
- Structuring multi-file projects
- Applying theoretical OOP concepts in practice
It serves as a foundational backend-style system suitable for further expansion (CLI interface, database integration, REST API version, etc.).
- CLI interactive menu
- Data persistence (JSON or SQLite)
- Logging system
- Unit testing (pytest)
- Flask or FastAPI API version
Nick Tem
Aspiring Python Developer
GitHub: https://github.com/nicktm8