Question: Reposting for help yet again here, because someone keeps answering with the same solution which disregards the noted requirements/restrictions. I need help, but PLEASE note
Reposting for help yet again here, because someone keeps answering with the same solution which disregards the noted requirements/restrictions. I need help, but PLEASE note the requirements in BOLD below (Code needs to be in JAVA, using JOptionPane for input/output, show as a ONE-DIMENSIONAL array, and should only be using main method).
Scenario:
You are asked to write a program for a bookstore that will be launching soon. The bookstore has three types of items: textbooks, apparels, and gift items. Each item has an item name and sales price. Initially, the store can have a maximum of 100 items. The bookstore is offering an opening discount on items as follows:
Item Type | Discount Textbook 3% Apparel 5% Gift items 10%
Create a program that will keep track of the bookstore items. Your program will continuously prompt the user to enter items, one at a time, until the user has indicated that they are finished entering items. For each item, your program must also prompt for the type of the item to determine the discount amount and calculate the sales price. You must validate the item type, name and price providing an error message and re-prompting the user if an invalid input is entered. Keep track the number of items in each category.
Once the items are entered, the program should allow the user to search an item by its name. If the item is found, it will show the sales price of the item, otherwise it will display a message that the item is not available at this store.
At the end, print a well formatted report listing all the items and their associated price, the total number of items in each type and the average price of all items.
Other Requirements: Your solution must demonstrate the concept of one-dimensional arrays. Your solution must not use methods other than main. They are not required for this assignment. Your solution must not import any Java library other than JOptionPane, including java.util.Arrays. Your solution must contain appropriate validation. Try to think about what might be considered appropriate as you are designing your solution beyond what has already been explicitly provided.
Solution Implementation: Write a well-documented, efficient Java program that implements the algorithm you identified. Include appropriate documentation as identified in the documentation expectations document.
Note: You must use the JOptionPane class for input/output. Additionally, if you use System.exit as shown in the textbook, it may only be used as the absolute last line in the program. You may not use System.exit, or any variant that exits the program in the middle of the program. The program should be designed to only exit once the algorithm has finished.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
