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

Sample Midterm (50 points + 5 ex.cr.) 2016 Develop a program to assist an instru

ID: 3577340 • Letter: S

Question

Sample Midterm (50 points + 5 ex.cr.)                                                                                                                               2016

Develop a program to assist an instructor with calculating course grades. You will do the program in a command line style, where a sample run would look as follows:

Welcome to the grading program.

Please enter student information:

Student ID (enter ‘quit’ to exit): A12345

Quiz 1 score: 95

Quiz 2 score: 92

Quiz 3 score: 89

Quiz 4 score: 87

Quiz 5 score: 91

Quiz Make-Up score: 0

Mid-Term exam score: 88

Problems score: 98

Final Exam score: 87

Student # A12345 earned a quiz average of 91.75, a course average of 90.625, and a letter grade of: A.

Please enter student information:

Student ID (enter ‘quit’ to exit): quit

Thanks for using the grade calculator!

The quiz average is a simple arithmetic average of the quiz scores, except that the lowest score should be dropped. In addition, if a make-up quiz score is given, and is higher than a score which would otherwise count, it should be used instead of the lower Q1-Q5 score.

The course average is a weighted average, as follows:

                50% of the grade is from the quiz average

                15% of the grade is from the mid-term exam score

                10% of the grade is from the problems score

                25% of the grade is from the final exam score

[So the course average = (Quiz Average * .5) + (mid-term * .15) + (problems * .1) + (final * .25)].

The letter grade is based on normal grade brackets of: 90+ = A; 80-89 = B; 70-79 = C; 60-69 = D; below 60 = F.

When considering the final letter grade, a course average with a decimal of .50 or higher should be ‘rounded up’ to the next higher whole number.   (e.g., a course average of 89.5 would receive a grade of ‘A’).

But: students who earn an average of 90 or better (rounded) on each of the following: Quiz Average, Midterm, and Problems do not have to take the final exam. Their course average is just the arithmetic average of those three items, and they receive an ‘A’ in the course (in addition, do not ask for a final exam score in this situation).

The student ID is an alphanumeric field (i.e., string) while all other values are numeric. Scores should be validated as being between zero and 125. The Student ID should validate it as matching the STLCC pattern: an ‘A’ followed by 8 digits, where the digits cannot all be zeros.

To receive full credit, the following features must be present in your solution:

1)A loop in main() to allow input of any number of students during a session, but:

2)Otherwise minimize the amount of code in main() by using calls to separate methods

3)Validate the student ID and all score inputs as discussed above; do not let the program crash if bad data - such as letters - is entered where numbers are expected.

4)Use global and local variables (with parameter passing) as you see fit, but try to be efficient in your choices (e.g., don’t just make everything ‘global’)

5)Format the score outputs to display no more than 3 decimal positions.

Call your project ‘StudentGrades’ and zip and submit the full netbeans project in the usual way.

Extra Credit (5 points):

                For extra credit, keep track of the number of A, B, C, D, and F letter grades that were calculated during the input session, and print the results at the end of the program (after the user requests to quit).

Explanation / Answer

#include <iostream>
#include <cstdlib>
#include <cstring>

using namespace std;

int main()

{
char mark[2];
char A = 4, A- = 3.75, B+ = 3.50, B = 3.00, B- = 2.75, C+ = 2.50, C = 2.00, C- = 1.75, D+ = 1.50, D = 1.00, F = 1.0;
float pngk;

cout<<"This Program Will Calculate Your CGPA for MTS3013 structure"
<<" programming MTK3013 structure disckrit MTN3013 computer organization"
<<" and architecture"<<endl;

cout<<"You should enter your grade only."<<endl<<endl;

cout<<"MTS3013 : ";
cin>>mark;
cout<<endl;
cout<<"MTK3013 : ";
cin>>mark;
cout<<endl;
cout<<"MTN3013 : ";
cin>>mark;
cout<<endl;

if (mark=="A")
{
cout<<"4.00";
}

else if (mark=="A-")
{
cout<<"3.75";
}

else if (mark=="B+")
{
cout<<"3.50";
}

else if (mark=="B")
{
cout<<"3.00";
}

else if (mark=="B-")
{
cout<<"2.75";
}

else if (mark=="C+")
{
cout<<"2.50";
}

else if (mark=="C")
{
cout<<"2.00";
}

else if (mark=="C-")
{
cout<<"1.75";
}

else if (mark=="D+")
{
cout<<"1.50";
}

else if (mark=="D")
{
cout<<"1.00";
}

if (mark=="F")
{
cout<<"0.00";
}


pngk=((pmark[1]*6)+(pmark[2]*6)+(pmark[0]*5)+(pmark[3]*5))/22;

cout<<endl<<endl;
cout<<"Your PNGK is : "<<pngk<<endl;

cin.get();
system ("PAUSE");
return 0;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote