Hello, I am stuck on a particular assignment on where we:
Write a class encapsulating the concept of a telephone number, assuming a telephone number has only a single attribute: a String representing the telephone number in 10 digits (e.g. 5168761234) with no punctuation. Include a default constructor, an overloaded constructor, the accessor and mutator methods, and the methods equals() and toString(). Your toString() method should return the telephone number with punctuation (e.g. (516) 876-4257 ). Also include a method that returns the area code (first three digits). If there are less than three digits then your area code method should return “unknown area code”. In addition, write a client class to test all the methods in your class.
I am confuse how on what I should use as my variables other than the phone.
I know my private String should be the phonnumber but what should do my double or final int?
I was going to use this as starting code for this assignment: