Question
Write a program that determines a students final grade in the course. The course had three tests (100 points each) and four assignments (also 100
Write a program that determines a students final grade in the course. The course had three tests (100 points each) and four assignments (also 100 points each). All the test scores make up 70% of the grade and all the assignments 30% of grade.
The program asks the user to input each of the test scores and each of the assignment scores. From these scores, it computes the percentage of total points obtained by the user. It then determines the users final grade according to the table below.
90%-100% A
80%-89% B
70%-79% C
60%-69% D
50%-59% F
At the end, the program displays a summary report including: the original tests scores, the original assignment scores, the percentage of total points earned by the user and the final grade.
Implementation
The code below computes the overall percentage pct from test scores t1, t2, t3 and assignments a1, a2, a3, a4.
Declare t1, t2, t3, a1, a2, a3, a4 and pct as double.
pct = ( ( (t1 + t2 + t3 ) / 3.0 ) * .70 ) + ( ( ( a1 + a2 + a3 + a4 ) / 4.0 ) * .30 );
Test Data
Use the following for the test data:
Input Test Run 1
Enter Scores Test 1: 90
Enter Scores Test 2: 90
Enter Scores Test 3: 90
Enter Scores Assignment 1: 90
Enter Scores Assignment 2: 90
Enter Scores Assignment 3: 90
Enter Scores Assignment 4: 90
Output Test Run 1
Summary Report
Test Scores: 90.0, 90.0, 90.0
Assignment Scores: 90.0, 90.0, 90.0, 90.0
Overall Percentage: 90.0%
Final Grade: A
Input Test Run 2
Enter Scores Test 1: 70
Enter Scores Test 2: 72
Enter Scores Test 3: 68
Enter Scores Assignment 1: 66
Enter Scores Assignment 2: 68
Enter Scores Assignment 3: 72
Enter Scores Assignment 4: 74
Output Test Run 2
Summary Report
Test Scores: 70.0, 72.0, 68.0
Assignment Scores: 66.0, 68.0, 72.0, 74.0
Overall Percentage: 70.0%
Final Grade: C
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started