Question: (i) Define the method, getPayRate () , that returns either of the pay rates (regular or overtime). (j) Define the method, getHoursWorked () , that

 (i) Define the method, getPayRate () , that returns either of

(i) Define the method, getPayRate () , that returns either of the pay rates (regular or overtime). (j) Define the method, getHoursWorked () , that returns the hours worked. (k) Define the method, setNameRateHours () , that sets the name, rate and hours for the research consultant. (1) After building all the parts as above, then build a program that asks the user to enter the hours and calculates the pay as the test program. the class Person below. public class Person private String firstName; / /store the first name private String lastName; / /store the last name public Person () / /Default constructor { firstName = 11 lastName = LP / /Constructor with parameters public Person(String first, String last) setName (first, last); } / /Method to output the first name and last name public String toString( ) { return (firstName + " " + lastName); / /Method to set firstName and lastName public void setName (String first, String last) firstName = first; lastName = last; } / /Method to return the firstName. public String getFirstName () return firstName; / /Method to return the lastName. public String getLastName ( ) return lastName

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 Mathematics Questions!