Question
Java Programming Create a simple class named UseEmployee. import java.util.ArrayList; import java.util.Scanner; public class UseEmployee { public static void main(String[] args) { Payrol somePayrol =
Java Programming
Create a simple class named UseEmployee.
import java.util.ArrayList;
import java.util.Scanner; public class UseEmployee { public static void main(String[] args) { Payrol somePayrol = new Payrol(); somePayrol.doPayrol(); } } //----------------------------------------------------- /* * Payrol.java * Interacts with the user to create and store employees ... * * @author * @since * @version 1.0 */ class Payrol { ArrayListemployees = new ArrayList ........ ........ }();
In class Payrol, implement the following additional requirements:
Implement the following method that adds a previously created employee to the array list.
public void addEmployee(Employee e)
Create a similar method to the one described above that removes an employee from the array list
Create the following method that would creates a SalatyBasedEmployee and adds it to the arraylist. The method will ask the user for the required information for creating the salaried employee object and once its created, it adds it to the array list:
public void createSalariedEmployee()
Create a similar method to the one above that would creates an HourlyEmployee and adds it to the array list
In doPayrol(), write code that invokes each of the above methods twice (effectively creating four employees). Display all employees currently in the array list
Create a method that would find and display an employee record based on his/her Employee ID. Call this method from doPayrol() to find a specific employee:
public void displayEmployeeInfo(String employeeID)
Create a method that will search for all salaried employees in the array list and give them all 10% raise. Note: you should use instanceof operator. Call this method from doPayrol()
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