Introducing our core example
Throughout this chapter, we will be making use of a simulated schema named ABC Megamart to explain the concepts of OOP. The availability of an object-oriented approach in a programming language helps with effective reusability and abstraction of the language. Our example, ABC Megamart, is a simulated large retail store that sells multiple products across different cities and consists of multiple branches.
Let us give a structure to different entities of this store and look at how they can fit into an organized OOP paradigm. Our store consists of the following:
- Products
- Branches
- Invoices
- Holidays
- Shelves
- Inventory
- Sales
- Promotions/offers
- Exchange counter
- Finance
Each of these entities can have multiple attributes of data or information that are required to perform multiple functions in the smooth and efficient management of the stores.
Let us explore how these entities and their attributes can be structured...