Professor Dolittle has asked some computer science students towrite a program that will help him cal

Professor Dolittle has asked some computer science students towrite a program that will help him calculate his final grades.Professor Dolittle gives two midterms and a final exam. Each ofthese is worth 100 points. In addition, he gives a number ofhomework assignments during the semester. Each homework assignmentis worth 100 points. At the end of the semester, Professor Dolittle wants tocalculate the median score on the homework assignments for thesemester. He believes that the median score is a good measure ofthe student’s overall performance on the homework assignments. Themedian is found by putting the homework scores in order, and thentaking the score that is at the midpoint of this list. If there arean odd number of assignments, the median is the score exactly inthe middle of the list. If there are an even number of assignments,the median is the average of the two scores closest to the midpointof the data. Your program should work as follows: All user input should be tested to be sure that it is a validinteger value in the range 0 to 100. It should ask the user to enter in the score for the firstmidterm. Then this value is read in and saved. It should ask the user to enter in the score for the secondmidterm. Then this value is read in and saved. It should ask the user to enter in the score for the final exam.Then this value is read in and saved. The program then asks the user to enter in the scores for thehomework assignments. Any number of scores can be entered in. Youwill test for an empty entry to stop add to the vector. Store the homework scores in a vector. Once all of the data has been entered, the program calls afunction that you have written to find the median homeworkscore. The program then calls a function that you have written tocalculate and return the letter grade. The return grade is basedupon the total of the three exams plus the median homework score(total points). Finally, display the median homework score, the total pointcount, and the letter grade. Dr. DoLittle’s Grading Program …..Please enter in the score for the first exam: abcSorry, your input must be an integer. Please try again.Please enter in the score for the first exam: 97Please enter in the score for the second exam: 65Please enter in the score for the final exam: 85Enter the score for a homework assignment: abcSorry, your input must be an integer. Please try again.Enter the score for a homework assignment: 200Sorry, your input must be between 0 and 100 Please try again.Enter the score for a homework assignment: 99Enter the score for a homework assignment: 65Enter the score for a homework assignment: 78Enter the score for a homework assignment: 80Enter the score for a homework assignment: The median homework score was 79The total points earned was 326The letter calculated letter grade is B This is the problem we are having trouble getting the exceptionhandling to loop we have the correct try catch for string vsinterger handling however the code does not loop back and ask foran input for the exam again. we are not having any issues gettingthe values to store in the vectors. We are also having troublegetting the hw median. code is copied and pasted below /*functions 1. get and validate user input. (0-100) 2. writea function to calculate the median, sort (number in themiddle) 3. calculate the letter grade*/ #include #include #include using namespace std; int main () {   vector examGrades(0);   int examGrade1;   int examGrade2;   int examGrade3;   unsigned int i = 0;   int hwMedian;   int hwAvg;   int totalScore;   int hwGrade;   vector hwScores;   int hwAdder;   bool empty_line_found = false;   string line;         cout << “Dr. DoLittle’s Grading Program …..”<< endl;   cout << “Please enter in the score for thefirst exam:” << endl;      //test for first exam   //test for string and between 0 and 100   cin >> examGrade1;   while(cin.fail())   {      cout << “Intput an integer100 or less” << endl;      cin.clear();      cin.ignore(256, ‘n’);      cin >> examGrade1;   }   cout << examGrade1 << endl;      cin >> examGrade2;   while(cin.fail())   {      cout << “Intput an integer100 or less” << endl;      cin.clear();      cin.ignore(256, ‘n’);      cin >> examGrade2;         }   cout << examGrade2 << endl;      cin >> examGrade3;   while(cin.fail())   {      cout << “Intput an integer100 or less” << endl;      cin.clear();      cin.ignore(256, ‘n’);      cin >> examGrade3;         }   cout << examGrade3 << endl;   //add the test scores to the vector via   //push back function   examGrades.push_back(examGrade1);   examGrades.push_back(examGrade2);   examGrades.push_back(examGrade3);      cout << examGrades.size() << endl;   cout << “Everything above is EXAM related”<< endl;   cout << endl; //HOMEWORK FUNCTION I HHAVE NOT DECLARED THE VARIABLES FOR THISUP TOP   cin.ignore(10000, ‘n’);   while(!empty_line_found)   {      cin >> hwGrade;      if(cin.eof()){         break;         }      else if(hwGrade > 100 ||hwGrade < 0)      {         cout <<“Please enter an integer between 0 and 100” << endl;      }      else if(cin.fail())     {        cin.clear();        cin.ignore(10000,’n’);        cout << “Sorry,your input must be an integer. Please try again.” <

0 &&hwGrade <= 100)     {        hwScores.push_back(hwGrade);      }   }      sort(hwScores.begin(), hwScores.end());   for( i = 0; i < hwScores.size(); ++i)   {      cout << hwScores.at(i)<< ” “;      }   if()   {         }    /*      //calculate the total score and store invariable   totalScore = examGrade1 + examGrade2 +examGrade3;            cout << “The median homework score was “<< endl;   cout << “The total points earned was “<< totalScore << endl;      //calculate the letter grade   if(totalScore < 400 && totalScore>381){      cout << “The lettercalculated letter grade is A” << endl;   }   if(totalScore < 380 && totalScore>361){      cout << “The lettercalculated letter grade is A-” << endl;   }   if(totalScore < 360 && totalScore>341){      cout << “The lettercalculated letter grade is B+” << endl;   }   if(totalScore < 340 && totalScore>321){      cout << “The lettercalculated letter grade is B” << endl;   }   if(totalScore < 320 && totalScore>301){      cout << “The lettercalculated letter grade is B-” << endl;   }   if(totalScore < 300 && totalScore>281){      cout << “The lettercalculated letter grade is c+” << endl;   }   if(totalScore < 280 && totalScore>261){      cout << “The lettercalculated letter grade is C” << endl;   }   if(totalScore < 260 && totalScore>241){      cout << “The lettercalculated letter grade is C-” << endl;   }   if(totalScore < 240 && totalScore>221){      cout << “The lettercalculated letter grade is D+” << endl;   }   if(totalScore < 220 && totalScore>201){      cout << “The lettercalculated letter grade is D” << endl;   }   if(totalScore < 200 && totalScore>181){      cout . . .

Looking for a similar assignment? Get help from our qualified experts!

"Our Prices Start at $9.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!":

Order a Similar Paper Order a Different Paper