Question: Solve this for C++ Define a structure, named StudentScores, that contains four member variables, including name (a string), mathScore (an integer), scienceScore (an integer), socialStudyScore

Solve this for C++
Solve this for C++ Define a structure, named StudentScores, that contains four
member variables, including name (a string), mathScore (an integer), scienceScore (an integer),
socialStudyScore (an integer) in that order. Write a program to read a

Define a structure, named StudentScores, that contains four member variables, including name (a string), mathScore (an integer), scienceScore (an integer), socialStudyScore (an integer) in that order. Write a program to read a number of students' records from a user input text file. While the number of students in the file is not known beforehand, you can safely assume that the number of students to be entered is not more than 10. The input of student records is in the following format The following shows an example information in an input text file, "StudentRecord1.txt". Sharp Shark 1009693 Ya Hoo 888995 Apple Juice 919289 (1) Define a function that takes the followinn as innut Sharp Shark 1009693 Ya Hoo 888995 Apple Juice 919289 (1) Define a function that takes the following as input, - a filename - a StudentScores array - the number of students in the input file The function will then try to open the file to read. If the file does not exist, the function will return false. If the file exists, the function will then load the students' information accordingly (refer to zyLab 7.18). Your function should be declared as follows. bool loadStudentinfo(string filename, StudentScores st_arr[10], int Enstudents); (2) In the main function, do the following - Declare a StudentScores array - Call the bool loadStudentinfo () to load the student information and store it to the above array. - If the file does not exist (i.e.: loadStudentInfo ( ) return false), the program will print out "File does not exist. " and exit otherwise, the program will output all the loaded students' scores to the "output.txt" file in the following format , Math: , Sclence: , Social Study: , Math: , Science: , Social Study

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!