Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

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

Power Bi And Azure Integrating Cloud Analytics For Scalable Solutions

Authors: Kiet Huynh

1st Edition

B0CMHKB85L, 979-8868959943

More Books

Students also viewed these Databases questions