Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ using visual studio please! Program Overview Write a program to generate an employee pay report. The program should read all data from an input

C++ using visual studio please!

Program Overview Write a program to generate an employee pay report. The program should read all data from an input file and write out all the results to an output file. DO NOT ASK THE USER FOR ANY INPUT!!! You must do the following as part of the assignment: Use Git version control on the program throughout development. Demonstrate that you can use some of the debugging features of Visual Studio (details below). Properly commenting the program using the commenting style defined in the commenting document on Blackboard. Use .h/.cpp files to store function prototypes and function definitions. Read and write ALL data to/from files. The program should work no matter how many records are in the file. The output should be in report format (see below for sample output). Git Version Control The project directory you submit must be under Git version control. You should periodically execute commits to save your progress. You must execute at least three commits for this assignment during development. The commits should be spaced out evenly. Do not wait until the end of your development to do all the commits. Console Application Create a C++ console application. It should contain at least the following files: A .cpp file for the main function. A .h file for the pay function prototypes. A .cpp file for the pay function definitions. Main Function Specifications The main function should read and write data using files (not the keyboard). You should use the functions that you write to do all calculations. It needs to be able to read all data from the input file no matter how many records are there. It should not be necessary to recompile the program for it to work with a different number of records from the input file. All output data should be written to an output file (not the screen). Functions Write the following functions as part of your program. Remember to properly create them using .h/.cpp files. Function Specifications Signature Description double GrossPay(double hours, double rate) This function should return the gross pay. double TaxPct(double grossPay) This function should return the following: Less than 200 .1 Greater than or equal to 200 and less than 500 .15 Otherwise .20 double FinalPay(double grossPay, double taxPct) This function should return the final pay with taxes deducted from it. Use the taxPct to calculate the tax amount that should be deducted. Input Data File Format FirstName LastName PayRate Hours FirstName LastName PayRate Hours Sample Input Data File (notice there is no descriptive text, just the data) Rose Diaz 25 40 Mateo Lopez 15 30 Jane Smith 20 30 John Brown 10 15 Sample Output File (1 record per line in report) First Last Pay Rate Hours Gross Tax Pct Final Rose Diaz 25.00 40.00 1000.00 0.20 800.00 Mateo Lopez 15.00 30.00 450.00 0.15 382.50 Jane Smith 20.00 30.00 600.00 0.20 480.00 John Brown 10.00 15.00 150.00 0.10 135.00 1 Record 1 Record 1 Record 1 Record Demonstrate Debugger Usage You must do ALL of the following using the Visual Studio debugger: Set a normal breakpoint and show it being hit while the program is running. Set a conditional breakpoint and show it being hit while the program is running. Show the values of the name, price, quantity, discount pct, and cost in a watch window in the debugger while the program is running. Show the call stack when inside of the CalculateCost function while the program is running (you need to set a breakpoint in the CalculateCost function). You must take a screen shot for each bullet in the above list.

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

Handbook Of Database Security Applications And Trends

Authors: Michael Gertz, Sushil Jajodia

1st Edition

1441943056, 978-1441943057

More Books

Students also viewed these Databases questions

Question

=+6 Who is the peer of the IA ?

Answered: 1 week ago

Question

=+herself to in terms of equity with regard to this assignment?

Answered: 1 week ago