Question: Classes: 8. Use the following class declaration to answer parts a - f //class declaration section class Person private: string firstname; string lastname: char middleinit:

 Classes: 8. Use the following class declaration to answer parts a
- f //class declaration section class Person private: string firstname; string lastname:

Classes: 8. Use the following class declaration to answer parts a - f //class declaration section class Person private: string firstname; string lastname: char middleinit: int age; public: Person (string, string, char, into: void setfirst(string); void setlast(string); void setmid(char); void setage(int); string showname0 sonst: stxing shoxage0 const: l/class client section Person a, b ("Mary", "Jones", 'L',25); int age 30; string first- "John", last- "Brown"; char initial a.setfust first); a.setlast(second); a.setmid(initial); a.setage(age); a.showname0 b.shownameO; e. Assuming that the shownameO 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.firstname in the client code? Why or why not

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!