Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++,

image text in transcribed

image text in transcribed

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

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_2

Step: 3

blur-text-image_3

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

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions