Question: JAVA code: Task Specification You are to implement a book purchasing system, called Daintree. The system keeps a list of book titles that can be
JAVA code:

Task Specification You are to implement a book purchasing system, called Daintree. The system keeps a list of book titles that can be purchased, in both physical and ebook form. You have to keep track of how many copies of the physical books are available for each title. If the user tries to buy a (physical) book and there are no copies available, then the system outputs an error message. Some (not all) titles are available in ebook form. If the ebook exists for that title, then there is always a copy of the ebook available. All physical books cost $50.00; all ebooks cost $8.00. The user can request purchasing a book by giving the starting part of the title: the system then lists all books that start with that string, along with the number of copies and ebook availability. The user enters which form of the book they want: if the book is available then it gets added to the user's "shopping cart. Matching for titles is not case-senstive. Once the user is finished selecting books, they "checkout and pay"; the system prints the final total price, and updates the number of copies of each book. The user has the option of viewing their shopping cart and removing books. The user has the option of printing the full list of books and their availability. The user can quit the system (before or after paying). when the user searches for a book, only the first match is displayed; the Shopping Cart can only hold one book any further choices replace it). HINTS: 1. One way to manage books is to use 3 arrays: a. array of String that stores the titles; b. array of int that is the number of physical copies of the title at that index; c. array of boolean that is the availability of ebook of the title at that index. 2. the String methods startsWith() and toUpperCase()/toLowerCase() will probably be useful. The system should present a menu with the following options: 1. Add a book to shopping cart 2. View shopping cart 3. Remove a book from shopping cart 4. Checkout 5. List all books 0. Quit Please make a selection: 5 The following titles are available: 2. Absolute Java, 4 copies, no ebook 3. JAVA: How to Program, 0 copies, ebook available 4. Computing Concepts with JAVA 3 Essentials, 5 copies, no ebook 5. Java Software Solutions, 5 copies, no ebook 6. Java Program Design, 1 copy, ebook available
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
