Question: Tasks Create a new Project (Lab5). 1) Task: Practice with if statements (8 pts) a) Create a new package task1 and a new class in

 Tasks Create a new Project (Lab5). 1) Task: Practice with if

Tasks Create a new Project (Lab5). 1) Task: Practice with if statements (8 pts) a) Create a new package "task1" and a new class in that package "GradeMaker". Add the empty "main" method in your class o main: In the "main" method, create a Scanner object to read user keyboard input. Prompt the user to enter a grade value between 0.0 and 100.0 If the grade entered is NOT between 0.0 and 100.0 print an error message and return from "main" -just use return; Call a method called "calcGrade" (we'll write that method shortly) and pass the score the user entered as the parameter. This method should return a string so be sure to save the returned value. Print the returned value as follows (showing an example grade value): Grade: A o calcGrade Create a method "calcGrade" that accepts one parameter a score value. Create a string variable to hold the letter grade, leave it unassigned for now. Create an it/else if...else statement to support the following letter grade scheme 90.0-100.0 A 80.0-90.0 (do not include the end-point value here) B .70.0-80.0 (do not include the end-point value here) C 60.0 70.0 (do not include the end-point value here)D Otherwise, the grade is F. Return the letter grade from your function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!