Question: Using C++ Create a class that represents a phone number. The phone number class has a 3-digit area code, and a 7 digit phone number.
Using C++
Create a class that represents a phone number. The phone number class has a 3-digit area code,
and a 7 digit phone number. The class also has the following:
a. Default constructor that sets the area code to 000 and the phone number to 0000000
b. Overloaded argument constructor that takes in a 3 digit area code as input, and a 7 digit phone number as input (do not allow any signs)
c. Add accessor and mutator functions
d. Overload the output operator (<<) so that it displays the phone number as (###) ### -
####
Write a driver program that asks the user to enter 5 phone numbers and sets them to the
PhoneNumber objects. Display the numbers ordered by area code.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
