Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
(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

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

Mathematical Applications for the Management Life and Social Sciences

Authors: Ronald J. Harshbarger, James J. Reynolds

11th edition

9781337032247, 9781305465183, 1305108043, 1337032247, 1305465180, 978-1305108042

More Books

Students also viewed these Mathematics questions