subject

You have been hired by your favorite restaurant to create a food nutrition app for their customers to use. Before you get too far, the owner wants you to create a quick prototype. Your app should output a food name and the number of calories, then ask the customer how many they want. You need to ask them for 3 menu items. Once they tell you the quantity for the three menu items, you will output the meal’s total calories. Behind the scenes, you are going to create a Food class. Your Food class should use name and calories in the constructor (in that order!). You should create getters and setters for these variables. You also need a toString method that will be used in the line before you ask for the quantity. In addition to the Food class, you will have a FoodRunner class where you will have your main method. In here, you will create your three foods and ask for the quantities. After that, you can use the quantities to calculate and output the total. Sample output: Hamburgers have 600 calories. How many would you like? 2 French Fries have 350 calories. How many would you like? 1 Coke have 200 calories. How many would you like? 2 Your meal will have a total of 1950 calories?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:30
Hassan is writing his master’s thesis, which is a thirty-page document. he received some feedback from his professor in the form of comments, but does not see where the comments are. what is the fastest way for hassan to find the feedback?
Answers: 3
question
Computers and Technology, 24.06.2019 00:30
Asecurity policy is a a. set of guidlines b. set of transmission protocols c. written document d. set of rules based on standards and guidelines
Answers: 2
question
Computers and Technology, 24.06.2019 17:50
You will subnet the network address 172.31.103.0/24. the network has the following requirements: · room-114 lan will require 27 host ip addresses · room-279 lan will require 25 host ip addresses · room-312 lan will require 14 host ip addresses · room-407 lan will require 8 host ip addresses how many subnets are needed in the network topology?
Answers: 2
question
Computers and Technology, 24.06.2019 20:30
Drums installed, you would apply clicks of the parking brake to obtain a slight drag on both rear wheels
Answers: 1
You know the right answer?
You have been hired by your favorite restaurant to create a food nutrition app for their customers t...
Questions
question
Mathematics, 24.02.2020 06:38
question
Social Studies, 24.02.2020 06:38
question
Biology, 24.02.2020 06:38
question
Mathematics, 24.02.2020 06:38
question
Mathematics, 24.02.2020 06:39
Questions on the website: 13722363