Question: Create a new Java project. Name the class Employee.java. 1. Create four instance variables: - Employee ID - Employee name - Hours Worked - Pay

Create a new Java project. Name the class Employee.java.

1. Create four instance variables:

- Employee ID

- Employee name

- Hours Worked

- Pay rate

A. Create the following methods:

- Calculate gross pay

- Calculate net pay using tax rate of 15%

- The display prints ID, name, gross pay, net pay

2. Create an application class named Payroll.

A. Create two new employees

Employee ID Employee Name Hours Worked Pay Rate
123 Bill 23.5 15.75
456 Steve 35.5 17.25

B. Call each of the methods for each employee.

C. The Payroll application does not do any calculation, only the Employee class.

D. Sample Output:

123

Bill

Gross Pay: $370.12

Net pay: $314.61

456

Steve

Gross pay: $612.38

Net pay: $520.52

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!