Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN C++ microsoft visual studios 2013 Create a simple programmer prototype Library using a .h header file for your GrossPay Function Prototypes. Write a .cpp

IN C++ microsoft visual studios 2013 Create a simple programmer prototype Library using a .h header file for your GrossPay Function Prototypes. Write a .cpp file that includes your functions from your Gross Pay program but no prototypes. Create a program called OverTime that calls getHoursWorked(), and getPayRate() from your GrossPay .cpp file. Make sure that for 40 hours or below, call CalcGross() from your GrossPay program. For more than 40 hours, write a new method (outside of main) in your OverTime program that pays the first 40 hours at straight Pay Rate and anything above 40 hours at 1.5 times Pay Rate. Note - If there were any issues in your old Gross Pay program, make sure they are fixed before using the code for this program.

Here is my gross pay program

#include "stdafx.h" #include using namespace std;

//functions prototype

double getHoursWorked(double hours); double getPayRate(double rate); double calcGross(double gross);

//defining functions int getHoursWorked() { int hours; cout << "Enter the hours worked: ";//prompt user to enter number of hours worked cin >> hours; return hours; } double getPayRate() { double rate; cout << "Enter the pay rate: "; //promt user to enter pay rate cin >> rate; return rate; } double calcGross(int hours, double rate) { return hours * rate; }

int main()

//calling functions getHoursWorked, getPayRate, calcGrossPay

{ int hours = getHoursWorked(); double rate = getPayRate(); double pay = calcGross(hours, rate); cout << "The gross pay is " << pay << endl;//output the gross pay return 0; }

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

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions

Question

Does the business have a well-defined target market?

Answered: 1 week ago

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago