Online Bookstore Abstraction
Online Bookstore Abstraction
ONLINE
BOOKSTORE
ABSTRACTION
ABSTRACTION
Abstraction in Object-Oriented Programming
(OOP) is the process of hiding implementation
details while exposing only essential features or
functionalities to the user. It allows developers
to create simpler interfaces by focusing on what
an object does rather than how it does it.
ABSTRACTION
For example, a "Car" class might have methods
like startEngine() and drive(), without revealing
the complex logic behind engine ignition or fuel
management. Abstraction is typically achieved
using abstract classes and interfaces, where
methods are declared but not implemented.
This approach enhances code readability,
reduces complexity, and promotes
maintainability by separating the interface from
the implementation.
ABSTRACTION
The abstraction principle in software design
involves hiding complex implementation details
and exposing only essential features to simplify
system interaction. In an online bookstore
system, several components integrate this
principle effectively:
Search and Browse Books: Users can search Book Management Service: Handles book
for books by title, author, or genre without inventory, prices, and descriptions, abstracting
knowing how the search algorithm works. database queries and data storage.
Checkout Process: Users enter payment and User Authentication Service: Manages login
shipping details, abstracting payment gateway and registration without exposing password
and inventory management processes. hashing and session management logic.
Object Oriented Programming
GROUP 5
Data Repositories: Use Data Access Objects Payment Gateway Integration: Abstracts
(DAOs) or repositories to abstract complex payment processing with APIs, so the
SQL queries, ensuring data retrieval and bookstore system doesn’t handle sensitive
persistence are hidden from higher layers. financial data directly.
THANK YOU!