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

(c++}Computer Science Department is evaluating 5 professors to see which profess

ID: 3766552 • Letter: #

Question

(c++}Computer Science Department is evaluating 5 professors to see which professor has the highest rating according to student input. You will create a ProfessorRating class consisting of professor Name and three ratings. The three ratings are used to evaluate easiness, helpfulness, and clarity. The value for each rating is in the range of 1 to 5, with 1 is the lowest and 5 is the highest. Your program should contain the following functionality: a. Create a class named ProfessorRating with 4 data members: profName with string type and easiness, helpfulness, and clarity with int type b. Your class should contain the following methods: a. constructor which initializes the private data members b. double calcRating() – returns the average rating ((easiness+helpfulness+clarity)/3.0) c. void print() – displays the professor name and his/her rating. d. void setData(string name, int easy, int help, int clari) – assigns parameter value to each private data member. c. Create your class in a header file (ProfessorRating.h) with the above structures. Test your class with user interface in your main program. (** make sure to include your class in your main program) #include “ProfessorRating.h” d. In your main program, create an array of ProfessorRating which holds a list of 5 professor ratings. const int SIZE=5; ProfessorRating csProfs[SIZE]; e. Create a function to fill the array with professor names and each rating. void fillProfList(ProfessorRating profList[], int size) f. Create a generic function to get each rating int getRating(string ratingType), where ratingType is passed into the function to indicate either “Easiness”, “Helpfulness”, or “Clarity” that you like to prompt to the user so they can enter proper rating. You will call this function 3 times to get each rating. g. Create a function to locate the professor with the highest rating and display the name and rating. void displayHighestRating(ProfessorRating profList[], int size)

Explanation / Answer

Here is the file for ProfessorRating.h:

https://www.dropbox.com/s/4qz7vktggs9ynld/ProfessorRating.h?dl=0

And the link for ProfessorRating.cpp

https://www.dropbox.com/s/bvbi17a0wgjvtel/ProfessorRating.cpp?dl=0

If you have further queries, just get back to me.