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 00:00
Match each vocabulary word to its definition.1. desktoppicture used to represent acomputer application2. domainnetwork protectionsoftware code that can be viewed,3. iconmodified, and redistributed for freethe background screen on acomputer monitor4. url5. blogan online journalthe part of an internet address that6. firewallrefers to a group of computers on anetworkonline database of web pages7. intranetnetwork for use by an individual8. open address of a web page or9. wikiresource
Answers: 2
question
Computers and Technology, 22.06.2019 06:20
In what kind of attack can attackers make use of millions of computers under their control in an attack against a single server or network availability confidentiality integrity identity automated attack software? those who wrongfully disclose individually identifiable health information can be fined up to what amount per calendar year? single most expensive malicious attack hipaa what are script kiddies? advanced persistent threat security manager security engineer what level of security access should a computer user have to do their job what process describes using technology as a basis for controlling the access and usage of sensitive data? cybercriminal
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
From excel to powerpoint, you can copy and paste a. cell ranges and charts, one at a time. b. cell ranges and charts, simultaneously. c. charts only. d. cell ranges only.
Answers: 3
question
Computers and Technology, 23.06.2019 18:30
Write a program that prints the day number of the year, given the date in the form month-day-year. for example, if the input is 1-1-2006, the day number is 1; if the input is 12-25-2006, the day number is 359. the program should check for a leap year. a year is a leap year if it is divisible by 4, but not divisible by 100. for example, 1992 and 2008 are divisible by 4, but not by 100. a year that is divisible by 100 is a leap year if it is also divisible by 400. for example, 1600 and 2000 are divisible by 400. however, 1800 is not a leap year because 1800 is not divisible by 400.
Answers: 3
You know the right answer?
Design a payroll class with the following fields:

• name: a string containing the empl...
Questions
question
Social Studies, 30.07.2019 08:30
question
Mathematics, 30.07.2019 08:30
Questions on the website: 13722360