IT Project/Programming
Note – Subject to Change
Open project template to start
Complete the following
Structures for project
struct Employee {
string firstname;
string lastname;
int hours;
int regHours;
int otHours;
double regRate;
double otRate;
double regPay;
double otPay;
double totPay;
double ficaTax;
double SSMedTax;
double totDecutions;
double netPay;
}; //Structure arrays
Employee employees[MAX_EMPLOYEES];
Write a program that will calculate the payroll for 3 employees. It will also total the payroll for the company.
Write functions that will do the following
displayMenu – displays the follows
•Press 1 to input employees
•Press 2 to input hours
•Press 3 to calculate payroll
•Press 4 to calculate totals – Extra Credit
•Press 5 to print payroll
•Press X to exit
getSelection – gets menu selection and validates input with a switch statement. Use a do while until get valid input. If not valid does the following
•Displays error message
•Calls displayMenu
•Gets new input selection
processSelection – extra credit to process
inputEmployee that will input the information for 3 employees. Use a for loop
•User input
string firstname;
string lastname;
int empNum;
double regular rate
double ot rate (calculated)
inputHours that will get the total hours worked for each employee.
Note Overtime hours will be calculated in the calcPayroll function for hours worked over MAX_REG_HOURS
initializeEmployees sets all fields to “” or 0
calcPayroll – Calculates the payroll by using reg hours worked and overtime hours worked. Overtime hours worked is any hours > MAX_REG_HOURS and is done for you
•Calculated fields
otHours – calculated as hours over the maxreghours. If regHours = 48 then OT hours would be 8
regPay (regHours * regRate)
otPay (otHours * otRate)
totalPay (regPay + otPay)
fica (total pay * fica pct)
socSec (total pay * ss med pct)
totDeductions (fica + socSec)
netPay (totalPay – totDeductions)
displayPayroll Displays all fields for each employee on a separate line. Format all money to 2 decimal places. Function will also print the payroll totals and averages
SAVE AS TERMPROJECT-FD.CPP
5 years ago 40
Purchase the answer to view it
- solution.zip
- Video Assessment Project for Unit 9 CE300
- ENG225 Introduction to Film WEEK 2 ASSIGNMENT Elements of Design
- ENG121 English Composition I WEEK 4 ASSIGNMENT Google vs Yahoo
- How do fixed and floating exchange rates differ in their adjustments
- PSYCH 650 Research-Based Interventions on Eating Disorders, the Paraphilias, and Neurocognitive Disorders - Week Three OCD
- A monopolist operates in an industry where the demand
- Accounting help need done in a couple hours
- "For Phyllis Young"
- Problem Based Program - Auto Edge
- Need help with my homework