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 09:40
It is vital to research each of the services you plan to disable before implementing any change, especially on critical machines such as the: a. servers in the test environment. b. domain controller and other infrastructure servers. c. desktops that have previously been attacked. d. desktops used by upper-level management.
Answers: 2
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
question
Computers and Technology, 23.06.2019 05:30
Sally is editing her science report about living things. she needs to copy a paragraph from her original report. order the steps sally needs to do to copy the text to her new document.
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
You know the right answer?
You have been hired by your favorite restaurant to create a food nutrition app for their customers t...
Questions
Questions on the website: 13722362