Computer Science, asked by abcd8jayta0hid, 1 year ago

Program to Create the Customer's Bills for a Company
Write a program to create the customer's bills for a company. - The company sells only five different products: Notebook, Network Switch, Wireless Router, External Hard Drive, and Computer DVD Drive. - The unit prices are $900.00, $220, $135.20, $300.00, and $250.00, respectively. The program must read the quantity of each piece of equipment purchased from the keyboard. It then calculates the cost of each item, the subtotal, and the total cost after an 8.75% sales tax. After calculating the total amount for the purchased products the customer pays for the amount. Create the program in such a way that you can enter the full amount given by the customer and it calculates and gives you the amount to be given to the customer as change. The input data consist of a set of integers representing the quantities of each item sold. These integers must be input into the program in a user-friendly way that is, the program must prompt the user for each quantity as shown below. The numbers in boldface show the user's answers.

Answers

Answered by vishnureddy
0
TOTAL

Define constants for the unit prices and the tax rate. Use integer variables to store the quantities for each item. Use floating-point variables to store the total price of each item, the bill subtotal, the tax amount and and the total amount of the bill. Run your program two times with the following data:

Set 1 -> 2 1 4 1 2

Set 2 -> 3 0 2 0 21

Format the output adequately showing the 4 columns (QTY, DESCRIPTION, UNIT PRICE, TOTAL PRICE) in a single row. Use System.out.printf for output.

Similar questions