Question: COSC 1437 - Assignment 1: Professor Rating The Computer Science Department is evaluating 5 professors to see which professor has the highest rating according to
COSC 1437 - Assignment 1: Professor Rating
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
- Your class should contain the following methods:
- constructor which initializes the private data members
- 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.
- 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
- In your main program, create a vector of ProfessorRating which holds a list of 5 professor ratings.
const int NUM_PROFESSORS=5; vector
e. Create a function to fill the vector with professor names and each rating. You can either create a menu to prompt the user to enter professor names and ratings for each then call the function or hardcode the values in this function.
void fillProfList(vector
- Create a generic function to get each rating. Call this function when populating the professors information above. int getRating(string ratingType), where ratingType is passed into the function to indicate either Easiness,
Helpfulness, Friendliness or Clarity that you like to prompt to the user so they can enter proper rating. You will call this function 4 times to get each rating.
- Create a function to locate the professors with the highest and lowest average rating and display the name and rating of the professors. Call the function from your main() program to output the information.
void displayHighestandLowestRating(vector
h. Create a display function to show the average of ALL ratings of the professors using the classs calcRating() function.
Call this display function from your main() program to output the information.
void displayAverageRating(vector
Format your output with two decimal places. Create a new project and name it FirstName_LastName_A1. Zip the project folder and a screenshot of the input data and output result of the program and submit the zipped file in Canvas.
Key Features to Use: Vector, Control Structures, class, functions
Grading: Accuracy/User-friendly (60%); Utilize Required Key Features and Functions (30%); Good Comments in header & code body (5%); Proper Formatting (5%)
Your output should be similar to the following:

Professor with highest average rating: Name Bill Gates Easiness: 3 elpfulness: 4 Friendliness: 5 larity 4 verage rating: 4.00 Professor with lowest average rating: NameJames Gosling Easiness: 1 elpfulness: 4 Friendliness: 2 larity 1 verage Rating: 2.00 Professor Individual Ratings Name Bill Gates Steve Jobs James Gosling asiness Helpfulness Friendliness Clarity Average Rating 4.00 2.75 2.00 3.25 2.50 ark Zuzkerberg lan Turing Professor with highest average rating: Name Bill Gates Easiness: 3 elpfulness: 4 Friendliness: 5 larity 4 verage rating: 4.00 Professor with lowest average rating: NameJames Gosling Easiness: 1 elpfulness: 4 Friendliness: 2 larity 1 verage Rating: 2.00 Professor Individual Ratings Name Bill Gates Steve Jobs James Gosling asiness Helpfulness Friendliness Clarity Average Rating 4.00 2.75 2.00 3.25 2.50 ark Zuzkerberg lan Turing
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
