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 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
import javaio import javautilScanner public class Main Scanner sc new Scanner Syst... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
63648a6e8a2e5_238491.pdf
180 KBs PDF File
63648a6e8a2e5_238491.docx
120 KBs Word File
