Page 1 of 1

17.10 Write a series of statements that accomplish each of the following. Assume that we've de- fined class Person that

Posted: Fri May 20, 2022 5:07 pm
by answerhappygod
17 10 Write A Series Of Statements That Accomplish Each Of The Following Assume That We Ve De Fined Class Person That 1
17 10 Write A Series Of Statements That Accomplish Each Of The Following Assume That We Ve De Fined Class Person That 1 (147.79 KiB) Viewed 57 times
in c++ thanks
17.10 Write a series of statements that accomplish each of the following. Assume that we've de- fined class Person that contains the private data members char lastName[ 15 ]; char firstName[ 10 ]; int age; int id; and public member functions // accessor functions for id void setId( int ); int getId() const; // accessor functions for TastName void setLastName( string); string getLastName() const; // accessor functions for firstName void setFirstName( string); string getFirstName() const; // accessor functions for age void setAge(int); I int getAge() const; Also assume that any random-access files have been opened properly. a) Initialize nameage.dat with 100 records that store values lastName "unassigned" firstName = and age = 0. b) Input 10 last names, first names and ages, and write them to the file