Question: Use the following UML class diagram to create Java classes: person extend student extend emlyee and plz write the whole program becuase its simple Final

 Use the following UML class diagram to create Java classes: person

Use the following UML class diagram to create Java classes:

person extend student extend emlyee

and plz write the whole program becuase its simple Final exam

thanks

Person - nam e: Strin +Person +Person(String) +setNam e(String void +getName0: String +display0: void +hasSam eNam e(Person: boolean Student Employee studentID: int +Student0 +Student(String, int) +setID(int) : void +getIDO: int +display0: void HiSE salary: double +Employee(String double) +setSalary(double): void +getSalary0: double +display0: void Student boolean Note that a. Method display0 in Person prints out the name ofthe person. b. Method display0 in Student prints out the name and the ID of the student. c. Method display) in Employee prints out the name and the salary of the employee. d. Method hasSameName(Person) compares the names. e. Method isEqual(Student) compares the names and ID. It should use the method hasSameName(Person). 2. Create a Java program to do the following: Create an arrav of 10 persons Let the user enter data about 10 persons with information related to whether they are students, employees or just persons. Check if there is a duplicate records of students Check if there is a student and employee who have the same name. a. b. c. d. Person - nam e: Strin +Person +Person(String) +setNam e(String void +getName0: String +display0: void +hasSam eNam e(Person: boolean Student Employee studentID: int +Student0 +Student(String, int) +setID(int) : void +getIDO: int +display0: void HiSE salary: double +Employee(String double) +setSalary(double): void +getSalary0: double +display0: void Student boolean Note that a. Method display0 in Person prints out the name ofthe person. b. Method display0 in Student prints out the name and the ID of the student. c. Method display) in Employee prints out the name and the salary of the employee. d. Method hasSameName(Person) compares the names. e. Method isEqual(Student) compares the names and ID. It should use the method hasSameName(Person). 2. Create a Java program to do the following: Create an arrav of 10 persons Let the user enter data about 10 persons with information related to whether they are students, employees or just persons. Check if there is a duplicate records of students Check if there is a student and employee who have the same name. a. b. c. d

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 Databases Questions!