Question: #include #include #include #include using namespace std; ifstream infile; struct employeeType { string fname; string lname; int age; string department; string SSN; double salary; int

#include #include #include #include

using namespace std;

ifstream infile;

struct employeeType { string fname; string lname; int age; string department; string SSN; double salary; int yearsWorked; };

void input(employeeType employees[], int &size); void output(employeeType employee);

int main() { employeeType employees[20]; cout<

void input(employee employees[], nt &size) { infie.open("Question1_Final.txt"); int i; for(i = 0; i < 20; i++) { infile>>employees[i].fname>>employees[i].lname>>employees[i].SSN>>employees[i].age>>employees[i].department >>employees[i].salary>>employees[i].yearsWorked; } size = i; }

void output(employeeType employee) { cout<

complete the code and include the following additional functions.

write c++ code have these function

1- A function to display the full details of every employee using the output function.

2- A function that display the first, last name, salary and numbers of years worked of the oldest employee on the list.

3- a function that display the first, last name and department of the lowest earner in the company

4- a function that takes in as a parameter an integer representing the minimum age required to qualify for a social bonus, and display the first, last name, age and department of employees eligible for the bonus. (test your function with 47)

5- a function that returns the name of the department that has the highest total earnings

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!