Purchase Solution

C++ class

Not what you're looking for?

Ask Custom Question

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.

Purchase this Solution

Solution Summary

define a person class using c++

Purchase this Solution


Free BrainMass Quizzes
Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Javscript Basics

Quiz on basics of javascript programming language.

C++ Operators

This quiz tests a student's knowledge about C++ operators.