Question
Working With Functions in C++ You currently employ several employees that are paid according to their status within your company. Employees can be categorized as
Working With Functions in C++ You currently employ several employees that are paid according to their status within your company. Employees can be categorized as Salaried, Hourly or Contracted. Write a program that calculates the employees weekly net pay based on the criteria below. Implement overloaded functions when calculating the gross pay and tax amount for each employee. Implement other functions as needed to construct a well-structured program. The program should continue to loop until the user indicates that they are done (you determine how). The total gross pay and tax amount for all employees should be displayed at the end of the program execution in addition to individual calculations for each employee. Keep the following points in mind when creating your flowchart and program: Name your company and prepare a professional looking paystub for each employee. Output should be labeled, aligned, and formatted to 2 decimal places. User will enter S, H, or C to indicate pay status. Overloaded Gross pay function calculations: o Salaried employees accepts yearly salary and returns calculated weekly amount by dividing amount by 52(weeks). o Hourly employees accepts hourly rate and number of hours worked. Returns calculated amount. Hours worked can include portion of hour. Employees working over 40 hours are paid 1.5 the hourly rate for hours over 40. o Contracted employees function accepts total amount of contract and number of weeks (integer value). Returns weekly amount by dividing amount by weeks. Overloaded Tax function calculations: The tax rate for salaried and contracted employees earning over $3000 for the week is .075. The user inputs the tax amount for salaried and contracted employees if the weekly gross pay is less than $3000 o Hourly employees should be prompted as to whether they want to use the default tax rate of .075 or enter their own tax rate. Error checking should include valid status entries and negative values. Add a comment to the top of your program that includes your name, the program name, and a description of the program code. Include detailed comments throughout your program. Do not use arrays, gotos, breaks (except for switch), or exit statements in your code. Global variables should NOT be used in your code. All variables should be declared locally in main() Test your calculations! Save the file as NetPay lastname.cpp or main.cpp After completing the assignment attach your NetPay lastname.cpp or main.cpp file and flowchart /pseudocode to the Assessment link for grading.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started