Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Code help Concepts used in this project 1) Interactive 1/0 2) Arithmetic express

ID: 3643678 • Letter: C

Question

Code help
Concepts used in this project
1) Interactive 1/0
2) Arithmetic expressions
3) Formatting output statements using setw, setprecision and showpoint
4) If-else statements and logical expressions
5) Testing


Instructions:


Grade calculator


Suppose in a CS 172 class the final grade is calculator as follows: Programming Labs and written home works 25%
Projects 15%
Quiz (including Midterm) 25%
Final Exam 25%
Attendance and Class Participation 10%


1) Ask the user to enter his/her score in all the 5 categories. Your program should be interactive and user friendly. For instance the user prompt should clearly state what the user should enter.
2) Calculate the weighted total in each category and the weighted average. 3) Print the output in a table that is formatted exactly like the one below. 4) Compute the GPA and letter grade and print them on the screen.




Example for calculating the weighted total:
Category Weights Score (total 100) Weighted score
Programming Labs and homework 25% 65 .25*65 = 16.25
Projects 15% 80 .15*80 = 12
Midterm and Quiz 25% 90 .25*90 = 22.5
Final 25% 85 .25*85 = 21.25
Attendance and class participation 10% 90 .10*90 = 9
Weighted Total 100% --- 81
Your GPA is 2.75 and your grade is B-


Example for calculating the weighted total:


Weight Score(total 100) Weighted Score
Programming Labs and homework 25% 65 .25*65
Projects 15% 80 .15*80
Midterm and Quiz 25% 90 .25*90
Final 25% 85 .25*85
Attendance and class participation 10% 90 .10*90
Weighted Average 100% - 81.00



___________________________________________________________________________ ______________________________


This is what I wrote so far for the code but the problem is it doesn't calculate separately for each thing such as projects will also be calculated by 25 how do i fix it for each one help please!



//***********************************************************************
//This is the program is a grade calculator
//***********************************************************************
#include <cstdlib>
#include <iostream>
#include <iomanip>

using namespace std;


float score;
float score1;


int main()
{
cout << " Category" <<setw(34)<< "Weights" <<setw(18)<< "Score(total 100)" <<setw(18)<< "Weighted score" << endl;
cout << " Programming Labs & H.W. ";
cout << " Projects ";
cout << " Midterm and Quiz ";
cout << " Final ";
cout << " Attendence and class participation" << endl;
cout << " Weighted Total " << endl;
cout << "Enter your score for programming labs and homework ";
cin >> score;
cout << "Score is " << score * .25 << " ";




system("PAUSE");
return 0;
}

Explanation / Answer

NOTE : In the grading section, where i have used IF construct, enter conditions for other grades and GPA as it is in your college / school.