Question: WRITE IN JAVA : Create a class Person with the following attributes: String Name Sting Email int Age Implement the following methods: Identify(), which will

WRITE IN JAVA:

Create a class Person with the following attributes:

String Name

Sting Email

int Age

Implement the following methods:

Identify(), which will print Name, Email, Age

String getName(), which will return a String of the Person Name

String getEmail(), which will return a String of the Person Email

int getAge(), which will return an integer of the Person Age

Create interface Worker with the following method:

int getSalary(), values can be between 20000 and 90000

Create interface AcademicInterest

String getInterest(), Value can be only Java, Management, Finance

Create a class Student which will extend Person and implement AcademicInterest with the following parameter:

int avgrade;

and method:

int getAvgrade(), values ranging only between 5 to 10

Create a class Teacher which will extend Person and implement Worker and AcademicInterest with the following parameter:

int rating;

and methods:

int getRating(), values ranging only between 5 to 10

Identify(), override method so it says he/she is a Teacher

Create a class Plummer which will extend Person and implement Worker with the following method:

Identify(), override method so it says he/she is a Plummer

********************* MAIN TASKS *****************

1. In the main method instantiate an array of 10 Persons

2. You must create at least one object of type (Worker, Student, Teacher, Plummer).

3. Create the following input menu:

1) Identify all Workers that have a Salary lesser than 50000

2) Identify all Teachers with a rating lesser than 8

3) Count People with the same academic interest (example Java :3, Management: 1, Economics: 1, Finance 2

4) Group Students and Teachers that share the same academic interest and have average grade and rating lesser than 8. (ex. Java: Dan, John, Daisy; Finance: Luke, Helen, Richie)

********************* SAMPLE DATA IMAGE2 *********************

********************* SAMPLE RESULTS IMAGE1*******************WRITE IN JAVA: Create a class Person with the following attributes: String

Name Sting Email int Age Implement the following methods: Identify(), which will

Choose an option 1: Identify all Workers with Salary lesser than 50000mkd 2: Identify all Teachers with Rating lesser than 8 3: Count People with the same academic interest 4: Group Students and Teachers that share the same academic interest and have average grade and rating lesser than 8 1 \{Plummer\} - Name: John Email: john@gmail. com Age: 48 \{Teacher\} - Name: Richie Email: richie@gmail. com Age: 52 \{Teacher\} - Name: Homer Email: homer@gmail. com Age: 42 *************************** Do you like to list more? 1 Choose an option 1: Identify all Workers with Salary lesser than 50000mkd 2: Identify all Teachers with Rating lesser than 8 3: Count People with the same academic interest 4: Group Students and Teachers that share the same academic interest and have average grade and rating lesser than 8 3 Java: 5 Management: 3 Finance: 0 Do you like to list more? 0 BUILD SUCCESSFUL (total time: 33 seconds)

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!