Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need java code for tjis scenario. GMU is offering a one-day seminar on Financial Responsibility as it Relates to Budgeting. This class is intended to

need java code for tjis scenario.

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 create an object-oriented solution to add, remove, and track the subtotal of items in a shopping cart. To demonstrate budgeting, a cart must have a subtotal no greater than $2000.00 dollars and a maximum of 30 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: o Only letters can be used

o Must be at least 5 characters long Each Item may hold up to 3 different competitor prices

o 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, create 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 do this, 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.

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

Auditing Cases An Interactive Learning Approach

Authors: Mark S Beasley, Frank A. Buckless, Steven M. Glover, Douglas F Prawitt

7th Edition

0134421825, 9780134421827

More Books

Students also viewed these Programming questions

Question

Calculate the missing value.

Answered: 1 week ago

Question

Calculate the missing value.

Answered: 1 week ago