Question: Need help asap, ty. Exercise 1: 1. Use the following UML class diagram to create Java classes: name: s +Person) +Person String) +setName(String) : void

Need help asap, ty.
Exercise 1: 1. Use the following UML class diagram to create Java classes: name: s +Person) +Person String) +setName(String) : void tgetN ame: String +disp lay0: void +hasSameNamel Person): boo lean Student studen tiD: int +Studento +Student String, int) +setlD(int) void getlDO: int +display): void +isEqual Student): boolean salary: double +Empby ee(String, doube) +setSalary (double) : void getSalaryO: double +di vo id Note that: a. Method display0O in Person prints out the name of the person. b. Method displayO in Student prints out the name and the ID of the student. c. Method displayO 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 array 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. Exercise 1: 1. Use the following UML class diagram to create Java classes: name: s +Person) +Person String) +setName(String) : void tgetN ame: String +disp lay0: void +hasSameNamel Person): boo lean Student studen tiD: int +Studento +Student String, int) +setlD(int) void getlDO: int +display): void +isEqual Student): boolean salary: double +Empby ee(String, doube) +setSalary (double) : void getSalaryO: double +di vo id Note that: a. Method display0O in Person prints out the name of the person. b. Method displayO in Student prints out the name and the ID of the student. c. Method displayO 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 array 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
Get step-by-step solutions from verified subject matter experts
