Question: Create the following program using C++, Problem 2: Modify Program 8-33, pages 582, 583 (30 points) Create a program proj4_2.cpp using as starting point the

Create the following program using C++,

Create the following program using C++, Problem 2: Modify Program 8-33, pages

582, 583 (30 points) Create a program proj4_2.cpp using as starting point

Problem 2: Modify Program 8-33, pages 582, 583 (30 points) Create a program proj4_2.cpp using as starting point the program 8-33 from pages 582, 583. You can modify directly the file from the textbook data files pr8-33.cpp (click to download) but save it under the required project file name. Your program should change the struct Payinfo into class Paylnfo. For this class, the data members hours and payRate should be private. The class should have a default constructor and following member functions: void setHours(int hr); void setpayRate(double pr); int getHours0 double getPayRate); double getGrossPay:/ this function computes and if necessary adds overtime as (regular_pay+1.5*pay_rate hours_over_40) Finally, in main0 you should not have the variable grossPay since this value is available by calling getGrossPay For the given input as an example in the textbook, your program should generate the same output values. Absolutely NO GLOBAL VARIABLES ALLOWED

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!