Question: Please complete the following code! import java.util.Scanner; public class GradeCalculator { / * PUT THE SETUP SECTION VARIABLES DIRECTLY BELOW THESE COMMENTS: Define the four
Please complete the following code!
import java.util.Scanner;
public class GradeCalculator
PUT THE SETUP SECTION VARIABLES DIRECTLY BELOW THESE COMMENTS:
Define the four weight variables outlined in the set up section below
All variables in this section must adhere to the conventions for constants. See instructions for specific details
public static UserInputResult GetUserInputDO NOT ALTER THIS LINE
Scanner scanner new ScannerSystemin;DO NOT ALTER THIS LINE
PUT THE INPUT SECTION VARIABLES DIRECTLY BELOW THESE COMMENTS:
Define the four score variables outlined in the input section below within the scope of the GetUserInput method.
A scanner variable has been provided for getting user input.
scanner.close;DO NOT ALTER THIS LINE
return new UserInputResultquizScore assignmentScore, midtermExamScore, finalExamScore; DO NOT ALTER THIS LINE
public static float CalculateFinalScorefloat quizScore, float assignmentScore, float midtermExamScore, float finalExamScoreDO NOT ALTER THIS LINE
PUT THE PROCESSING CALCULATION DIRECTLY BELOW THESE COMMENTS:
Calculate the final score using the weight and score variables defined in the set up and input sections within the scope of the CalculateFinalScore method.
Hint: The static variables from the set up section can be used directly here alongside the score variables that have been passed in
return finalScore; DO NOT ALTER THIS LINE
public static void mainString argsDO NOT ALTER THIS LINE
UserInputResult result GetUserInput; DO NOT ALTER THIS LINE
float finalScore CalculateFinalScoreresultquizScore, result.assignmentScore, result.midtermExamScore, result.finalExamScore; DO NOT ALTER THIS LINE
PUT THE FINAL OUTPUT DIRECTLY BELOW THESE COMMENTS:
Output the final score to the user in the format described in the output section within the scope of the main method.
The output section directions has information about String.format and what format specifier to use.
The Rubric: Full name in header comments: pts
Proper variable creation for all four weight variables: pts
Proper variable creation and input processing for all four score variables pts
Proper calculation of the finalscore: pts
Properly formatted input prompts: pts
Properly formatted final output: pts
The program is Java! Thanks!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
