Question: n c++ write a class called Contact. This class should contain information of a single personal contact. The information includes last name, first name, address,
n c++ write a class called Contact. This class should contain information of a single personal contact. The information includes last name, first name, address, phone, and e-mail address. For now you can store an address as a string. Your class should support the following functions:
note: Program must ask the user to input the information. must be private not public.
1. Constructor that initializes a Contact by accepting all the parameters. 2. Default constructor that initializes everything to default values. 3. Accessor functions for each field. 4. Mutator functions for each field. 5. Input function to solicit the information. 6. Output function to print out the information about the contact to console in a nice format. 7. Any other necessary functions you feel are appropriate.
Make sure the mutator functions accept correct formats of both email and phone number. (i.e. e-mail must be of the form [e-mail-account]@[domain-name].[top-level-domain]. Phone number should be a string of 10 digits)
Write a driver program to test you class.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
