Question: Complete function CountScore ( ) that takes in a vector containing the student information of a course and a passing score as parameters. CountScore (
Complete function CountScore that takes in a vector containing the student information of a course and a passing score as parameters. CountScore returns the number of students having a final score that is higher or equal to a given passing score.
The main program parses the student information of a course from a text file into a vector. Information of each student is stored as a StudentInIntroToComputerScienceCourse object containing the following data members:
name string
semester string
finalScore double
Use a rangebased for loop with auto to simplify the iterations of a vector. When the name of the object type of the elements in a vector is long and difficult to be remembered, auto is useful in handling the object type without running the risk of typing the wrong name in the code.
Ex: If the input of the program the passing score is:
CountScore returns and the program output is:
Number of students passed:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
