Question: please answeer all parts Create a class TelephoneNumber 1. Variables (10%) 1. areaCode - three digit int 2. exchangeCode 3 digit int 3. Number -
Create a class TelephoneNumber 1. Variables (10%) 1. areaCode - three digit int 2. exchangeCode 3 digit int 3. Number - four digit int 2. Methods 1. TelephoneNumber(aString)(15\%) 1. A constructor that creates and returns a new instance o its class given a string in the form xxxxxx xxx or x xx-xxxx. 2. Throw an exception if the format is not valid 2. toString - returns a string in either of the two formats shown preiouvlsy based on if it has an area code or not. (10\%) 3. Create a file with several telephone numbers varying between the 2 formats 4. Write a program that reads the file displays the data on the screen and creates an array whose base type is telephone number (15\%) 5. Allow the user to add or delete 1 number (10\%) 6. Write the modieifed data back into the text file replacing the original contents (20%) 7. Then read/display the file. (20%)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
