The class will have observers that enable each data member


Design, implement and test a class that represents a phone number. The number should be represented by a country code, an area code, a number, and a type. The first three can be integers. The type member is an enumeration of HOME, OFFICE, FAX CELL, and PAGER. The class should provide a default constructor that sets all the integer values to zero and the type to HOME. A constructor that enables all of the values to be set also should be provided. You also should provide a constructor that takes just the number and type as arguments, and sets the country and area codes to those of your location. The class will have observers that enable each data member to be retrieved, and transformers that allow each data member to be changed. An additional observer should be provided that compares two phone numbers for equality.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: The class will have observers that enable each data member
Reference No:- TGS01379923

Expected delivery within 24 Hours