Question: 8. Use the following class declaration to answer parts a f //class declaration section class Person private: string firstuame string lastname: char middleinit: int age;
8. Use the following class declaration to answer parts a f //class declaration section class Person private: string firstuame string lastname: char middleinit: int age; public: Person (string, string, char, int); void setfirat(string); void setlast(string); void setmid(char); void setage(int); string showname0 sonst: string showage0 const //class client section Person a, b ("Mary", "Jones", 'L',25); iut age- 30; string first "John", last char initial; "Brown"; a.setfixst first); a.setlast(second); a.setmidGinitial); a.setaze(age); ashoxwnameO; a. List all of the identifiers that are names of class members. c. List the names of all member functions that are allowed to modify d. Which function is the constructor for this class? b.showaze0; b. Listal of the identifiers that are names of class instances (objects) the private data e. Assuming that the shownams0 function outputs the name in the private portion of the class, what would bshowname output? What would a.showname output? f. Would it be valid to use a. firstuame in the client code? Why or why not
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
