Question
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,
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 bigger than 20000
2) Identify all Teachers with a rating bigger than 7
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 bigger than 8. (ex. Java: Dan, John, Daisy; Finance: Luke, Helen, Richie)
SAMPLE DATA Person ppl[] = new Person[10]; ppl[0] = new Person("Dan", "mit@gmail.,com", 38); ppl[1] = new Plummer("John", "john@gmail.com", 48, 15000); ppl[2] = new Student("Jacob","jacob@gmail,com", 24,"Java", 6); ppl[3] = new Student("Ian","ian@gmail. com", 22, "Java", 8); ppl[4] = new Student("Coolio", "coolio@gmail,com", 25,"Management", 9); ppl[5] = new Student("Mark", "Mark@gmail,com", 23,"Java", 8); ppl[6] = new Teacher("Fran", "fran@gmail. com",48,"Java", 9,80000); ppl[7] = new Teacher("Richie", "richie@gmail.com",52,"Java", 8,50000); ppl[8] = new Teacher("Roger", "roger@gmail,com", 39, "Management", 8, 70000); ppl[9] = new Teacher("Homer", "homer@gmail,com", 42, "Management", 6, 40000); Choose an optionStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started