Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

i am continuously getting 0% on this. the questions is on the left hand side. thanks. image text in transcribed
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

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

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions

Question

Has the priority order been provided by someone else?

Answered: 1 week ago

Question

What about leadership lessons from particularly good or bad bosses?

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago