Java Reference
In-Depth Information
Input quantity of item 1:
10
Input price of item 1:
0.50
Input name of item 2:
diet soda
Input quantity of item 2:
3
Input price of item 2:
1.25
Input name of item 3:
chocolate bar
Input quantity of item 3:
20
Input price of item 3:
0.75
Your bill:
Item Quantity Price Total
lollipops 10 0.50 5.00
diet soda 3 1.25 3.75
chocolate bar 20 0.75 15.00
Subtotal 23.75
6.25% sales tax 1.48
Total 25.23
11. Write a program that calculates the total grade for three classroom exercises as a
percentage. Use the DecimalFormat class to output the value as a percent. The
scores should be summarized in a table. Input the assignment information in this
order: name of assignment (may include spaces), points earned (integer), and total
points possible (integer). The percentage is the sum of the total points earned di-
vided by the total points possible. Sample input and output is shown as follows:
Name of exercise 1:
Group Project
Score received for exercise 1:
10
Total points possible for exercise 1:
10
VideoNote
Solution to
Programming
Project 2.11
Name of exercise 2:
Homework
Score received for exercise 2:
7
Total points possible for exercise 2:
12
Search WWH ::




Custom Search