Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA Habitat for Humanity hosted a one-day fund raiser to assist local families. The charity sold chicken dinners. The price of an adult meal was

JAVA

Habitat for Humanity hosted a one-day fund raiser to assist local families. The charity sold chicken dinners. The price of an adult meal was $10.00. The price of a child's meal was $5.00. Write a program that accepts the total number of meals sold for both groups. Display the total meals sold for the adult meals and the total meals sold for the children's meals. Display the total meals sold for all groups. Save the program as instructed. See the sample program below.

Step 1:

Ask the user for the number of adult meals.

Step 2:

Ask the user for the number of children's meals.

Step 3:

Calculate the price of the adult meals.

Step 4:

Calculate the price of the children's meals.

Step 5:

Display the price of the adult meals.

Step 6:

Display the price of the children's meals.

Step 7:

Display the price of all meals (adult meals plus the children's meals).

Step 8:

Your program should include appropriate comments. The first comment should be: This program was created by: Add your name here

Sample Input and Output (user input is in bold)

Do not modify the output. The output should display as shown below. Note: the input below is only an example of user input. Your program should be able to calculate whatever amount the user enters.

Enter the number of adult meals sold: 200 Enter the number of children's meals sold: 100 Adult Dinners: $2000.00 Children's Dinners: $500.00 Total Meals: $2500.00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions