How do you: Construct a program that calculates the course overall grade point average (GPA). The program must input 3 scores for each of the categories listed in the calculation of the GPA provided below with exception of the final examination. The maximum score for all quizzes is 20 points each, the maximum score for all homework assignments is 50 points each, the maximum score for all tests and all programming assignments is 100 points each, and the maximum for the final examination is 120 points. You can select the scores that you make on each of these assessed items. Assignments Scale Homework 10 % Programming Assignments 25 % Quizzes (Weekly) 15 % Tests 30 % Final Examination 20 % You must develop the formula for calculating the GPA using the information provided in the table. For example if the final examination has a maximum score of 120 and you get an 85. Then your weighted score for the final examination is calculated using the following formula: weightedFinalExamScore = (myFinalExamScore * 100) / maximumFinalExamScore * 0.20 Using values of the example, see calculation for the weighted final examination score is as follows: myFinalExamScore = 85.0 maximumFinalExamScore = 120.0 normalizeBy100 = 100.0 weightedFinalExamScore = (85.0 * 100)/ 120.0 * 0.20 = 8500 / 120 *0.20 = 70.83 * 0.20 = 14.17 Your GPA must be printed to the screen using decimal format with a precision of 2. For example, the following would be printed to the screen for the calculation of the GPA: My GPA for CSC 170 : 90.50
Control structures
Control structures are block of statements that analyze the value of variables and determine the flow of execution based on those values. When a program is running, the CPU executes the code line by line. After sometime, the program reaches the point where it has to make a decision on whether it has to go to another part of the code or repeat execution of certain part of the code. These results affect the flow of the program's code and these are called control structures.
Switch Statement
The switch statement is a key feature that is used by the programmers a lot in the world of programming and coding, as well as in information technology in general. The switch statement is a selection control mechanism that allows the variable value to change the order of the individual statements in the software execution via search.
How do you:
Construct a program that calculates the course overall grade point average (GPA). The program must input 3 scores for each of the categories listed in the calculation of the GPA provided below with exception of the final examination. The maximum score for all quizzes is 20 points each, the maximum score for all homework assignments is 50 points each, the maximum score for all tests and all
Assignments |
Scale |
Homework |
10 % |
Programming Assignments |
25 % |
Quizzes (Weekly) |
15 % |
Tests |
30 % |
Final Examination |
20 % |
You must develop the formula for calculating the GPA using the information provided in the table. For example if the final examination has a maximum score of 120 and you get an 85. Then your weighted score for the final examination is calculated using the following formula:
weightedFinalExamScore = (myFinalExamScore * 100) / maximumFinalExamScore * 0.20
Using values of the example, see calculation for the weighted final examination score is as follows:
myFinalExamScore = 85.0
maximumFinalExamScore = 120.0
normalizeBy100 = 100.0
weightedFinalExamScore = (85.0 * 100)/ 120.0 * 0.20 = 8500 / 120 *0.20 = 70.83 * 0.20 = 14.17
Your GPA must be printed to the screen using decimal format with a precision of 2. For example, the following would be printed to the screen for the calculation of the GPA:
My GPA for CSC 170 : 90.50
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images