# What should the program look like for this situation

Printable View

• 02-22-2009, 03:13 AM
megironi
What should the program look like for this situation
A catering service has the following schedule of charges for meals that it serves to groups and discounts according to how many were ordered:

Meal Cost Each Discount If order more than

Breakfast \$5.50 10% 10

Lunch \$9.50 15% 15

Dinner \$16.50 12% 8

The program should compute, for each category, the cost of the meals received in each category, the discount, and the final cost of the meals. It should then compute the total cost of all meals, add a 10% sates tax and print the total due. Be sure to format the output well and include appropriate comments in your program.

1. Enter the number of Breakfast ordered: 30

2. Enter the number of Lunch ordered: 28

3. Enter the number of Dinner ordered: 25

My Favorite Catering Service Receipt:

Meal Quantity Cost Discount Cost After Discount

Breakfast 30 \$165.00 \$16.50 \$148.50

Lunch 28 \$266.00 \$39.90 \$226.10

Dinner 25 \$412.50 \$49.50 \$363.00

Total: \$737.60

Sales Tax: \$73.76

Total Due: \$811.36
• 02-22-2009, 03:44 AM
angryboy
Quote:

What should the program look like for this situation
you tell me, its your design.
• 02-22-2009, 04:42 AM
Fubarable
but thanks for posting your homework question. It's an interesting one.
• 02-22-2009, 05:58 AM
MK12
Why should we do your homework.. how about if I asked you this?
Quote:

Thread Topic: "Help Please Urgent!!!!!!"
" I need someone to make me a very useful application that I can sell for a lot. I have no clue but you're all experts with nothing better to do than waste your time so get going and make it snappy. Email the fully functional code to blah@domain.com. I'm expecting this to be fast."
Of course it's an exaggeration, but you get the point. We will answer specific problems, but you have to make an effort at least first.
-MK12
• 02-22-2009, 12:16 PM
Eranga
Quote:

Originally Posted by angryboy
you tell me, its your design.

Yep, take a piece of paper and write your logic first. Then try to make a design for that logic, later you can convert it into a Java application.