SlideShare une entreprise Scribd logo
1  sur  3
A store will sell:
Hot Dog for $3.75
Fries for $2.25
Cokes for $.80
If a customer orders 3 or more of any of the above items, they will receive a 10% discount for
that item (but not the entire order).
Requirements
Create constants for the cost of hotdog, fries, cokes, and sales tax.
final double COST_hotdog = 3.75;
Prompt the customer for the number of hotdog, fries, and cokes.
If a customer orders 3 or more of any item, they will receive a 10% discount for that item.
Display the number of each item ordered, the subtotal, tax, and total cost. Sales tax of 5% (use a
constant)
Prompt the user for payment and then compute the amount of change due back.
Print format method to display the dollar amounts. The following statement prints out the
subtotal using 6 characters with 2 decimal places: 53.70.
System. out .printf("Â Â Â Â Â subtotal: %6.2f ", sum);
Use the following command to compute the amount of pennies owed back to the customer:
Use the Math.round( double val ).
How many hotdog do you want?:
How many order of fries do you want?:
How many cokes do you want?:
Number of Hotdog .....
Number of Fries .......
Number of Cokes .......
subtotal:
tax:
total:
Enter payment:
We owe you:
dollars:
quarters:
dimes:
nickels:
pennies:
How many hotdog do you want?:
How many order of fries do you want?:
How many cokes do you want?:
Number of Hotdog .....
Number of Fries .......
Number of Cokes .......
subtotal:
tax:
total:
Enter payment:
We owe you:
dollars:
quarters:
dimes:
nickels:
pennies:
Solution
Thank You!!!

Contenu connexe

Plus de janettjz6sfehrle

01 (10 points) Create a file called 01-py- This file will use one posi.docx
01 (10 points) Create a file called 01-py- This file will use one posi.docx01 (10 points) Create a file called 01-py- This file will use one posi.docx
01 (10 points) Create a file called 01-py- This file will use one posi.docxjanettjz6sfehrle
 
0-05) (Give three decimal places).docx
0-05) (Give three decimal places).docx0-05) (Give three decimal places).docx
0-05) (Give three decimal places).docxjanettjz6sfehrle
 
-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docx
-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docx-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docx
-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docxjanettjz6sfehrle
 
-Reuploaded since the solution I got before was not what the assignmen.docx
-Reuploaded since the solution I got before was not what the assignmen.docx-Reuploaded since the solution I got before was not what the assignmen.docx
-Reuploaded since the solution I got before was not what the assignmen.docxjanettjz6sfehrle
 
-Please give me some time to put away my laptop- We can have a convers.docx
-Please give me some time to put away my laptop- We can have a convers.docx-Please give me some time to put away my laptop- We can have a convers.docx
-Please give me some time to put away my laptop- We can have a convers.docxjanettjz6sfehrle
 
-H1-3- (inverse- py) Write a complete Python program- It should prompt.docx
-H1-3- (inverse- py) Write a complete Python program- It should prompt.docx-H1-3- (inverse- py) Write a complete Python program- It should prompt.docx
-H1-3- (inverse- py) Write a complete Python program- It should prompt.docxjanettjz6sfehrle
 
-Ferns differ from mosses in having A function of the roots is to abso.docx
-Ferns differ from mosses in having A function of the roots is to abso.docx-Ferns differ from mosses in having A function of the roots is to abso.docx
-Ferns differ from mosses in having A function of the roots is to abso.docxjanettjz6sfehrle
 
-Choose- A line that can be applied above- below or to the sides of a.docx
-Choose- A line that can be applied above- below or to the sides of a.docx-Choose- A line that can be applied above- below or to the sides of a.docx
-Choose- A line that can be applied above- below or to the sides of a.docxjanettjz6sfehrle
 
-Conley is the CEO of a major academic med- ical center in the midwest.docx
-Conley is the CEO of a major academic med- ical center in the midwest.docx-Conley is the CEO of a major academic med- ical center in the midwest.docx
-Conley is the CEO of a major academic med- ical center in the midwest.docxjanettjz6sfehrle
 
-10 Points- Description In this assignment you will translate a system.docx
-10 Points- Description In this assignment you will translate a system.docx-10 Points- Description In this assignment you will translate a system.docx
-10 Points- Description In this assignment you will translate a system.docxjanettjz6sfehrle
 
