1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
// Constant for the array size.
const int EMPLOYEE_SIZE = 7;
// Function Prototypes
void getEmployeeInfo(int empId[], int hours[], double payRate[], double wages[], int EMPLOYEE_SIZE);
void displayWages(int empId[], double wages[], int EMPLOYEE_SIZE);
void validateHoursWorked(string hoursWorked, int& userNumber);
void validatePayRate(string payRate, double& userNumber);
int main()
{
// declare Array of employee ID numbers
// declare Array to hold the hours worked for each employee
// declare Array to hold the hourly pay rate for each employee
// declare Array to hold the gross wages for each employee
// Get the employee payroll information and store it in the arrays.
// call the function getEmployeeInfo
// Display the payroll information.
// call the function displayWages
system("pause");
return 0;
}
//function defitions
// ********************************************************
// The getEmployeeInfo function receives four parallel *
// arrays as arguments. The 1st array contains employee *
// IDs to be displayed in prompts. It asks for input and *
// stores hours worked and pay rate information in the *
// 2nd and 3rd arrays. This information is used to *
// calculate gross pay, which it stores in the 4th array. *
// ********************************************************
void getEmployeeInfo(int empId[], int hours[], double payRate[], double wages[], int EMPLOYEE_SIZE)
{
}
// ********************************************************
// The displayWages function receives 2 parallel arrays. *
// The first holds employee IDs and the second holds *
// employee gross pay. The function displays this *
// information for each employee. *
// ********************************************************
void displayWages(int empId[], double wages[], int EMPLOYEE_SIZE)
{
}
// ********************************************************
//The validateHoursWorked fuction receives a string and *
//returns an integer. The hours worked must be greater *
//than 0 but less than or equal to 40 *
// ********************************************************
//=================================================
void validateHoursWorked(string hoursWorked, int& userNumber)
{
}
// ********************************************************
//The validatePayRate fuction receives a string and *
//returns a double. The pay rate must be greater *
//than or equal to 5 but less than or equal to 15 *
// ********************************************************
void validatePayRate(string payRate, double& userNumber)
{
//hint: just as there is an stoi, theres is an stof (string to float) and an stod (string to double)
}
|