Part A
Implement the above specifications without necessarily using object-oriented design at this stage. The key focus is to implement the correct algorithm logic. You can implement the system in one main program in a single class (Note: you may skip Part A and go straight to Part B with the use of OO. Part A is designed to let you focus on the basic functionalities.)
iuww520iuww520iuww520iuww520 iuww520iuww520iuww520iuww520
Following is a possible sample interaction with the bookstore system. You do not have to strictly follow the format but it illustrates required functionality. Text in bold
and
green
is input from the user:
===============================================
Welcome to The Reading Room!
===============================================
Choose an option:
1. Add a book to shopping cart
2. View shopping cart
3. Remove a book from shopping cart
4. Checkout
5. List all books
6. Quit
Please select:
1
Enter a keyword:
Java concepts
Sorry! There are no books that match with your key word.
Choose an option:
1. Add a book to shopping cart
2. View shopping cart
3. Remove a book from shopping cart
4. Checkout
5. List all books
6. Quit
Please select:
1
Enter a keyword:
java
The following book(s) are found:
1. Absolute Java
2. JAVA: How to program
3. Computing Concepts with Java 8 Essentials
4. Java Software Solutions
5. Java Program Design
6. Cancel
Please select:
2
Do you want to buy this as an ebook:
no
Sorry! There are no physical copies of the book!
Choose an option:
1. Add a book to shopping cart
2. View shopping cart
3. Remove a book from shopping cart
4. Checkout
5. List all books
6. Quit
Please select:
1
Enter a keyword:
Computing
The following books are found:
1. Computing Concepts with JAVA 8 Essentials
2. Cancel
Please select:
1
Do you want to buy this as an ebook:
no
“Computing Concepts with JAVA 8 Essentials” has been added to your cart.
Choose an option:
1. Add a book to shopping cart
2. View shopping cart
3. Remove a book from shopping cart
4. Checkout
5. List all books
6. Quit
Please select:
2
Your shopping cart contains the following book(s):
1. Computing Concepts with JAVA 8 Essentials
Choose an option:
1.
Add a book to shopping cart
2.
View shopping cart
3.
Remove a book from shopping cart
4.
Checkout
5.
List all books
6.
Quit
Please select:
3
Your shopping cart contains the following book(s):
1.
Computing Concepts with JAVA 8 Essentials
2.
Cancel
What do you want to remove:
1
Item removed from shopping cart