Computers and Technology

(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, respectively. 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);

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:00, Dweath50
1. so if i wanted to build a linux server for web services(apache) with 1cpu and 2 gb of memory.-operating at 75% of memory capacity2. a windows server with 2 cpu/ 4gb memory- operating at 85% of memory capacity3. a storage server with 1 cpu/ 2gb memory- operating at 85% of memory capacityhow much memory do i have to add for each server. so that the utilization rate for both cpu and memory is at a baseline of 60%."the details for the cpu like its processor or the memory's speed isnt to be concerned" yeah i kept asking my teacher if he's even sure about the but the whole class seems to be confused and the project is due in 3 days..this is a virtualization project where i have to virtualize a typical server into an exsi hypervisor.
Answers: 2
image
Computers and Technology, 22.06.2019 22:00, mrnotsosmart744
Discuss the ways in which electronic information associated with payments is addressed in terms of security. include encryption, secure sockets layers, and secure electronic transactions in your discussion. are there any other ways that consumers and businesses can keep their payment information secure in an electronic commerce environment? do you feel that your information is safe when conducting electronic business? why or why not?
Answers: 1
image
Computers and Technology, 24.06.2019 11:00, maddiiie128
Why is it uncommon for users to perform searches directly in database tables? a.)users are discouraged from interacting directly with tables because they might confuse tables with spreadsheets. b.) users are discouraged from interacting directly with tables because this may result in unintended changes to source data. c.)users do not have the technical skills required to perform searches directly in database tables. d.)users do not have the permissions required to perform searches directly in database tables.
Answers: 1
image
Computers and Technology, 24.06.2019 15:50, GreatBaconGamer
Subscribe to j p g a m e t u b e on you tube ?
Answers: 2
Do you know the correct answer?
(Java) In the ChiliToGo program in Exercise 12, the costs to produce an adult meal and a child’s mea...

Questions in other subjects:

Konu
English, 01.09.2019 04:10