Question: Question 2 (Inheritance): 5 Points You are given classes called Person , Student , Faculty , Employee and Manager . Assume that the class Person

Question 2 (Inheritance): 5 Points

You are given classes called Person, Student, Faculty, Employee and Manager.

Assume that the class Person is defined as follows:

public class Person {

public String getName() {

}

}

1. Complete the class definitions below:

public class Student {

public int getId() {

}

}

public class Faculty {

public String getRank() {

}

}

public class Employee {

public double getSalary() {

}

}

public class Manager {

public Boolean getStatus() {

}

}

2.1 Complete the main() method below to create an array of 200 objects of different types (Person, Student, Faculty, Employee and Manager) in a random fashion.

public static void main(String[] args) {

}

2.2 Make sure to call the following methods in the main() method:

public String getName()

public int getId()

public String getRank()

public double getSalary()

public Boolean getStatus()

public static void main(String[] args) {

}

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!