Question
Assignment 10.1: Making a Receipt (10 pts) When you are finished, submit your program. Welcome to Java Cookies! Allow me to assist you with your
Assignment 10.1: Making a Receipt (10 pts)
When you are finished, submit your program.
Welcome to Java Cookies! Allow me to assist you with your order. We sell the following flavors: Mocha Cookies -- $1.95 each Cocoa Cookies -- $2.15 each Coffee Chai Cookies -- $2.05 each Java Cookies (Chocolate Chocolate Chip with Macadamia) -- $1.85 each Please enter the number of Mocha Cookies: 3 Please enter the number of Cocoa Cookies: 2 Please enter the number of Coffee Chai Cookies: 5 Please enter the number of Java Cookies: 1 You Ordered the Following: Mocha Cookies: 3 @ $1.95 each... $5.85 Cocoa Cookies: 2 @ $2.15 each... $4.30 Coffee Chai Cookies: 5 @ $2.05 each... $10.25 Java Cookies: 1 @ $1.85 each... $1.85
Total: $22.25
Thank you for your order! Please come again!
- Let's write a program to create a receipt.
- Open a new class called Cookies.java.
- This program will simulate an online cookie business and print out a receipt to the customer for their order.
- The program should follow the exact formatting shown below, including spacing and indentation.
- Hint: Remember "\t"?
- Note that you will need to print out exactly 2 decimal places for the dollar values.
- When you are finished, submit your program.
Welcome to Java Cookies! Allow me to assist you with your order. We sell the following flavors: Mocha Cookies -- $1.95 each Cocoa Cookies -- $2.15 each Coffee Chai Cookies -- $2.05 each Java Cookies (Chocolate Chocolate Chip with Macadamia) -- $1.85 each Please enter the number of Mocha Cookies: 3 Please enter the number of Cocoa Cookies: 2 Please enter the number of Coffee Chai Cookies: 5 Please enter the number of Java Cookies: 1 You Ordered the Following: Mocha Cookies: 3 @ $1.95 each... $5.85 Cocoa Cookies: 2 @ $2.15 each... $4.30 Coffee Chai Cookies: 5 @ $2.05 each... $10.25 Java Cookies: 1 @ $1.85 each... $1.85
Total: $22.25
Thank you for your order! Please come again!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started