Question: Question 2 A software company sells a software package for $99. Discount is available according to how many packages were bought. They are as
Question 2 A software company sells a software package for $99. Discount is available according to how many packages were bought. They are as follows: Quantity bought < 10 10-19 20-29 30-39 >= 40 % Discount No discount 2.5% 5% 7.5% 10% Write a program in Java to read a value from the keyboard for the number of packages sold and then display the following with appropriate descriptions: The numer of packages sold The cost before discount The % discount and the discount amount (if there is any) The net price to pay Remember to validate the input value. If it is an invalid value (less than or equal to 0) then display an error message else display information described above. You should use functional decomposition in your program. Hence, you should have functions/methods to do a particular task. First show your high-level algorithm. Which will consitute your functions/methods and then refine the algorim to be more specific.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
