subject

Design a payroll class with the following fields:

• name: a string containing the employee's name
• idnumber: an int representing the employee's id number
• rate: a double containing the employee's hourly pay rate
• hours: an int representing the number of hours this employee has worked

the class should also have the following methods:

• constructor: takes the employee's name and id number as arguments
• accessors: allow access to all of the fields of the payroll class
• mutators: let the user assign values to the fields of the payroll class
• grosspay: returns the employee's gross pay, which is calculated as the number of
hours worked times the hourly pay rate.

write another program that demonstrates the class by creating a payroll object, then
asking the user to enter the data for an employee in the order: name, id number, rate, hours.
the program should then print out a statement in the following format (for example, if
you had an employee named chris jacobsen with id number , who works for 5 hours at
$10/hr):

chris jacobsen, employee number , made $50.00 in gross pay.

using text forming so that the gross pay is rounded to two decimal places.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:00
Which parts of a presentation should be the most general? a. introduction and conclusion b. introduction and outline c. outline and conclusion d. outline and body
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
Write a function named printfloatrepresentation(float number) that will print the floating point representation of a number using the format given below. (sign bit) exponent in binary (assumed bit).significandfor example if the number passed an argument is 71 yourprogram should print (0) 10000101 (1).00011100000000000000000similarly if the number passed to the function as argument is -71 the program should print (1) 10000101 (1).00011100000000000000000
Answers: 3
question
Computers and Technology, 23.06.2019 18:00
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Jean has kept the content of her website limited to what is important; she has also ensured that the text follows a particular style and color all throughout her website. which website features has jean kept in mind? jean has limited the content of her website to what is important; this ensures (clarity, simplicity, harmony and unity) of the content. she has also formatted the text in a particular style and color throughout her website, ensuring (balance, simplicity, consistency)
Answers: 2
You know the right answer?
Design a payroll class with the following fields:

• name: a string containing the empl...
Questions
Questions on the website: 13722360