Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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;

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Outlook 2023

Authors: James Holler

1st Edition

B0BP9P1VWJ, 979-8367217322

More Books

Students also viewed these Databases questions

Question

Explain three things you can do to manage your social networking.

Answered: 1 week ago

Question

Discuss five types of employee training.

Answered: 1 week ago

Question

Identify the four federally mandated employee benefits.

Answered: 1 week ago