Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Extra Credit Lab #11 C++ Design a Payroll class that has fields for an employee's name, hourly pay rate, and number of hours worked. Write

image text in transcribed
Extra Credit Lab #11 C++ Design a Payroll class that has fields for an employee's name, hourly pay rate, and number of hours worked. Write the appropriate accessor and mutator methods and a constructor that accepts the employee's name as an argument. The class should also have a method that returns the employees gross pay, which is calculated as the number of hours worked multiplied by the hourly pay Your program will also have a main program, which creates one object of that dass, initializes the fields of that object and calls the grossPay method (which is defined in the Payroll class). The main program will ask for the Employee name, pay rate, and hours worked. It will output the gross pay. Start by creating a class diagram for the Payroll class. See chapter 13 in Starting out with C++ for information on creating classes and objects in C++. Sample Output Please enter the employee name Paul lease enter the pay rate 7.25 lease enter the hours worked 40 he gross pay is $290.00 0m

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions