Question
C++ Linked List- Create a basic class called Phone The class must have the following attributes 3 integers Area_code, exchange & number 1 boolean unlisted
C++ Linked List-
Create a basic class called Phone
The class must have the following attributes
3 integers Area_code, exchange & number
1 boolean unlisted
You will have two constructors for this class one parameterized and the non-parameterized constructor that sets all values to 0 or false
make sure the AreaCode and Exchange are between 0 and 999
make sure that the number is between 0 and 9999
There must be the following behaviors
setPhone( ) that has all values passed
pntPhone() That would display the number in the format Given the Area_code=269, exchange=555, number=1212 unlisted=true (269)555-1212 is unlisted Given the Area_code=269, exchange=555, number=1234 unlisted=false (269)555-1234 is listed
Have the object overloaded<< to do the same as pntPhone() above
dial() the prints to the screen the number only such as 2695551234
unlist() that will make the number unlisted
list() that will make the number listed
Add to the Phone class above the pointer attributes to be able to dynamically allocate the phone records and store them in a linked list
It is okay for the attributes to be publicly accessible for this lab.
You will want to interactively enter the values. Stop adding to the list when the area code of the phone number is 555.
After the stop entry of 555 has been entered print the list in order of entry
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started