PLEASE USE JAVA AND JOPTIONPANE TO SOLVE THE PROBLEM!!!
GMU is offering a one-day seminar on "Financial Responsibility as it Relates to Budgeting". This class is intended to teach each student the value of a budget. You have been tasked to build object-oriented solution to add, remove, and track items in a shopping cart. To demonstrate budgeting, a cart must have a subtotal no greater than $2000.00 dollars and a maximum of 15 items.
For each Item, the solution should capture name, price, and various competitor prices. An Item can only
be created when a name and price is provided.
- A name of the Item must be validated according to the following rules:
- Only letters can be used
- Must be at least 5 characters long
- Each Item may hold up to 3 different competitor prices
- For example, the price of the item on Amazon, Target, and Walmart
Some items have a warranty. The object-oriented solution you create must allow for the creation of a
Warranty Item. A Warranty Item functions the same way as regular Item, but they must track the
duration of the warranty. A Warranty Item can only be created when a name, price, and warranty
duration is provided. An item's warranty duration is specified in terms of months 12, 24, or 36. The
subtotal of a Warranty Item must include the cost of the warranty, which is the warranty length
specified multiplied by $4. For example, if an item has a cost of $199, and has a 12-month warranty then
the subtotal for that item is $247 ($199 + (12 X $4)).
Based on the provided information, build an efficient, object-oriented solution with good design
principles that will allow a user to track the items added and removed from a cart.
To build the program, the solution should have a menu with the following capabilities:
Add Item: This capability will allow a user to add an Item. The user should specify if the item is an Item or a Warranty Item and either provide name, price, and competitor prices or name, price, warranty duration, and competitor prices.
Remove Item: This capability will allow a user to select any Item, and remove it from the cart
Print Cart Subtotal: This capability will display the number of items in the cart, their combined subtotal, and print a well-formatted report for each item. Each item's cost should be the lowest price between the actual price and competitor's price
Print Total Savings Amount: This capability will display the total savings of the cart and each item that the user saved on. The saved amount for each item is the actual price minus the lowest
competitor's price
Quit: This capability will allow a user to end working with the solution. It will print a message thanking the user for using the solution.
- Sample output:
- Your solution must demonstrate use of arrays
Your solution must demonstrate the concept of
inheritance
.
- Your solution must be designed as a modular solution using methods other than main, with each method performing one task.
PLEASE USE JAVA AND JOPTIONPANE TO SOLVE THE PROBLEM!!!
AND List and describe the class(es) needed to solve the problem! Thank you a lo