----------Evaluator-java---------------- package evaluator- import j.docx
----------Evaluator-java---------------- package evaluator-   import j.docx----------Evaluator-java---------------- package evaluator-   import j.docx
----------Evaluator-java---------------- package evaluator- import j.docxjanettjz6sfehrle
 
---During period of illness - infection can easily be spread- It is al.docx
---During period of illness - infection can easily be spread- It is al.docx---During period of illness - infection can easily be spread- It is al.docx
---During period of illness - infection can easily be spread- It is al.docxjanettjz6sfehrle
 
- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docx
- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docx- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docx
- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docxjanettjz6sfehrle
 
- yoars (Round to two decimal places as needed).docx
- yoars (Round to two decimal places as needed).docx- yoars (Round to two decimal places as needed).docx
- yoars (Round to two decimal places as needed).docxjanettjz6sfehrle
 
- This person- role- or group will be a subject matter expert who can.docx
- This person- role- or group will be a subject matter expert who can.docx- This person- role- or group will be a subject matter expert who can.docx
- This person- role- or group will be a subject matter expert who can.docxjanettjz6sfehrle
 
- Interpret the data in each of the cases using 2 different nontechnic.docx
- Interpret the data in each of the cases using 2 different nontechnic.docx- Interpret the data in each of the cases using 2 different nontechnic.docx
- Interpret the data in each of the cases using 2 different nontechnic.docxjanettjz6sfehrle
 
- Python Programming Section 01 Spring 2023 CO Write a Python program.docx
- Python Programming Section 01 Spring 2023 CO Write a Python program.docx- Python Programming Section 01 Spring 2023 CO Write a Python program.docx
- Python Programming Section 01 Spring 2023 CO Write a Python program.docxjanettjz6sfehrle
 
(Total marks for sub-question 16-5- ) Suppose that (Yt) is a (weakly).docx
(Total marks for sub-question 16-5- ) Suppose that (Yt) is a (weakly).docx(Total marks for sub-question 16-5- ) Suppose that (Yt) is a (weakly).docx
(Total marks for sub-question 16-5- ) Suppose that (Yt) is a (weakly).docxjanettjz6sfehrle
 

Plus de janettjz6sfehrle (20)

01 (10 points) Create a file called 01-py- This file will use one posi.docx
01 (10 points) Create a file called 01-py- This file will use one posi.docx01 (10 points) Create a file called 01-py- This file will use one posi.docx
01 (10 points) Create a file called 01-py- This file will use one posi.docx
 
0-05) (Give three decimal places).docx
0-05) (Give three decimal places).docx0-05) (Give three decimal places).docx
0-05) (Give three decimal places).docx
 
-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docx
-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docx-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docx
-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docx
 
-Reuploaded since the solution I got before was not what the assignmen.docx
-Reuploaded since the solution I got before was not what the assignmen.docx-Reuploaded since the solution I got before was not what the assignmen.docx
-Reuploaded since the solution I got before was not what the assignmen.docx
 
-Please give me some time to put away my laptop- We can have a convers.docx
-Please give me some time to put away my laptop- We can have a convers.docx-Please give me some time to put away my laptop- We can have a convers.docx
-Please give me some time to put away my laptop- We can have a convers.docx
 
-H1-3- (inverse- py) Write a complete Python program- It should prompt.docx
-H1-3- (inverse- py) Write a complete Python program- It should prompt.docx-H1-3- (inverse- py) Write a complete Python program- It should prompt.docx
-H1-3- (inverse- py) Write a complete Python program- It should prompt.docx
 
-Ferns differ from mosses in having A function of the roots is to abso.docx
-Ferns differ from mosses in having A function of the roots is to abso.docx-Ferns differ from mosses in having A function of the roots is to abso.docx
-Ferns differ from mosses in having A function of the roots is to abso.docx
 
-Choose- A line that can be applied above- below or to the sides of a.docx
-Choose- A line that can be applied above- below or to the sides of a.docx-Choose- A line that can be applied above- below or to the sides of a.docx
-Choose- A line that can be applied above- below or to the sides of a.docx
 
