[Solved] Design a CashRegister

$25

File Name: Design_a_CashRegister.zip
File Size: 197.82 KB

SKU: [Solved] Design a CashRegister Category: Tag:
5/5 - (1 vote)

5/5 – (3 votes)

Design a CashRegister class that can be used with the InventoryItem class discussed in the chapter. 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 subtotal.

5. Compute the 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 program. Feel free to modify the InventoryItem class in any way necessary.

Be sure and loop the program so that multiple items can be purchases

Input Validation: Do not accept a negative value for the quantity of items being purchased.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Design a CashRegister
$25