Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program, GradeCalculator, to calculate a total course average and letter grade given averages for homework, quizzes, midterm exam, and final exam. The category

image text in transcribedimage text in transcribedimage text in transcribed

Write a program, GradeCalculator, to calculate a total course average and letter grade given averages for homework, quizzes, midterm exam, and final exam. The category weights have been given as constants for you. Homework and Quizzes are worth 20% each and the Midterm and Final Exam are worth 30% each. Please use these constants in your coding. Step 1: - Create five variables to hold the average for each category and the total score. For example, an average can be between 0.0 and 100.0. Step 2: - Read input for homework average, quiz average, midterm exam score, and final exam score and store in variables created in Step 1. - Calculate the points earned for each category (points is average * category weight) and store in your variables created in Step 1 (this will overwrite - that's ok). - Note: the above two items can be combined into one line of code for each category where the value is read in and then points calculated. See if you can do it! Example of averages: Step 4: Calculate the total course average (i.e. final grade) and use a printf statement to output to one decimal place. EX: Using the above values: Step 5: - Use a series of if/else statements to find the letter grade associated with the course average. Use a 10-point scale where 90 and above is ' A ', etc, etc, and below 60 is an ' F '. Ex: Using the above values: Course grade: B Sample output for the entire output of the program is: Homework: 15.9 Quizzes: 16.8 Midterm: 23.1 Final Exam: 24.9 Overall average: 80.7 Course grade: B import java. util.Scanner

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Build It For The Real World A Database Workbook

Authors: Wilson, Susan, Hoferek, Mary J.

1st Edition

0073197599, 9780073197593

More Books

Students also viewed these Databases questions