Question
Book:- Java An introdcution to problem solving and programming 7ed plz give the write code in Java and make sure that the output is macthing
Book:- Java An introdcution to problem solving and programming 7ed
plz give the write code in Java and make sure that the output is macthing with my prof output.
The Assignment:
Chapter 8:
Programming Projects 6: This project is found starting on page 664
Assignment Guidelines:
For this Programming Project, start with implementations of the Person, Student, and Undergraduate classes as depicted in Figure 8.4 and the polymorphism demo in Listing 8.6. Define the Employee, Faculty, and Staff classes as depicted in Figure 8.2. 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 Listing 8.6 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.
Note:
1. The solution must use the class Employee2, to distinguish it from the Employee class from Practice Program 1.
2. The project must have the following classes:
a. person, in file person.java
b. student, in student.java
c. underGraduate, in underGraduate.java
d. employee2, in file employee2.java
e. faculty, in file faculty.java
f. staff, in staff.java
g. polymorphismDemo, in a file polymorphismDemo.java
Sample output:
----jGRASP exec: java PolymorphismDemo Name: Cotty, Manny Student Number: 4910 Student Level: 1 Name: Kick, Anita Student Number: 9931 Student Level: 2 Name: DeBanque, Robin Student Number: 8812 Name: Bugg, June Student Number: 9901 Student Level: 4 Name: Mock, Kenrick Dept: Computer Science Employee ID: 3056 Title: Professor of Computer Science Name: Jones, James Dept: Mathematical Sciences Employee ID: 1551 Pay Grade: 15 ----jGRASP: operation complete.
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