Question
The Computer Science Department is evaluating 5 professors to see which professor has the highest rating according to student input. You will create a ProfessorRating
The 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 four ratings. The ratings are used to evaluate Easiness, Helpfulness, Friendliness 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 5 data members: profName with string type and Easiness, Helpfulness, Friendliness and Clarity with int type b. Your class should contain the following methods: 1. constructor which initializes the private data members 2. double calcRating() returns the average rating ((easiness+helpfulness+friendliness+clarity)/4.0) 3. void print() displays the professor name and his/her rating. 4. void setData(string name, int easy, int help, int friendly, int clear) 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 a vector of ProfessorRating which holds a list of 5 professor ratings. const int NUM_PROFESSORS=5; vector
Your output should be similar to the following:
rofessor with highest average ratIng ame: Bill Gates elpfulness: 4 larity 4 Easiness: 3 Friendliness: 5 verage rating: 4.00 rofessor with lowest average rating: ameJames Gosling elpfulness: 4 larity1 Easiness: 1 Friendliness: 2 verage Rating: 2.00 rofessor Individual Ratings ame ill Gates teve Jobs Easiness Helpfulness Friendliness Clarity Average Rating 4. 2.75 2.00 3.25 2.50 James Gosling ark Zuzkerberg lan Turing 1 2 2 4 1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started