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, 21.06.2019 23:30
Step 1: choose your topics review the project milestone reflections you submitted for modules 1 through 4. choose the one major idea or concept from each module that you feel most applies to your life. in addition, choose an important concept from module 5 that applies to your life. step 2: write your guidebook for each module: write a catchy headline that clearly and concisely sums up your chosen idea or concept write a brief explanation that includes a description of the concept, why it is important, and how it can be applied to your life to make a positive impact choose an exciting, powerful, or engaging image that illustrates your concept remember, you are writing one for each module, so you will have a total of five headlines, five descriptions, and five images. step 3: design your guidebook choose a format to present your digital guidebook. there are many 21st century tools available for creating and submitting your work in the online environment. for more information on tools your school uses, contact your instructor or visit the web 2.0 tools area.
Answers: 3
question
Computers and Technology, 22.06.2019 14:30
The “rule of 72” is used to approximate the time required for prices to double due to inflation. if the inflation rate is r%, then the rule of 72 estimates that prices will double in 72/r years. for instance, at an inflation rate of 6%, prices double in about 72/6 or 12 years. write a program to test the accuracy of this rule. for each interest rate from 1% to 20%, the program should display the rounded value of 72/r and the actual number of years required for prices to double at an r% inflation rate. (assume prices increase at the end of each year.)
Answers: 1
question
Computers and Technology, 24.06.2019 00:40
What social factors affect your health
Answers: 3
question
Computers and Technology, 24.06.2019 10:20
Write a program that keeps asking the user for new values to be added to a list until the user enters 'exit' ('exit' should not be added to the list). these values entered by the user are added to a list we call 'initial_list'. then write a function that takes this initial_list as input and returns another list with 3 copies of every value in the initial_list. finally, inside print out all of the values in the new list. for example: input: enter value to be added to list: a enter value to be added to list: b enter value to be added to list: c enter value to be added to list: exit output: a b c a b c a b c note how 'exit' is not added to the list. also, your program needs to be able to handle any variation of 'exit' such as 'exit', 'exit' etc. and treat them all as 'exit'.
Answers: 2
You know the right answer?
Design a payroll class with the following fields:

• name: a string containing the empl...
Questions
question
Mathematics, 03.02.2020 14:57
question
Mathematics, 03.02.2020 14:57
question
Computers and Technology, 03.02.2020 14:57
question
Mathematics, 03.02.2020 14:57
question
Geography, 03.02.2020 14:57
Questions on the website: 13722359