The Online Shopping System is a C++ console-based application built using Object-Oriented Programming (OOP) principles to simulate an end-to-end online shopping process ,
It uses file handling as a simple database system.
The main goal of this project is to build a mini online store system — similar to real e-commerce platforms.
The system allows users to experience the full shopping process, starting from browsing products to confirming and tracking their orders.
Add new product categories to organize items efficiently.
Edit or remove existing categories when needed.
Ensure every product belongs to a specific category for better browsing.
Display all available products with their names, prices, categories, and any additional details added by the seller.
Add new products to the system.
Update or delete existing products easily.
Allow sellers to manage product details flexibly.
The system manages different types of users — Customers, Sellers, and Admins — each with their own roles and permissions.
It allows users to:
Create new accounts and securely log in to the system.
Edit and update their personal information, such as name, contact details, and account preferences.
Enjoy a more personalized shopping experience through their user profiles.
From the admin side:
Admins have the authority to monitor user activity and block accounts that violate system rules or misuse the platform.
This ensures a safe and trustworthy environment for all users.
Let customers add or remove products from their shopping cart.
Automatically calculate the total price.
Confirm the order once the user is ready to purchase.
Manage all customer orders from creation to delivery.
Track the order status (pending, or delivered).
Update delivery status once the order reaches the customer.
This project was designed entirely around Object-Oriented Programming (OOP) concepts, which helped create a well-structured, reusable, and scalable system.
Each part of the program represents a real-world entity and interacts with others through clear and organized relationships.
Here’s how OOP principles were applied:
All data and logic are grouped inside dedicated classes (like Product, Order, and Customer) with private attributes and public methods. This ensures data protection and keeps every class responsible for managing its own information, leading to cleaner and safer code.
Common behaviors were shared between related classes, reducing repetition and improving reusability. For example, base classes define shared properties, while subclasses extend or override them to add more specific functionality.
Used in specific parts of the system where a class needed to inherit features from more than one parent. This allowed combining behaviors — for example, linking product management with order tracking — without duplicating code.
Applied to make the system flexible and adaptable. Through virtual methods and overriding, different objects (like various types of payments or users) can perform the same action in different ways.
Aggregation was implemented between classes that are connected but still independent. For instance, the UserManagement class interacts with the Database class to store and retrieve user information. However, the Database object can exist separately, even if the UserManagement instance is removed. This type of relationship increases flexibility and keeps the system loosely coupled.
Composition was used to represent strong “has-a” relationships between classes. For example, an Order has multiple Purchase objects — meaning if the order is deleted, the purchases associated with it are also removed. This helps create a realistic and tightly connected system structure.
The project uses a Singleton pattern in some classes that need to maintain a single global instance, such as managing access to files or shared data. This guarantees that there’s only one point of control for key operations throughout the program.
💬 If you have any suggestions or ideas for improvement, I’d love to hear your feedback!
Your insights are always welcome to make this project even better ☺✨