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
Get step-by-step solutions from verified subject matter experts
