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 04:30
There is a simple pattern for determining if a binary number is odd. what is it and why does this pattern occur? how many bits would you need if you wanted to have the ability to count up to 1000? how high could you count in binary if you used all 10 of your fingers as bits? (finger up means 1, finger down means 0)
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
How do you write an argumentative essay about the importance of free enterprise ?
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Of the following pieces of information in a document, for which would you most likely insert a mail merge field?
Answers: 3
question
Computers and Technology, 23.06.2019 20:40
Instruction active describing list features which statements accurately describe the features of word that are used to create lists? check all that apply. the tab key can be used to create a sublist. the enter key can be used to add an item to a list. the numbering feature allows for the use of letters in a list. the numbering feature can change the numbers to bullets in a list. the multilevel list feature provides options for different levels in a list.
Answers: 2
You know the right answer?
Design a payroll class with the following fields:

• name: a string containing the empl...
Questions
question
Geography, 04.02.2021 19:20
question
Mathematics, 04.02.2021 19:20
question
Mathematics, 04.02.2021 19:20
question
Chemistry, 04.02.2021 19:20
Questions on the website: 13722361