about | help | code help+videos | done | prefs |
Write a method that returns the calories present in a plate of food. Parameters mainDish, sauce, and side will contain the number of calories each of these parts of the dish has. Some customers might not want all of the parts of the dish. Only include the sauce if useSauce is true. Only include the side if useSide is true. Return the total calorie count for the entire dish. foodCalorieCount(500, 100, 200, true, true) → 800 foodCalorieCount(500, 100, 200, false, true) → 700 foodCalorieCount(500, 100, 200, true, false) → 600 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 210
Copyright Nick Parlante 2017 - privacy