Garrett's Popcorn is seeking a developer to design a program that enables customers to calculate the total calorie count based on the number of cups of popcorn they enter. According to nutritional facts, each cup (30 grams) of Garrett's mixed popcorn contains 150 calories (54 calories from fat). Your task is to create a program that allows users to input the cups of popcorn consumed and generates: 1) the total calories consumed, 2) the total calories from fat, and 3) the popcorn quantity in grams. The program's functionality should resemble that of the program depicted in the provided .gif.
Variables are properly declared and initialized; Use of Scanner Object to read input from console
//Example of declaring a variable named number
int number;
//Example of declaring the Scanner Object and reading/converting string data into integer
Scanner scn = new Scanner(System.in);
number = Integer.parseInt(scn.nextLine()); Input/Output of all necessary information; Program renders the format and content displayed above in .gif.
Program output must match the rendered output exactly.
Correct calculations are made for cup-to-calorie conversion, calories from fat, and cup-to-grams; Constant final variables are represented in the program. When possible, make sure to declare all variables that will hold data.
//Example of declaring a constant variable that should not change during the runtime of program.
final double AMC_STOCK_DIVIDEND_RATE = .07;Style - Use of comments, space, and descriptive variable names. For this course, we will follow the Google Java Style Guide. You do not need to read the entire style guide, but rather follow the convention that I have used in class and in my videos. The link below is for your reference.
The program is submitted to Sakai by the due date listed and uploaded to the assigned GitHub Repository
For program 1, you will only need to upload the .java file that contains your code to Sakai under the Assignment tab. You will also need to upload the .java file to your assigned repository.
