By now you have completed the following classes: Person and Employee.
Create a Faculty class, and a Staff class. Both of these are derived from Employee. (This means that Employee is the super class of both Faculty and Staff). The Faculty class should have an attribute to store the Faculty's title (a String) for example "Instructor", "Assistant Professor". The Staff class should have an attribute called pay grade (an integer from 1 to 20)
Write a main to fully test your classes. Since they are derived from Employee, and Employee is derived from Person, you will need to have all these classes in your project. It isn't easy to copy and paste whole files in netBeans, I have found the easiest way to get Person and Employee into this project is to cdreate the class again so you have the correct package, and then copy the code from a previous project.
Upload ONLY the Faculty class and the Staff class to canvas
By now you have completed the following classes: Person and Employee. Create a Faculty class, and a Staff class. Both of these are derived from Employee. (This means that Employee is the super class of both Faculty and Staff). The Faculty class should have an attribute to store the Faculty's title (a String) for example "Instructor", "Assistant Professor". The Staff class should have an attribute called pay grade (an integer from 1 to 20) Write a main to fully test your classes. Since they are derived from Employee, and Employee is derived from Person, you will need to have all these classes in your project. It isn't easy to copy and paste whole files in netBeans, I have found the easiest way to get Person and Employee into this project is to cdreate the class again so you have the correct package, and then copy the code from a previous project. Upload ONLY the Faculty class and the Staff class to canvas. store extend Perso anulary yerited, Talumber String departe Employee aile Salary, int yatired, int Idhunter, String department) torte setting a while rating the best TheStary Salary this year tired - yesired! this.Lambe Tube thandepartat departe 1 and acor Voltanlar Salary) this.anabalary Annual salary heutelsalary en analatya 1 Woad weaver) - k BE TE 1 instead teren yerler 1 Wuds amb this.tatt - be 21 20 htget() In the department in den Chi departe department i depan blas on WriteOutput was Pets petha uts pod TE 25 > 48 49 50 51 52 53 54 55 56 57 se 59 public class Test: /testing class. public static void main(String args[]) { System.out.println("Testing Class Person "); Person Peroby new Person (): System.out.println (Peroby.name); //prints null System.out.println("Teating Class Employee "); Employee Empobj1 - new Employee (50000.0, 2020, 122, "IT");//instialize ung constructor Empobj1. IdNumber - 120; using mutator Empoyee Empoby2 - new Empoyee (45000.0, 2020,120,"SALES"): System.out.println (Empobjl.equals(Empobj1, Empobj1)); //prints the 60 61 2 3 4 5 6 7 B 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 class Person ( public String name; Person() (l/default constructor name = null; //setting name to null } Person(String name) { //Parametderized constructor this.name = name; //set valuue to the passed string 3 String getName() [//accessor return name: } void setName(String name) {//modifier this.name = name; } boolean hasSame Name (Person objl, Person obj2) [W/ function with a return type of boolean if (obj.name == obj.name) ( 77 compare if 2 objects have the same value of name return true; > else { return false; ) 3 public void WriteOutput() { System.out.println("Name: + name); Source History 9 class Employee extends Person Houble annual salary: int year Hired, IdNumber: String department: Employee (double annualSalary, int year Hired, int IdNumber, String department) 1 /parameterized constructor for this.annualSalary - annualSalary: et vales passed in an argument this.year Hired - year Hired: this. IdNumber - IdNumber: this.department - department: 10 > V/Accessors and Mutators 12 void setAnnualSalary (double annual salary) 13 this. annual salary - annualSalary: 14 } 15 double getAnnuelSalary) 16 return annual salary: 17 > 10 void set Yeartired (int year Hired) 19 this.yearllired - year Hired; 20 1 int getYeariired() seturn yearHired: 23 void setIdNumber(int IdNumber) this. IdNumber - IdNumber: 25 26 27 int get Idlumber() Eeturn lalumber 29 void department istuing department) this.department department 31 String department return department 1 public void writeOutput - na 35 19 Boolean equals(ployees. Employer tel. Tarptautis) Proyee empa) IdNumber emp2.IdNumber return true; ; 41 42 43 44 45 46 47 else { return false; ) ) > 48 49 50 S1 52 53 54 55 56 public class Test Wang public static void main(String args) System.out.println(stan): Person Perobu - new Person System.out.println(Perobj.name) went System.out.println(reatin C): Employee Empol-new Employee (50000.0, 2020, 122, 1): initialize wing constructor Empob) 1. IdNumber - 1205 Horant Empoyee Empobja - new Empoyee (45000.0,2020, 120,"SALE); System.out.println (Empobal.equals (Empob 11, Empoby)); Print True 3 1 57 58 59 60 GL LI Source Person_1.javax History NE 3 4 class Person public String name: Person() { //default constructor name = null; //setting name to me 6 7 8 9 10 12 13 14 15 16 17 18 3 Person (String name) [Parametderized constructor this.name = name; aet value to the passed string } String getName() accessor return name; } void setName (String name) modifier this.name = name; } boolean hasSame Name (Person obj1, Person ob32) function with a return type of boolean if (objl.name == obj2.name) { floompere ir 2 geces have the same value of name return true: else { return false; 19 20 21 22 23 24 25 26 27 28 29 3 public void writeOutput() { System.out.println("Name: " + name); 3