Question: In C++: a a) Fig. 4-B below describes a main program that invokes function readAndStore InternApplicantRecords () to: read in intern applicant's data stored in

In C++:

In C++: a a) Fig. 4-B below describes a main program thatinvokes function readAndStore InternApplicantRecords () to: read in intern applicant's data storedin a file with the filename that was passed in as argument

a a) Fig. 4-B below describes a main program that invokes function readAndStore InternApplicantRecords () to: read in intern 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 InternApplicantType struct variable with the applicant's name, university, email, current GPA, and is local data (Hint: function strto Primitive () 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 "InterApplicant.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 readAndstoreInternApplicant Records () based on the function prototype signature as shown below: vector readAndStoreInternApplicantRecords (string filename) name; university; email;currentGPA; is Local Robert Downey Jr;University of California; ironman@stark.com; 3.8;0 Scarlett Johansson; University of Marvel;blackwidow@shield.com;3.6;1 Chris Evans; University of New York;captain@america.com;3.3;0 Samuel L Jackson; University of Washington;nickfury@shield.com;3.3;1 Fig. 4-A #include #include #include #include #include Fig. 4-B using namespace std; struct InternApplicant string name, university, email; float current GPA; bool is Local; string toString(); // readAndStoreInternApplicantRecords (string filename); /* Assuming the code for splitstrtovecofstr() and strtoprimitive) are implemented here! int main() 1 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!