Question: For this Programming Project, start with implementations of the Person, Student, and Undergraduate classes as depicted in the following figure and the polymorphism demo in

For this Programming Project, start with implementations of the Person, Student, and Undergraduate classes as depicted in the following figure and the polymorphism demo in program listing-1. Figure-1publicclass PolymorphismDemo {publicstaticvoid main(String[] args) { Person[] people = new Person[4]; people[0] = new Undergraduate("Cotty, Manny", 4910, 1); people[1] = new Undergraduate("Kick, Anita", 9931, 2); people[2] = new Undergraduate("Debanque, Robin", 8812); people[3] = new Undergraduate("Bugg, June", 9901, 4);}for (Person p: people)

{p.writeOutput();System.out.println();}}}Program Listing-1 Define the Employee, Faculty, and Staff classes as depicted in Figure-1. The Employee class should have instance variables to store the employee ID as an int and the employees department as a String. The Faculty class should have an instance variable to store the faculty members title (e.g. "Professor of Computer Science") as a String. The Staff class should have an instance variable to store the staff members pay grade (a number from 1 to 20) as an int. Every class should have appropriate constructors, accessors, and mutators, along with a writeOutput method that outputs all of the instance variable values.Modify the program in Program Listing -1 to include at least one Faculty object and at least one Staff object in addition to the Undergraduate and Student objects. Without modification to the for loop, the report should output the name, employee ID, department, and title for the Faculty objects, and the name, employee ID, department, and pay grade for the Staff objects.Rubrics:The project will receive a maximum grade according to the following breakdown:Program compilesProgram runs correctly Program demonstrates proper style and documentation

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!