Homework 2_ The aim of this homework assignment…solution

$25.00

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (1 vote)

Homework 2_
The aim of this homework assignment is to practice writing classes. This homework assignment will help build towards project 1, which will be to write a program implementing a Management System for a Personal Contact Book.
For this assignment, 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:
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.