Question: Write a program using only method and array using java language and you can use only method or only array 3- Write a program that

Write a program using only method and array using java language and you can use only method or only array 

3- Write a program that prompts the user to give the sequence
of 3 items. For each given item the program should ask the

3- Write a program that prompts the user to give the sequence of 3 items. For each given item the program should ask the use to enter the type and the quantity (see the sample run) and calculate and display the subtotal of this item and add it to the total. The program should then compute the discount amount of the bill and the final cost: Total = sum of subtotals of all items Final Cost = Total - discount amount The program should display the Total, the discount amount and the final cost as follow: Sample run 1: 3/4 Enter an item type number: 1 Enter the item quantity: 10 Enter an item type number: 3 Enter the item quantity: 10 Enter an item type number: 2 Enter the item quantity: 5 The Total is: $134.0 The discount amount is: $13.4 The total due cost is: $120.6

Step by Step Solution

3.39 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javaio import javautilScanner public class Main Scanner sc new Scanner Syst... View full answer

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

Document Format (2 attachments)

PDF file Icon

63648a6e8a2e5_238491.pdf

180 KBs PDF File

Word file Icon

63648a6e8a2e5_238491.docx

120 KBs Word File

Students Have Also Explored These Related Programming Questions!