Question: Write a JAVA program to calculate the percentage of calories that comes from fat for a serving of a food. Your program should ask the
Write a JAVA program to calculate the percentage of calories that comes from fat for a serving of a food.
Your program should ask the user to input the food name, grams of fat per serving, and the total calories per serving.
Each input should be provided by the user one at a time through different dialog boxes. Assuming one gram of fat provides 9 calories, calculate the calories from fat and the percentage of total calories that come from fat for this food.
Your program should then output the name of the food, the calories from fat and the percentage of total calories that come from fat.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
