Answered step by step
Verified Expert Solution
Question
1 Approved Answer
all the information is provided below. only the .h file is needed Given a class Student: - Declare the following class' data members: (1) Public
all the information is provided below. only the .h file is needed
Given a class Student: - Declare the following class' data members: (1) Public data member name (string datatype) (2) Public data member grades is an unordered_map that maps string course names to oat scores. For example: grades["COP3523\"] = 755. . Initialize the variables by implementing a parameterized constructor. Keep all the data, members, and member functions public. - Complete member function named getAverage() of class Student that computes and returns the average of scores of the student Note: The average score for a student is computed by adding the scores corresponding to each course, divided by the total number of courses In addition: The average would be zero in case there are no grades - Complete the member function modifyGrades() that takes in a function pointer as a parameter and uses this function pointer to modify the value of each grade in the map. This function does not return anything. The function being pointed by this pointer takes a oat as a parameter and returns oat. 3 [Hint 1: lterate onto each value of the map and use the function pointer passed by the user to modify the value on the map] File is marked as read only Current file: main.cpp 1 #includeStep 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