Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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