Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

By now you have completed the following classes: Person and Employee. public class Person { protected String fName; protected String lName; public Person() { this.fName

By now you have completed the following classes: Person and Employee.

public class Person { protected String fName; protected String lName; public Person() { this.fName = ""; this.lName=""; } public Person(String fName, String lName) { this.fName = fName; this.lName = lName; } public String getfName() { return fName; } public String getlName() { return lName; } public String getFullName(){ return getfName()+" "+getlName(); } }
public class Employee extends Person { private double annualSalary; private int hiresDate; private int identificationNo; private String department; public Employee() { super(); annualSalary = 0; hiresDate = 0; identificationNo = 0; department = ""; } public Employee(double annualSalary, int hiresDate, int identificationNo, String department) { this.annualSalary = annualSalary; this.hiresDate = hiresDate; this.identificationNo = identificationNo; this.department = department; } public Employee(String fName, String lName, double annualSalary, int hiresDate, int identificationNo, String department) { super(fName, lName); this.annualSalary = annualSalary; this.hiresDate = hiresDate; this.identificationNo = identificationNo; this.department = department; } public double getAnnualSalary() { return annualSalary; } public int getHireDate() { return hiresDate; } public String getDepartment() { return department; } public void setAnnualSalary(double annualSalary) { this.annualSalary = annualSalary; } public void setIdentificationNo(int identificationNo) { this.identificationNo = identificationNo; } public void setHiredDate(int hiresDate) { this.hiresDate = hiresDate; } public void setDepartment(String department) { this.department = department; } public boolean equals(Employee employee) { return identificationNo == employee.identificationNo; } // write output public String printDetails() { return "Name: " + getFullName() + "Salary $" + annualSalary + ", Hire Date: " + hiresDate + ", Identification No: " + identificationNo + ", Department: " + department; } }

Create a Faculty class, and a Staff class. The Faculty class should have an attribute to store the Faculty's title (a String) for example "Instructor", "Assistant Professor". The Staff class should have an attribute called pay grade (an integer from 1 to 20)

Upload ONLY the Faculty class and the Staff class

In JAVA

Correct attributes

default constructor

constructor with parameters

accessor

mutator

WriteOutput

Correctly derive classes from Employee

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

3. Provide advice on how to help a plateaued employee.

Answered: 1 week ago