Having some trouble with this Java homework assignment
In this assignment you will be processing employee data. Youhave a number of employees (that number determined by user input).You will be recording each employee’s name, salary, and telephonenumber, as well as any other data you need or think is appropriate.It is important that you record the employee telephone number invalid form, therefore you will develop two exception classes. Youwill be developing the following classes: The class Employee whichwill be derived from the class Person (linked here:Person.java).Preview the document The class Employee should haveconstructors, accessor methods, mutator methods a toSting method,an equals method and any additional methods you feel necessary.Every Employee object should record the employee’s name, salary,and telephone number, as well as any other data you need or thinkis appropriate. The class TelephoneNumberLengthException for whenthe telephone number entered—without dashes or spaces—is notexactly ten digits. When an exception is thrown, the user should bereminded of what she or he entered, told why it is inappropriate,and asked to reenter the data. The classTelephoneNumberCharacterException for when any character in thetelephone number is not a digit. When an exception is thrown, theuser should be reminded of what she or he entered, told why it isinappropriate, and asked to reenter the data. The classDemoTelephoneNumber_yourInitials.java (where yourInitials representyour initials), a driver a program to enter employee data,including telephone number and salary, into an array. The maximumnumber of employees is 100, but your program should also work forany number of employees less than 100. After all data has beenentered, your program should display the records for all employees,with an annotation stating whether the employee’s salary is aboveor below average. Submit all 4 files.
Person.java file is
public class Person
{
private String name;
public Person()
{
name = “No name yet.”;
}
public Person(String initialName)
{
name = initialName;
}
public void setName(String newName)
{
name = newName;
}
public String getName()
{
return name;
}
public void writeOutput()
{
System.out.println(“Name: ” + name);
}
public boolean hasSameName(Person otherPerson)
{
return (this.name.equalsIgnoreCase(otherPerson.getName()));
}
}
Expert Answer
Answer to Having some trouble with this Java homework assignment In this assignment you will be processing employee data. You have…