1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Svetllana [295]
3 years ago
8

(Java) In the ChiliToGo program in Exercise 12, the costs to produce an adult meal and a child’s meal are $4.35 and $3.10, respe

ctively. Adult meals are sold for $7 and children's meals are sold for $4. Modify the ChiliToGo program to display the total profit for each type of meal as well as the grand total profit.
import java.util.Scanner;
class ChiliToGoProfit
{
public static void main(String[] args) {
// Modify the code below
final double ADULT_PRICE = 7;
final double CHILD_PRICE = 4;
int adultMeals;
int childMeals;
double totalAdult, totalChild, grandTotal;
Scanner input = new Scanner(System.in);
System.out.print("Enter number of adult meals ordered >> ");
adultMeals = input.nextInt();
System.out.print("Enter number of child meals ordered >> ");
childMeals = input.nextInt();
totalAdult = adultMeals * ADULT_PRICE;
totalChild = childMeals * CHILD_PRICE;
grandTotal = totalAdult + totalChild;
System.out.println(adultMeals + " adult meals were ordered at " + ADULT_PRICE + " each.");
System.out.println(" Total is " + totalAdult);
System.out.println(childMeals + " child meals were ordered at " + CHILD_PRICE + " each.");
System.out.println(" Total is " + totalChild);
System.out.println("Grand total for all meals is " + grandTotal);​
Computers and Technology
1 answer:
vichka [17]3 years ago
5 0

Answer: No estoy segura de cuál es la respuesta

Explanation:

You might be interested in
Which osi reference model layer is responsible for transmitting information on computers connected to the same local area networ
Nikolay [14]
The data link layer (layer 2)
7 0
3 years ago
Select the correct answer from each drop-down menu.
DerKrebs [107]

Answer:

?

Explanation:

?!?!

3 0
3 years ago
PLEASE HELP!! In Tynker does anyone know how to do the physics cannon assignment?
madam [21]

Answer: really u want help with a game

Explanation:

7 0
3 years ago
Read 2 more answers
Write a function call using the ebay_fee() function to determine the fee for a selling price of 15.23, storing the result in a v
Sholpan [36]

Answer:

my_fee = ebay_fee(15.23)

Explanation:

Functions are sections of a program that provide a particular outlined procedure, we call a function by writing its name followed by a pair of parenthesis, the function may be designed in a way that it accepts arguments while been called, Like the case of the ebay_fee(15.23). the number within the pair of parenthesis id the argument, and it is the data that the functions will process and return a value afterwards.

7 0
4 years ago
_____ technology is a broadband technology that can use the wires of a local telephone network.
Alenkasestr [34]
DSL  - DSL stands for Digital Subscriber Line. This technology came after the Dial Up technology for connecting to the Internet. The big disadvantage of Dial-up technology was that when you were talking on the phone, you could not use the Internet and vice-versa. However, although DSL technology used the regular telephone line , it worked on frequencies different from the telephone. So you could use the phone and the Internet at the same time.
5 0
4 years ago
Other questions:
  • Sponse that best answers the question.
    11·2 answers
  • Write an application that displays a series of at least five student ID numbers (that you have stored in an array) and asks the
    5·1 answer
  • In order for Dr. Reynolds to send a CPOE from her office computer system to the computer system at the local hospital, a/an ____
    5·1 answer
  • Suppose that you have been running an unknown sorting algorithm. Out of curiosity, you once stopped the algorithm when it was pa
    8·1 answer
  • Which of the following statements is true?
    5·1 answer
  • What are two reasons for converting a document or record into a digitized format?
    6·1 answer
  • Please helpppppppppp​
    8·1 answer
  • From your analysis, do you think you’ve seen all of the servers and hosts that make up the Amazon e-commerce site? How does Amaz
    12·1 answer
  • When you are hired to develop a system for an organization. Is it important to follow all the requests/wants of the system owner
    14·1 answer
  • Lucy wants to access the webpage. She is using her computer to access the webpage. What types of information will be in one fram
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!