Question: Do not make any changes in Name and Address classes. If you make any changes to either the Name or Address class, your program will

Do not make any changes in Name and Address classes. If you make any changes to either the Name or Address class, your program will not compile and execute correctly in Gradescope. Directory is the main class for the program. (Don't worry if there are errors showing up inside this class; it uses the Person class that you haven't written yet.) I expect you to use the main method to write tests for your code as you complete this assignment, so you are able to change this file. Don't worry if there are errors showing up inside this class.Open each of these three files and read through them so that you understand the starter code for this project. If you have any questions about the starter files, please be sure to ask for clarification before starting to implement the remaining classes.You are to implement the following classes:Person Class: The class variables and types are shown in the class diagram. Specifically, RecordNumber is a static variable. It will increase each time you instantiate a new Person object and will be assigned to the id variable of the currently created instance. Here is the signature for the parameterized constructor of Person class:public Person(String first, String middle, String last, Address homeAddress, String phoneNumber, String email)Before continuing with the remaining classes, run the main method of the Directory class. (The errors should have been eliminated once you finished implementing Person.java.) The output at this point should be the following, if the toString() method in the Person class is correct:Person:---------------------------------------Not provided Not provided---------------------------------------Home Address: None givenNone given, VA00000Phone Number: None givenEmail Address: None givenID: 1Remember that you should protect the validity of your instance variables using encapsulation. To do so, instance variables should be private and provide getters and setters to access them. Here are the rules that characterizes getters and setters:GetterA getter method have its name start with "get", take no parameters, and returns a value.SetterA setter method have its name start with "set", and takes 1 parameter that is to be the new value for the instance variable.If the output is correct, feel free to comment out line 12 in the main method of Directory.java and continue with the implementation of the remaining classes.Student Class: Student class extends Person class. It has extra variable, level, which indicates the student level as one of the following, Freshman, Sophomore, Junior, Senior, Graduate. Constructors of the Student class initialize the level variable in addition to all variables of superclass.Employee Class: Employee class extends Person It has extra office, salary and dateHired variables. Constructors of the Employee class initialize all its variables.Faculty Class: Faculty class extends Employee It has extra variable, rank, which can either be Adjunct, Instructor, Assistant Professor, Associate Professor, or Professor. Constructors of the Faculty class initialize all its variables.Staff Class: Staff class extends Employee It has extra variable which is a String called title. Constructors of the Staff class initialize all its variables.After completing the rest of the classes, uncomment the rest of the code in the main method of the Directory class. The correct output from executing the Directory program should look like this:Student:---------------------------------------Peter Luong---------------------------------------Home Address: 10 FakeHome StreetStaged City, VA22222Phone Number: 858-789-8575Email Address: fake0@ mymail.vcu.eduID: 1Student Level:Freshman Student:---------------------------------------Alice Myers---------------------------------------Home Address: 10 FakeHome StreetStaged City, VA22222Phone Number: 858-789-8576Email Address: fake1@ mymail.vcu.eduID: 2Student Level:Senior Faculty:---------------------------------------Maria L Garcia---------------------------------------Home Address: 401 West Main StreetRichmond, VA23284-3019Phone Number: 804-828-8577Email Address: fake2@vcu.eduID: 3Office:323KLSalary:$60000Date Hired:10/10/2010Rank:Assistant Professor Faculty:---------------------------------------Michael Junior Cook---------------------------------------Home Address: 401 West Main StreetRichmond, VA23284-3019Phone Number: 804-789-8578Email Address: fake3@vcu.eduID: 4Office:356JLSalary:$50000Date Hired:5/5/2015Rank:Instructor Staff:---------------------------------------Shane Dave---------------------------------------Home Address: 20 Staged Home RoadDummy, VA33333-1234Phone Number: 858-789-8579Email Address: fake4@vcu.edu

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!