Question: 4. that a a) Fig. 4-B below describes a maino program invokes function readAndstoreInternApplicantRecords () to: read in intem applicant's data stored in a file

 4. that a a) Fig. 4-B below describes a maino program

invokes function readAndstoreInternApplicantRecords () to: read in intem applicant's data stored in

4. that a a) Fig. 4-B below describes a maino program invokes function readAndstoreInternApplicantRecords () to: read in intem applicant's data stored in a file with the filename that was passed in as argument extract the relevant pieces of information like name, university, email, etc of each applicant stored in the file (Hint: make use of the function splitstrtovecofstr() in Qn 2) initialize a InternApplicant Type struct variable with the applicant's name, university, email, current GPA, and is Local data (Hint: function strtoPrimitive () in Qn 3 can also be used to help you!) store the InternApplicant Type variable info into a vector retum a vector InternApplicantType> which contains the data of each applicant found in the file Based on the sample contents of file "InternApplicant.txt" in Fig. 4-A, assuming both splitstrTovecofstr() from Qn 2 and strto Primitive()in Qn 3 are available in the main program in Fig. 4-B, and the sample output as shown in Fig. 4-C, write the implementation code for the function readAndstoreInternApplicantRecords () based on the function prototype signature as shown below: vector readAndStoreInternApplicantRecords (string filename) (6 marks) b) Implement the tostring() for struct InternApplicant, such that the program's output will appear as shown in Fig. 4-C, based on the sample contents of file "InternApplicant.txt" in Fig. 4-A (4 marks) #include #include #include #include #include Fig. 4-B using namespace std; struct InternApplicant string name, university, email; float currentGPA; bool is Local; string toString(); 11 readAndstoreInternApplicantRecords (string filename); Assuming the code for splitstrtovecofstr() and strto Primitive () are implemented here! */ 1 int main() string filename = "InternApplicant.txt"; vector InternApplicantRecs = readAndstoreInternApplicantRecords (filename); for (int i=0; i

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!