Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a JAVA program to model an Online Bookstore Management System. You will have 5 classes: Book, Customer, Order, Inventory, and BookstoreManagmentSystem. Cheg fo ChaT

Create a JAVA program to model an Online Bookstore Management System. You will have 5 classes: Book, Customer, Order, Inventory, and BookstoreManagmentSystem.
Cheg fo ChaT is tol pobe. We ca det it esan yo ar renle fo yo.
Book class
public Book(String title, String author, String isbn, double price, int quantity): Constructor to initialize a new Book object with the given parameters.
public void updateQuantity(int delta): Method to update the quantity of the book by adding the given value.
Getters: Methods to retrieve information about the book such as title, author, ISBN, price, and quantity.
@Override public String toString(): Method to provide a string representation of the Book object.
Customer Class:
public Customer(String name, String email, String address): Constructor to initialize a new Customer object with the given parameters.
public void placeOrder(Order order): Method to place an order for the customer.
public List getOrderHistory(): Method to retrieve the order history of the
customer.
Getters: Methods to retrieve information about the Customer.
Setters: Methods to set information about the Customer.
Order Class:
public Order(List items): Constructor to initialize a new Order object with the given list of items.
private void calculateTotalPrice(): Method to calculate the total price of the order based on the prices of the items.
public void updateShippingStatus(String status): Method to update the shipping status of the order.
ShippingStatus={Pending or Shipped}
@Override public String toString(): Method to provide a string representation of the
Order object.
Inventory Class:
public Inventory(): Constructor to initialize a new Inventory object.
public void addBook(Book book): Method to add a new book to the inventory.
public Book findBook(String isbn): Method to find a book in the inventory based on its
ISBN. You should handle the error case with Dialog Box when the book isbn does not
exist.
public List searchBooks(String query): Method to search for books in the
inventory based on a query string. You should handle the error case with Dialog Box when the query about the book does not match.
Main Method (BookstoreManagementSystem):
main(String[] args): Main method to test the functionality of the classes and methods. Testing functionality such as adding books to the inventory, searching for books, creating a customer, placing an order, updating shipping status, and viewing order history.
You should add a full menu to interact with the system:
1. Add book
2. Search about book
3. Find a book
4. Create a customer and place an order
5. Update shipping status
6. View customer order history
You should put all classes in one package.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

Why is it costly to issue securities?

Answered: 1 week ago

Question

2. List the advantages of listening well

Answered: 1 week ago