Question: using java; Create two files to submit: Payroll.java - Class definition PayrollClient.java - Contains main() method Build the Payroll class with the following specifications: 4

using java;

Create two files to submit:

Payroll.java - Class definition

PayrollClient.java - Contains main() method

Build the Payroll class with the following specifications:

4 private fields

String name - Initialized in default constructor to "John Doe"

int ID - Initialized in default constructor to 9999

doulbe payRate - Initialized in default constructor to 15.0

doulbe hrWorked - Initialized in default constructor to 40

2 constructors (public)

Default constructor

A constructor that accepts the employees name, ID, and pay rate as arguments. These values should be assigned to the objects name, ID, and payRate fields.

7 public member methods (mutators, accessors, and other) (8 pts)

getName()

getID()

setPayRate() & getPayRate()

setHrWorked() & getHrWorked()

A method named grossPay that returns employees gross pay (=hrWorked * payRate)

(2) In main(), create two Payroll objects: one use the info inputted by the user, and the other use the default constructor, and print the info for each employee

using java; Create two files to submit: Payroll.java - Class definition PayrollClient.java

14.9 pro9_obj&Class(payroll) (1) Create two files to submit Payroll.java - Class definition PayrollClient.java Contains main method Build the Payroll class with the following specifications .4 private fields o String name-Initialized in default constructor to John Doe o int ID - Initialized in default constructor to 9999 o doulbe payRate Initialized in default constructor to 15.0 o doulbe hrWorked - Initialized in default constructor to 40 2 constructors (public) o Default constructor o A constructor that accepts the employee's name, ID, and pay ate as arguments. These values should be assigned to the objects name, ID, and payRate fields. 7 public member methods (mutators, accessors, and other) (8 pts) o get DO o setHrWorked0 & getHrWorked0 o A method named grossPay that returns employee's gross pay (-hrWorked payRate) (2) In main0, create two Payroll objects: one use the info inputted by the user, and the other use the default constructor, and print the info for each employee (2 pts) Ex: En name ID.p pay rate, and hours worked of an employee ter the Linda Smith 1234 20.5 35 Employee Name Lind? 3mith John Doe Pay Rate 20.50/hr $15.00/hr Hrs Worked 35.0 40.0 ID Gross Pay 1234 $717.50 600.00

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!