An instructor would like a program to help her grade student presentations using
ID: 3564353 • Letter: A
Question
An instructor would like a program to help her grade student presentations using peer evaluations. For each presentation, all the other students submit two scores in the range from 0 to 10: one for the content and one for presentation skills. The program takes each set of scores, drops the highest score and the lowest score and finds the average of the remainder. The two averages are printed out, and the overall grade is calculated using 60% weight for the content score and 40% weight for the presentation skills score. This will be repeated for each student presentation.
The program starts out by asking for and reading in N, the number of student evaluators. It then will ask for and read in a student ID, a first name and a last name. The user should then input N integer scores (in the range 0 to 10) for the content, and another N integer scores (in the range 0 to 10) for the presentation skills and store them in two separate arrays. The actual calculation of the average with the highest and lowest scores dropped should be done by a function called average that takes as arguments the number of scores N, and an array with N integer scores. Note that the function will be called twice, once with the content scores and once with the presentation skills scores. The averages returned should be printed out, and the program calculates and prints the overall grade for the student. The overall grade for each student is saved. This should be repeated until a negative number is entered for a student ID.
The program should then print a well formatted table giving the last name, first name, ID, and overall grade of each student. The table should be sorted alphabetically by the last names of the students. The number of presentations and the average overall grade should be printed out below the table.
The instructor would also like a histogram of the overall grades to be printed. To do this, use an array called rangeCounts of size 10. rangeCounts[0] should hold how many grades were less than 1, rangeCounts[1] should hold how many grades were at least 1 but less than 2, etc. rangeCounts[9] should hold the number of grades in the range 9 and above. The program will use rangeCounts to print a histogram by printing one * for each grade in a particular range.
Explanation / Answer
#include #include #include #include //*************************************************************** // CLASS USED IN PROJECT //**************************************************************** class student { int rollno; char name[50]; int p_marks, c_marks, m_marks, e_marks, cs_marks; float per; char grade; void calculate(); //function to calculate grade public: void getdata(); //function to accept data from user void showdata(); //function to show data on screen void show_tabular(); int retrollno(); }; //class ends here void student::calculate() { per=(p_marks+c_marks+m_marks+e_marks+cs_marks)/5.0; if(per>=60) grade='A'; else if(per>=50) grade='B'; else if(per>=33) grade='C'; else grade='F'; } void student::getdata() { coutrollno; coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.