You work in a local gift shop that is currently running a large sale. You have been asked to create a program to calculate the total of a user's purchases and determine if they qualify for a discount....


You work in a local gift shop that is currently running a large sale. You have been asked to create a program to calculate the total of a user's purchases and determine if they<br>qualify for a discount. Use the following steps to create the program:<br>1. Ask the user the price of the item they wish to purchase.<br>2. Ask the user the quantity they wish to purchase.<br>3. Ask the user to enter the name of the item they wish to purchase.<br>4. Calculate the subtotal of the purchase. The subtotal of the purchase is calculated by the following equation:<br>Subtotal = Price * Quantity<br>5. Calculate the discount amount using the equation and table below:<br>Subtotal<br>Discount<br>Under $25<br>5% discount<br>$25 but not more than $75.<br>10% discount<br>Over $75<br>15% discount<br>Discount Amount = Subtotal * (Discount/100)<br>6. Calculate the discounted cost of the purchase. The discounted cost of the purchase is calculated by the following equation:<br>Discounted Cost - Subtotal - Discount Amount<br>7. Create a String object in memory to hold the text:

Extracted text: You work in a local gift shop that is currently running a large sale. You have been asked to create a program to calculate the total of a user's purchases and determine if they qualify for a discount. Use the following steps to create the program: 1. Ask the user the price of the item they wish to purchase. 2. Ask the user the quantity they wish to purchase. 3. Ask the user to enter the name of the item they wish to purchase. 4. Calculate the subtotal of the purchase. The subtotal of the purchase is calculated by the following equation: Subtotal = Price * Quantity 5. Calculate the discount amount using the equation and table below: Subtotal Discount Under $25 5% discount $25 but not more than $75. 10% discount Over $75 15% discount Discount Amount = Subtotal * (Discount/100) 6. Calculate the discounted cost of the purchase. The discounted cost of the purchase is calculated by the following equation: Discounted Cost - Subtotal - Discount Amount 7. Create a String object in memory to hold the text: "Discount 8. Display the text at the top of the output (See Sample Input and Output) 9. Display the item name, price, quantity, subtotal, discount, and total. 10. Format the output of the program exactly as shown in the sample output (including indentation, spacing, and number of decimal places) ation Utility". Sample Input and Output (formatting, spacing, and indentation should be as shown below) What is the price of the item you wish to purchase? 17.99 What is the quantity you wish to purchase? 3 What is the name of the item? T-Shirt Discount Calculation Utility Item Name: T-Shirt Price: $17.99 Quantity: 3. Subtotal: $53.97 Discount: $5.40 Discounted Cost: $48.57
Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here