ممكن مساعده على حل سؤال Any phone number such as (222) 767-1900 having three parts area code (222), exchange (767) and number (1900). Create a ciass PhoneNumber that is used to store a phone number as three separate parts. The ciass should contaln the following: 1- A constructor to initialize the data members 2- Read Data function to set a phone number as three parts 3- Get Data function to return the phane number as three parts 4 Print as a friend function to display the phone number using the Get_Data function. Write a C++ program to test the created class.
ممكن اتساعدني بحل السوال
Any phone number such as (222) 767-1900 having three parts area code (222), exchange (767) and number (1900). Create a ciass PhoneNumber that is used to store a phone number as three separate parts. The ciass should contaln the following:
1- A constructor to initialize the data members
2- Read Data function to set a phone number as three parts 3- Get Data function to return the phane number as three parts
4 Print as a friend function to display the phone number using the Get_Data function. Write a C++ program to test the created class.