Homework 11

2010_F18/wk11/hw11.cpp

For this assignment you will be creating a class definition for a Contact, like one that you would add to your phone. Each Contact will have a first name, last name, phone number, and email. Within the class definition, there will be an accessor and mutator function for each member variable. Also, inputContact and displayContact. Main will behave like the previous homework assignment, which will be a menu based program that will display options to add a new contact, display all contacts, search for a contact by first name, and exit.

Contact

Member Variables

cstring member variables for first name, last name, phone number, and email. Each of these member variables will be private and have a static size of 32.

public member functions

Each member function will be declared (prototype) within the class definition and defined outside the class definition (scopeResolution::operator)

Default Constructor

The default constructor will initialize the each cstring member variable to an empty string. The definition will be outside the class definition

Destructor

The destructor will assign '\0' to the first subscript of each member variable. The definition will be outside the class definition


Global Functions