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. Dont 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 PersonString first, String middle, String last, Address homeAddress, String phoneNumber, String emailBefore 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 providedHome Address: None givenNone given, VAPhone Number: None givenEmail Address: None givenID: Remember 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 parameter that is to be the new value for the instance variable.If the output is correct, feel free to comment out line 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 LuongHome Address: FakeHome StreetStaged City, VAPhone Number: Email Address: fake@ mymail.vcu.eduID: Student Level:Freshman Student:Alice MyersHome Address: FakeHome StreetStaged City, VAPhone Number: Email Address: fake@ mymail.vcu.eduID: Student Level:Senior Faculty:Maria L GarciaHome Address: West Main StreetRichmond, VAPhone Number: Email Address: fake@vcu.eduID: Office:KLSalary:$Date Hired:Rank:Assistant Professor Faculty:Michael Junior CookHome Address: West Main StreetRichmond, VAPhone Number: Email Address: fake@vcu.eduID: Office:JLSalary:$Date Hired:Rank:Instructor Staff:Shane DaveHome Address: Staged Home RoadDummy, VAPhone Number: Email Address: fake@vcu.edu
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
