Please I need help with this. It is for Java programming. I put what the output should look like, and I have the class diagram:
Suppose we are designing a college record-keeping program that has records for students and faculty. There is a natural hierarchy for grouping these record types: They are all records of people. o Students. The student has the ability to start from the beginning (reset) at any point, i.e., a student in 3rd year can start from the beginning with the same major or a different one. We have two kinds of students: Undergraduate Students. Undergraduate students have the following properties: Name, Student Number, Major, and Level (freshman, sophomore, junior, senior) Graduate Students. Graduate students have the following properties: Name, Student Number, Major, and Degree (Master, Doctoral) o Instructors. Instructors have the following properties: Name, ID, Salary. However, the salary is a property in the job class (can be found in slide 55 here: CS 143 Lecture 03 Inheritance Composition and Overriding Methods.pptx ) In all of the previous classes, you can check if the person (whether that a student or an instructor) is the same. (Hint: Could be done by overriding equal method). Also, you should be able to display the correct person of every person type. Your lab work consists of two parts: 1. Draw the UML Class Diagram of the system. 2. Implement the system in Eclipse using all the concepts of inheritance and composition you have learned so far. You must try your code by creating an array of 5 people, each is different. (Polymorphism) Sample Run: 2 Problems @ Javadoc Declaration Console X
Inheritance Demo [Java Application) C:\Program FilesVavaji Name: Smith, Will Type: Instructor Instructor Number: 4910 Instructor Salary: $60000.00 - - - - - - - - - - - - - - - - - - - - - - - - Name: Statham, Jason Type: Undergraduate Student Number: 9931 Student Major: Computer Science Student Level: Sophomore -- - - - - - - - - - - - - - - - - - - - - - - Name: Johnson, Dwayne Type: Student Student Number: 8812 Student Major: Engineering Name: Theron, Charlize Type: Graduate Student Number: 9901 Student Major: Physics Student Degree: Master ----------------------- Name: Clarke, Emilia Type: Person Person name : String + Person (int initialName) + setName/String newName) : void + petNamel : Strine + writeOutput: void thasSameName Person other Personl :boolean Student Instructor - student Number: int -major: String - Instructor Dint -job: Job + Student + Student (Strine initialName, int initial Student Number, String major) +resetString newName, int newStudent Number, String major : void + setStudentNumberint new Student Number): Int + writeOutput') : void equals(Student other Student): boolean get Major): String + setMajorStrine major): void + Instructor) + Instructor Strine name, int id, double salaryl + get Salary: void + setStudentNumber(int newstudentNumber): Int + writeOutput) : void +equalsinstructor other instructor): boolean Undergraduate Graduate - level : int deeree : int + Undergraduatel) Undergraduate String initialName, int initialStudentNumber, String major, int initial Level + reset Strine newName, int newStudent Number, int newlevel) : vold + getLevel): int + setlevellint new level): void writeOutpull l. void + equals Undergraduate other Undergraduate): boolean + Graduate String initialName, int initialStudent Number, String major, int degree) + resetString new Nam, int newStudent Number, String major, int degree : void .getDegreel): int setDegreelint degree) : void + writeOutput 1 : vold + equalsiGraduate other Graduate): boolean Jab role: Strine - Salary: double + Jobi) + getRole!): String + setRalelint rolel: vaid + srt Salary : double + setSalary double depreel: vold Suppose we are designing a college record-keeping program that has records for students and faculty. There is a natural hierarchy for grouping these record types: They are all records of people. o Students. The student has the ability to start from the beginning (reset) at any point, i.e., a student in 3rd year can start from the beginning with the same major or a different one. We have two kinds of students: Undergraduate Students. Undergraduate students have the following properties: Name, Student Number, Major, and Level (freshman, sophomore, junior, senior) Graduate Students. Graduate students have the following properties: Name, Student Number, Major, and Degree (Master, Doctoral) o Instructors. Instructors have the following properties: Name, ID, Salary. However, the salary is a property in the job class (can be found in slide 55 here: CS 143 Lecture 03 Inheritance Composition and Overriding Methods.pptx ) In all of the previous classes, you can check if the person (whether that a student or an instructor) is the same. (Hint: Could be done by overriding equal method). Also, you should be able to display the correct person of every person type. Your lab work consists of two parts: 1. Draw the UML Class Diagram of the system. 2. Implement the system in Eclipse using all the concepts of inheritance and composition you have learned so far. You must try your code by creating an array of 5 people, each is different. (Polymorphism) Sample Run: 2 Problems @ Javadoc Declaration Console X Inheritance Demo [Java Application) C:\Program FilesVavaji Name: Smith, Will Type: Instructor Instructor Number: 4910 Instructor Salary: $60000.00 - - - - - - - - - - - - - - - - - - - - - - - - Name: Statham, Jason Type: Undergraduate Student Number: 9931 Student Major: Computer Science Student Level: Sophomore -- - - - - - - - - - - - - - - - - - - - - - - Name: Johnson, Dwayne Type: Student Student Number: 8812 Student Major: Engineering Name: Theron, Charlize Type: Graduate Student Number: 9901 Student Major: Physics Student Degree: Master ----------------------- Name: Clarke, Emilia Type: Person Person name : String + Person (int initialName) + setName/String newName) : void + petNamel : Strine + writeOutput: void thasSameName Person other Personl :boolean Student Instructor - student Number: int -major: String - Instructor Dint -job: Job + Student + Student (Strine initialName, int initial Student Number, String major) +resetString newName, int newStudent Number, String major : void + setStudentNumberint new Student Number): Int + writeOutput') : void equals(Student other Student): boolean get Major): String + setMajorStrine major): void + Instructor) + Instructor Strine name, int id, double salaryl + get Salary: void + setStudentNumber(int newstudentNumber): Int + writeOutput) : void +equalsinstructor other instructor): boolean Undergraduate Graduate - level : int deeree : int + Undergraduatel) Undergraduate String initialName, int initialStudentNumber, String major, int initial Level + reset Strine newName, int newStudent Number, int newlevel) : vold + getLevel): int + setlevellint new level): void writeOutpull l. void + equals Undergraduate other Undergraduate): boolean + Graduate String initialName, int initialStudent Number, String major, int degree) + resetString new Nam, int newStudent Number, String major, int degree : void .getDegreel): int setDegreelint degree) : void + writeOutput 1 : vold + equalsiGraduate other Graduate): boolean Jab role: Strine - Salary: double + Jobi) + getRole!): String + setRalelint rolel: vaid + srt Salary : double + setSalary double depreel: vold