Question: Create a Java project named Ch2EX. The Huntington Boys and Girls Club is conducting a fundraiser by selling chili dinners to go. The price is

 Create a Java project named Ch2EX. The Huntington Boys and Girls

Create a Java project named Ch2EX. The Huntington Boys and Girls Club is conducting a fundraiser by selling chili dinners to go. The price is $7 for an adult meal and $4 for a child's meal (Use constants for prices). Write a class named ChiliToGo.java, that accepts the number of each type of meal ordered (using the Scanner class nextInt() method) and display the total money collected for adult meals, children's meals, and all meals. Save ChiliToGo.java *** Use printf() to print 2 decimal values *** Calculations are not performed in the print line. Calculate, save results in variables, print the variable from the print line. Expected Output: Enter number of adult meals ordered >> 4 Enter number of child meals ordered >> 3 Enter the number of adult meals ordered >> 4 Enter the number of child meals ordered >> 3 4 adult meals ordered at $7.00 each. Total is $28.00 3 child meals ordered at $4.00 each. Total is $12.00 Grand total for all meals is $40.00. 4 adult meals ordered at $7.00 each. Total is $28.00 3 child meals ordered at $4.00 each. Total is $12.00 Grand total for all meals is $40.00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!