Question: In this programming challenge, you will simulate a cash register. The client program will work like this: You will use an array or ArrayList to

 In this programming challenge, you will simulate a cash register. The

In this programming challenge, you will simulate a cash register. The client program will work like this: You will use an array or ArrayList to stimulate a shopping cart. You will add RetailItem objects to your shopping cart. The CashRegister class will process the RetailItems in your cart Create a sales receipt that is an itemization of all the items in your shopping cart and a total cost for all items properly formatted. Use the following UML diagrams to create the class objects, RetailItem and CashRegister. The classes should have appropriate constructor(s), accessor, and mutator methods. A RetailItem holds the data about an Item in a retail store. The class should have the following fields: description: The description field references a String objects that holds a brief description of the Item. price: The price field is a double that holds the item's retail price numOfpurchase: The numOfpurchase field is an int that holds the quantity of items in cart A CashRegister object will process each RetialItem to determine cost of item with tax. It will stimulate the sale of a retail Item. It should have a constructor that accepts a RetailItem object as an argument. In addition, the class should have the following instance variables and methods: retailPrice: The retailPrice field will store the price of the RetialItem being passed to constructor. quantity: The quantity field will store the quantity of the current RetailItem in your cart. The subTotal method should return the subtotal of the sale, which is the quantity multiplied by the retail price. The getTax method should return the amount of sales tax on the purchase. The sales tax rate is 6 percent of a retail sale. The getTotal method should return the total of the sale, which is the subtotal plus the sales tax. The client program should create an array or ArrayList of 10 RetailItem objects. The client should process your cart and determine an Itemized sales receipt that shows total for each Item and total for your shopping cart, including a separate line for total tax paid. Make sure to use class methods for tasks in your client program. You can use a file, coded or interactive input for all retail items. Make sure to include documentation of classes and client and output that has tested your program completely before submitting. Sample Output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!