Ask coding questions

← Back to all posts
I need Help with this program?
MentorRalph

#include <iostream>
#include <string>
#include <cctype>
#include <cstdlib>
#include <iostream>

using namespace std;

struct Employee {
string firstname;
string lastname;
int empNum;
double regRate;
double otRate;
};

struct Payroll {
int empNumber;
int hoursWorked;
int regHours;
int otHours;
double regRate;
double otRate;
double regPay;
double otPay;
double totalPay;
double fica;
double socSec;
double totDeductions;
double netPay;

};

struct PayrollTotals {
int regHours;
int otHours;
double regRate;
double otRate;
double regPay;
double otPay;
double totalPay;
double fica;
double socSec;
double totDeductions;
double netPay;

};

const int MAX_EMPLOYEES = 3;
const int MAX_NUMBERS = 10;
const int MAX_REG_HOURS = 40;
const double FICA_PCT = .20;
const double SS_MED_PCT = .0765;
const double OT_MULT = 1.5;
const int MAX_TOTALS = 2;

void displayMenu();
char getSelection();
void inputHours(Employee[], Payroll[]);
void initializeTotals(PayrollTotals[]);
void calcPayroll(Payroll[], Employee[]);
void calcTotals(PayrollTotals[], Payroll[]);
void displayPayroll(Payroll[], Employee[], PayrollTotals[]);

enum PayEnum { TOTALS, AVERAGES }; // TOTALS = 0, AVERAGES = 1

int main() {

}

void displayMenu() {

} // dispaly Menu

char getSelection() {

}

void inputEmployee(Employee emp[]) {

} // inputEmployee

void inputHours(Employee emp, Payroll pay) {

}

void initializeTotals(PayrollTotals totals[]) {

} // initialize totals

void calcPayroll(Payroll payroll[], Employee employee[]) {

} // calcPayroll

void calcTotals(PayrollTotals totals[], Payroll pay[]) {

} // calcTotals

void displayPayroll(Payroll[], Employee[], PayrollTotals[]) {

} // displayPayroll

Voters
MentorRalph
Comments
hotnewtop
Irrcron

Is this payroll software? I tried to work with such a program, but it seemed to me that it was too complicated a process. It seems to me that it is better to entrust this work to professionals. Especially now there are new technologies that simplify the work of all employees. There is also a lot of work for unique specialties. My brother owns a large company, and he told me about how he uses https://www.payrollindex.com/payroll-services/. It is a company that provides payroll services outside of the company itself. I believe it is the most convenient way for today's companies.

elonmaks

Hi, @MentorRalph . What's wrong with this program? Inputs ?