Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 {  ArrayList employees = 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

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_2

Step: 3

blur-text-image_3

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

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions

Question

How can we visually describe our goals?

Answered: 1 week ago

Question

Explain budgetary Control

Answered: 1 week ago

Question

Solve the integral:

Answered: 1 week ago

Question

What is meant by Non-programmed decision?

Answered: 1 week ago

Question

What are the different techniques used in decision making?

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago