Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Classes: 8. Use the following class declaration to answer parts a -f Ilclass declaration section class Person private: string firstname string lastmame: char middleinit: int

image text in transcribed
Classes: 8. Use the following class declaration to answer parts a -f Ilclass declaration section class Person private: string firstname string lastmame: char middleinit: int age; public: Person (string, string, char, int; void setfirst(string); void setlast(string); void setmid(char); void setage(int: string showname0 sonst: string showage0 const liclass client section Person a, b ("Mary", "Jones", 'L', 25); int age-30; string first "John", last "Brown" char initial; a.setfirstffirst); a.astlast(second); aastmid(initial); a.sctagelage); a.shownameD bshowage0; a List all of the identifiers that are names of class members. a. set List all of the identifiers that are names of class instances (objects). List the names of all member functions that are allowed to modify the private data. b. c. d Which function is the constructor for this class? e. Assuming that the shownamc0 function outputs the name in the private portion of the class, what would b.shonams output? What would a.shewnamc 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

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

Transactions On Large Scale Data And Knowledge Centered Systems Vi Special Issue On Database And Expert Systems Applications Lncs 7600

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2012th Edition

3642341780, 978-3642341786

More Books

Students also viewed these Databases questions