Question: IN JAVA PLS! :) Design a CashRegister class that can be used with the InventoryItem class see description above. The CashRegister class should perform the

IN JAVA PLS! :)

IN JAVA PLS! :) Design a CashRegister class that can be used

Design a CashRegister class that can be used with the InventoryItem class see description above. The CashRegister class should perform the following: 1. Ask the user for the item and quantity being purchased. 2. Get the items cost from the InventoryItem object. 3. Add a 30% profit to the cost to get the items unit price. 4. Multiply the unit price times the quantity being purchased to get the purchase sub-total. 5. Compute a 6% sales tax on the subtotal to get the purchase total.

6. Display the purchase subtotal, tax, and total on the screen. 7. Subtract the quantity being purchased from the onHand variable of the InventoryItem class object.

Implement both classes in a complete Java program. Input Validation: Do not accept a negative value for the quantity of items being purchased. Demonstrate that Register class will work, you may display a menu or create a loop for the user to start and stop.

Inventory Class Design an I nvent or y class that can hold information and calculate data for items in a retail store's inventory. The class should have the following private member variables: The class should have the following public member functions: Demonstrate the class in a driver program. Input Validation: Do not accept negative values for item number, quantity, or cost

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!