Answered step by step
Verified Expert Solution
Question
1 Approved Answer
//NOTE: THIS IS THE REGULAR EMPLOYEE CLASS -- Needs a tweek for ABSTRACT CLASS & must add abstarct method. public class Employee { //Private instance
//NOTE: THIS IS THE REGULAR EMPLOYEE CLASS -- Needs a tweek for ABSTRACT CLASS & must add abstarct method. public class Employee { //Private instance variable fields private String employeeName; private int employeeId; private boolean isWorking; // true if currently working; false otherwise // Constructor - All args passed in as Strings public Employee(String name, String id, String isworking) { employeeName = name; employeeId = Integer.parseInt(id); isWorking = Boolean.parseBoolean(isworking); } public String getName() { return employeeName; } public void setName(String name) { employeeName = name; } public int getEmployeeId() { return employeeId; } public void setEmployeeId(int id) { employeeId = id; } public boolean isWorking() { return isWorking; } public void setIsWorking(boolean employed) { isWorking = employed; } public String toString() { return employeeName + "\t" + employeeId + "\t" + isWorking; } }Write a program that calculates and displays the two-week pay amount for all employees at the university Instantiate an array of Employee objects to hold data read from an input file Open the input file and reads in the employee data, saving the data into the array of Employee objects o Hint: you will need three loops, one for each type of employee o See sample input file below Close the input file Use a loop to display the list of employee data saved in the array Use a loop to display the employee name and their two-week pay for all employees who are currently working at the university See the Sample output shown below Inheritance This programming assignment allows you to demonstrate understanding of the use of inheritance and abstraction. The inheritance hierarchy diagram, generated from a jGRASP project is given below. To receive full credit on the assignment, you must adhere to the illustrated inheritance hierarchy. Employee Program4Demo abstract) main Faculty StudentEmployee Classified Staff Project Class Inheritance Other (reference, etc.) As you can see below, Employee is an abstract class with one abstract method public abstract class Employee Regular Employee class attached below Returns the two-week pay amount for the Employee public abstract double getPay0
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