Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Class CSC 202 Project 2 PLEASE I OLNY NEEDJAVA FILE FOR SECTION that I wrote them in Paranthasm Because the question already answered for me

Class CSC 202

Project 2

PLEASE I OLNY NEEDJAVA FILE FOR SECTION that I wrote them in Paranthasm Because the question already answered for me and I do not need more thing BUT what I only need is AVA FILE for (PolymorphismDemo class, Person class, Student class, Undergraduate class,Employee class,Staff class,Faculty class). I appreciate that

CSC202-001N. Project-1

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-1

Figure -2

public class PolymorphismDemo {

public static void 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

Start with implementation of the Person, Student, and Undergraduate classes as shown In Figure-1 and the program listing In Listing-1.

Define the Employee, Faculty, and Staff classes as depicted in Figure-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 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 compiles
  • Program runs correctly
  • Program demonstrates proper style and documentation

Please follow all the instructions as below: 1. Submit your Java program (.java) file without any error so that I can compile and run the program in my machine without any issue and the program should give the correct output. 2. Submit a picture of the output of your program captured as a screen shot from your laptop/desktop. You can paste the screen shot of your output in a Microsoft word file and submit along with your Java code. 3. The program should have enough comments so that I know you understand each step of your code.

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

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

Why is a blind purchase order used as a receiving report document?

Answered: 1 week ago

Question

=+related to the duties and

Answered: 1 week ago