-Conley is the CEO of a major academic med- ical center in the midwest.docx
-Conley is the CEO of a major academic med- ical center in the midwest.docx-Conley is the CEO of a major academic med- ical center in the midwest.docx
-Conley is the CEO of a major academic med- ical center in the midwest.docx
 
-51003i+2i2.docx
-51003i+2i2.docx-51003i+2i2.docx
-51003i+2i2.docx
 
-2- num_list ---.docx
-2- num_list ---.docx-2- num_list ---.docx
-2- num_list ---.docx
 
-10 Points- Description In this assignment you will translate a system.docx
-10 Points- Description In this assignment you will translate a system.docx-10 Points- Description In this assignment you will translate a system.docx
-10 Points- Description In this assignment you will translate a system.docx
 
----------Evaluator-java---------------- package evaluator- import j.docx
----------Evaluator-java---------------- package evaluator-   import j.docx----------Evaluator-java---------------- package evaluator-   import j.docx
----------Evaluator-java---------------- package evaluator- import j.docx
 
---During period of illness - infection can easily be spread- It is al.docx
---During period of illness - infection can easily be spread- It is al.docx---During period of illness - infection can easily be spread- It is al.docx
---During period of illness - infection can easily be spread- It is al.docx
 
- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docx
- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docx- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docx
- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docx
 
- yoars (Round to two decimal places as needed).docx
- yoars (Round to two decimal places as needed).docx- yoars (Round to two decimal places as needed).docx
- yoars (Round to two decimal places as needed).docx
 
- This person- role- or group will be a subject matter expert who can.docx
- This person- role- or group will be a subject matter expert who can.docx- This person- role- or group will be a subject matter expert who can.docx
- This person- role- or group will be a subject matter expert who can.docx
 
- Interpret the data in each of the cases using 2 different nontechnic.docx
- Interpret the data in each of the cases using 2 different nontechnic.docx- Interpret the data in each of the cases using 2 different nontechnic.docx
- Interpret the data in each of the cases using 2 different nontechnic.docx
 
- Python Programming Section 01 Spring 2023 CO Write a Python program.docx
- Python Programming Section 01 Spring 2023 CO Write a Python program.docx- Python Programming Section 01 Spring 2023 CO Write a Python program.docx
- Python Programming Section 01 Spring 2023 CO Write a Python program.docx
 
(Total marks for sub-question 16-5- ) Suppose that (Yt) is a (weakly).docx
(Total marks for sub-question 16-5- ) Suppose that (Yt) is a (weakly).docx(Total marks for sub-question 16-5- ) Suppose that (Yt) is a (weakly).docx
(Total marks for sub-question 16-5- ) Suppose that (Yt) is a (weakly).docx
 

Dernier

Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 

Dernier (20)

Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 

Fast Food Order Calculator with Discounts and Change Due

  • 1. A store will sell: Hot Dog for $3.75 Fries for $2.25 Cokes for $.80 If a customer orders 3 or more of any of the above items, they will receive a 10% discount for that item (but not the entire order). Requirements Create constants for the cost of hotdog, fries, cokes, and sales tax. final double COST_hotdog = 3.75; Prompt the customer for the number of hotdog, fries, and cokes. If a customer orders 3 or more of any item, they will receive a 10% discount for that item. Display the number of each item ordered, the subtotal, tax, and total cost. Sales tax of 5% (use a constant) Prompt the user for payment and then compute the amount of change due back. Print format method to display the dollar amounts. The following statement prints out the subtotal using 6 characters with 2 decimal places: 53.70. System. out .printf("Â Â Â Â Â subtotal: %6.2f ", sum); Use the following command to compute the amount of pennies owed back to the customer: Use the Math.round( double val ). How many hotdog do you want?: How many order of fries do you want?: How many cokes do you want?: Number of Hotdog ..... Number of Fries ....... Number of Cokes .......
  • 2. subtotal: tax: total: Enter payment: We owe you: dollars: quarters: dimes: nickels: pennies: How many hotdog do you want?: How many order of fries do you want?: How many cokes do you want?: Number of Hotdog ..... Number of Fries ....... Number of Cokes ....... subtotal: tax: total: Enter payment: We owe you: dollars: