Question: How to do this in java run It has an ArrayList of type Staff Has a readData method, that reads an input.txt file line by

How to do this in java

run

It has an ArrayList of type Staff

Has a readData method, that reads an input.txt file line by line,

i.if the first word on the line was Professor, creates a Professor object (adding the next four arguments as name, hourlyRate, hoursWorked, and Salary) and adds it to the ArrayList of type Staff.

ii.if the first word on the line was AdminStaff, creates a Professor object (adding the next four arguments as name, hourlyRate, hoursWorked, and Salary) and adds it to the ArrayList of type Staff.

Has a printPayments method that goes through the every element in the Staff arrayList in a loop, and calculates and prints their monthlyPayment to the console.

i.The array might have any number of professors or administrative staffs with any orders. The program should work fine for any number and any orders.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!