Question: i am continuously getting 0% on this. the questions is on the left hand side. thanks. delmarlearning.com + Instructions ChillToGoProfit.java 1 import java.util.Scanner; 2 public
delmarlearning.com + Instructions ChillToGoProfit.java 1 import java.util.Scanner; 2 public class ChiliToGoProfit { 3 public static void main(String args[]){ 4 In the chtliToGo program in Exercise 12, the costs to produce an adult meal and a child's meal are $4.35 and $3.10, respectively. Adult meals are sold for $7.00 and children's meals are sold for $4.00. Modify the Chilltogo program to display the total profit for each type of meal as well as the grand total profit. An example of the program is shown below: 5 Scanner in new Scanner(System.in); 6 System.out.print("Enter the number of child meals: "); 7 int childMeals = in.nextInt(); 8 System.out.print("Enter the number of adult meals: "); 9 int adult Meals = in.nextInt(); 10 11 double childMealsPrice = childMeals 43 12 double adultMealsPrice = adultMeals *7; 13 14 System.out.println("Total price of child meals = $" + childMealsPrice); 15 System.out.println("Total price of adult meals = $" + adultMealsPrice); 16 System.out.println("Total amount = $" + (childMealsPrice + adultMealsPrice)); 17 18 ) 19 20 Enter number of adult neals ordered >> 10 Enter number of child meals ordered >> 5 10 adult neals were ordered at 7.0 each Total is 70.0 5 child neals were ordered at 4.0 each. Total is 20.0 Grand total for all meals is 90.0 Profits: Adult profit is 26.5 Child profit is 4.5 Total profit is 31.0 MH
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
