Explore BrainMass

C++ class

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

I need help to create a program that does the following:
Create a person class to represent a person. (Call the class personType.) To simplify things, have the class have 2 variable members for the person's first and last name. Include 2 constructors. One should be a default constructor and the other should be one with parameters. Include respective functions for:
•setting the name,
• getting the name, and
•printing the name on the screen.
Have the main program call these functions to demonstrate how they work. Also, if you could help to explain to me how both constructors can be replaced with one constructor by using a single constructor with default parameters.

© BrainMass Inc. brainmass.com March 22, 2019, 2:13 am ad1c9bdddf

Solution Summary

define a person class using c++