Welcome to Delailia's Bookshop! ππ
This is a fully-fledged object-oriented bookstore management system designed using strong encapsulation principles. The system allows both Employees π©βπΌπ¨βπΌ and Clients π€ to interact seamlessly with the bookstore.
Key features include:
- Clients can place orders, check book prices, and search for books ππ.
- Employees have access to additional functionalities like managing inventory π¦, updating records βοΈ, and viewing sales history π³π.
- Place Orders: Easily order multiple books at once π.
- Check Prices: Get real-time pricing information for any book π°.
- Search for Items: Efficiently search for books by title, author, or genre π.
- Add to Inventory: Add new books, magazines, or DVDs to the store ππ.
- Update Items: Modify existing inventory details such as price, title, or author βοΈ.
- View Customer Orders: Review past customer orders and view total sales π³π.
- Manage Inventory: Search for specific items in the inventory ππ¦.
To run this application on your local machine:
-
Clone the repository:
git clone https://github.com/yourusername/Delailias-Bookshop.git
-
Navigate to the project directory:
cd Delailias-Bookshop
Note: Ensure you have Python installed on your machine before running the script. If you are using another language, adjust accordingly.
Hereβs an example walkthrough of how a client can interact with the system:
---- Welcome to Delailia's Bookshop π ----
Are you an Employee or a Client ?: client
Enter Name : John Doe
----- Welcome John Doe -----
1. Place an Order π
2. Check Price π°
3. Search for an Item π
Enter your choice -> 1
**********************
How many items do you want to order? 2
Enter the title of the book? Harry Potter and the Philosopher's Stone
Item exists!
Do you want the Details? (y / n) y
------- Details ---------
Title : Harry Potter and the Philosopher's Stone
Author : J.K. Rowling
Price : 12.99 EGP
**********************
Enter the title of the book? Inception
Item exists!
Do you want the Details? (y / n) y
------- Details ---------
Title : Inception
Author : Christopher Nolan
Price : 14.99 EGP
Hereβs an example walkthrough of how an employee can interact with the system:
---- Welcome to Delailia's Bookshop π ----
Are you an Employee or a Client ?: employee
Enter Name : Alice Smith
Enter your Role : Manager
Enter the intended passcode : 1234
---- Employee Menu ----
1. Add to Inventory π¦
2. Check the Price for an Item π°
3. Search for an Item π
4. View Customer Orders π
5. Update an Item βοΈ
Enter an Option -> 1
********************** What do you want to add to the inventory? : **********************
1. Book π
2. Magazine π°
3. DVD π₯
Enter a Number -> 2
.................................................................................................................................
Title of the Magazine : Time Out
The Author : David Walsh
The Issue Number : July 2024
Publication Date : 2024-07-01
Enter the Editor : John Doe
Enter Price : 5.99
Time Out by David Walsh is added Successfully β
---- Employee Menu ----
1. Add to Inventory π¦
2. Check the Price for an Item π°
3. Search for an Item π
4. View Customer Orders π
5. Update an Item βοΈ
Enter an Option -> 4
Customer: John Doe
Items:
- Harry Potter and the Philosopher's Stone ($12.99)
- Inception ($14.99)
Total: $27.98 πΈ
---- Employee Menu ----
1. Add to Inventory π¦
2. Check the Price for an Item π°
3. Search for an Item π
4. View Customer Orders π
5. Update an Item βοΈ
Enter an Option -> 5 **********************
What do you want to Update? : **********************
1. Book π
2. Magazine π°
3. DVD π₯
Enter a Number -> 1
What is the title of the book? Harry Potter and the Philosopher's Stone
Item exists!
What do you want to Update? :
1. Title π
2. Author π©βπ¨
3. Genre π
4. ISBN π’
5. Number of Pages π
6. Price π°
Enter a Number -> 6
New Price of the Book : 300
Harry Potter and the Philosopher's Stone is updated Successfully β
classDiagram
class Item {
+str title
+str author
+float price
+get_title()
+get_author()
+get_price()
+set_price(price)
+BasicDetails()
+Update()
+Display()
}
class Book {
+str genre
+int isbn
+int pages
+Display()
+Update()
}
class Magazine {
+int issue_number
+str publication_date
+str editor
+Display()
+Update()
}
class DVD {
+str director
+int duration
+str genre
+Display()
+Update()
}
class Employee {
+str name
+str role
+add_book_to_inventory(bookstore, book)
}
class Client {
+str name
+search_item(bookstore, title)
}
class Order {
+str customer_name
+list items
+add_item(item)
+calculate_total()
+displayItems()
}
class Bookstore {
+list inventory
+list employees
+list orders
+add_employee(employee)
+add_item(item)
+search_by_title(title)
+place_order(customer_name, order)
+display_orders()
}
Item <|-- Book
Item <|-- Magazine
Item <|-- DVD
Employee --> Bookstore
Client --> Bookstore
Order --> Bookstore
