Garrett's popcorn is looking to hire a developer to create a program that allows a customer to determine the total number of calories based on the number of cups of popcorn the user enters. The nutritional facts state that there are 150 calories (54 calories from fat) per 1 cup (30 grams) of Garrett's mixed popcorn. You will create a program that lets the customer enter the number of cups of popcorn consumed and then report 1) the total number of calories consumed 2) the total number of calories from fat, and 3) the amount of popcorn in grams consumed. Your program should operate similarly to the program shown in the .gif below
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 format and content displayed above in .gif
Correct calculations are made for cup to calorie conversion, calories from fat and cup to grams; Make use of constant final variables. When possible, make sure to declare all variables that will hold data.
//Example of declaring a variable that should not change during runtime
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.
Program is submitted by the due date listed and uploaded to 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 this repository.