Problem

Implement the InternPhone class constructor as described in Exercise 6.Exercise 6The follo...

Implement the InternPhone class constructor as described in Exercise 6.

Exercise 6

The following class represents a telephone number in the United States: // SPECIFICATION FILE (phone.h)

// SPECIFICATION FILE (phone.h)enum PhoneType (HOME, OFFICE, CELL, FAX, PAGE);class Phone{public:  Phone(newAreaCode, int newNumber, PhoneType newType);  void Write() const;private:  int areaCode;  int number;  PhoneType type;}

Using inheritance, we want to derive an international phone number class, InternPhone, from the Phone class. For this exercise, we assume that the only change necessary is to add a country code (an integer) that identifies the country or region. The public operations of InternPhone are Write, which reimplements the Write function from the base class, and a class constructor, which takes four parameters corresponding to the four member fields in the class. Write the class declaration for the InternPhone class.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT