Question: PhoneNumber . Create a data type that represents a US phone number. The constructor should take three string arguments, the area code (3 decimal digits),
PhoneNumber. Create a data type that represents a US phone number. The constructor should take three string arguments, the area code (3 decimal digits), the exchange (3 decimal digits) and the extension (4 decimal digits). Include a toString method that prints out phone numbers of the form (800) 867-5309. Include a method so that p.equals(q) returns true if the phone numbers p and q are the same, and false otherwise ( java language, code as simple as possible )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
