Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago