Question
start with implementations of the Person,Student, and Undergraduate classes as depicted in Figure 8.4 and the poly-morphism demo in listing in 8.6. Define Employee, Faculty,
start with implementations of the Person,Student, and Undergraduate classes as depicted in Figure 8.4 and the poly-morphism demo in listing in 8.6. Define Employee, Faculty, and graduate classes as depicted in Figure 8.4 and polymorphism demo in listing 8.6.Define Employee class and should have instance variables to store the employee ID as an integer and the employee's department as a String. The Faculty class should have instance variable to store the faculty member's title (e.g. "Professor of Computer Science") as a String and Id as an integer. The graduate class should have an instance variable to store the student member's GPA a number from 1-4 as an integer.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 listing 8.6 to include Faculty objects and graduate objects in addition to the Undergraduate and Student objects. Without modification to the for loop.
Step 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