Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c++ and the display menu will look like the last picture but will display options to add a new contact, display all contacts, search

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

in c++ and the display menu will look like the last picture but will display options to add a new contact, display all contacts, search for a contact by first name, and exit.

e For This Assignment You / CMPS 2010 . www.cs.csubak-edu/~derrick/cs2010/wk11.php Apps Web Slice Gallery Setup Depository Directories 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) . bool setFirstName - this function will pass in a const cstring and assign the passed parameter to the first name member variable and returm true . bool setLastName-this function will pass in a const cstring and assign the passed parameter to the last name member variable and retum true . bool setPhoneNumber - this function will pass in a const cstring and assign the passed parameter to the phone number member variable and return true . bool setEmail-this function will pass in a const cstring and assign the passed parameter to the email member variable and return true . char* getFirstName -this function will retun the cstring member variable first name . char* getLastName - this function will retum the cstring member variable last name . char* getPhoneNumber- this function will retum the cstring member variable phone number char* getEmail-this function will return the cstring member variable email . void inputcontact - this function will create a cstring called temp with static size 32. For each member variable, prompt the user for input and call the corresponding mutator function passing the temp cstring . void displayContact- this function will print each member variable of the Contact calling the corresponding accessor function 10:29 AM O Type here to search 11/15/2017 B e For This Assignment You / CMPS 2010 . www.cs.csubak-edu/~derrick/cs2010/wk11.php Apps Web Slice Gallery Setup Depository Directories 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) . bool setFirstName - this function will pass in a const cstring and assign the passed parameter to the first name member variable and returm true . bool setLastName-this function will pass in a const cstring and assign the passed parameter to the last name member variable and retum true . bool setPhoneNumber - this function will pass in a const cstring and assign the passed parameter to the phone number member variable and return true . bool setEmail-this function will pass in a const cstring and assign the passed parameter to the email member variable and return true . char* getFirstName -this function will retun the cstring member variable first name . char* getLastName - this function will retum the cstring member variable last name . char* getPhoneNumber- this function will retum the cstring member variable phone number char* getEmail-this function will return the cstring member variable email . void inputcontact - this function will create a cstring called temp with static size 32. For each member variable, prompt the user for input and call the corresponding mutator function passing the temp cstring . void displayContact- this function will print each member variable of the Contact calling the corresponding accessor function 10:29 AM O Type here to search 11/15/2017 B

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

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

1844804526, 978-1844804528

More Books

Students also viewed these Databases questions

Question

6. Vanguard

Answered: 1 week ago