ask1: Arithmetic Operations (Java)                                  An electronics store is giving discount based on the number of items purchased as given in the table below: Number of items Discount Up to 5 0 >5 but <10 5% >10 but <15 10% >15 but <20 15% >20 20%   Write a Java application to perform the following: Prompt the user for entering the number of items purchased and the total amount; Calculate the net amount to be paid after discount; Output the summary of the task as follows:   Total number of items and bill amount; The discount in %; The net amount to be paid in three significant digits after the decimal point.

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 12PE
icon
Related questions
Question
100%

Task1: Arithmetic Operations (Java)                                 

An electronics store is giving discount based on the number of items purchased as given in the table below:

Number of items

Discount

Up to 5

0

>5 but <10

5%

>10 but <15

10%

>15 but <20

15%

>20

20%

 

Write a Java application to perform the following:

  • Prompt the user for entering the number of items purchased and the total amount;
  • Calculate the net amount to be paid after discount;
  • Output the summary of the task as follows:

 

  • Total number of items and bill amount;
  • The discount in %;
  • The net amount to be paid in three significant digits after the decimal point.
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT