For this assignment, you will be writing a program using cstrings
and an array of objects. The behavior of the program will be menu based
with options to add a new employee to an array of employees,
print one employee record, and print employee paychecks.
Employee Structure
The employee structure definition will include the following member
variables:
a character array for the first name
a character array for the last name
an integer for the employee's id
an integer for the number of hours
a float for the employee's payrate
Functions
Employee addEmployee() - This function will instantiate a temporary
employee object, prompt the user for first name, last name, id, hours, and
payrate, inputting each value to the corresponding member variable, and
returns the temporary object
void printEmployee(const Employee &) - This function will print the member
variables of the passed Employee object
void printEmployeePaychecks(const Employee[], int) - This function will accept
and array of employee objects and an integer for the amount of entered
employees within the array. This function will traverse the array and
print each object's first and last initial of it's name, the id, and
the caclulation of hours * payrate (displayed in monetary format)
Menu Options
This will call the function addEmployee. Assign the returned value
to your employee object array at index 'count' and update count.
If no employee has been entered, disallow this feature and alert
to the user that he/she must add at least one employee. Otherwise, prompt
the user for an index and print the employee. (ex. if the user enters 1,
then print the first employee which will be in the array at
subscript 0 → index-1)
If no employee has been entered, disallow this feature and alert to the
user that he/she must add at least one employee. Otherwise, print each
employee's paycheck