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 //class declaration section class Person private: string firstname; string lastname: char middleinit:

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

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

Rules In Database Systems Third International Workshop Rids 97 Sk Vde Sweden June 26 28 1997 Proceedings Lncs 1312

Authors: Andreas Geppert ,Mikael Berndtsson

1997th Edition

3540635165, 978-3540635161

More Books

Students also viewed these Databases questions

Question

4.3 Rational Exponents please do number 1 from a to i Show ur work

Answered: 1 week ago

Question

What is the relation of physical mathematics with examples?

Answered: 1 week ago

Question

What are oxidation and reduction reactions? Explain with examples

Answered: 1 week ago