Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need to modify this program using C++by replacing all arrays by one array of s

ID: 3716910 • Letter: I

Question

I need to modify this program using C++by replacing all arrays by one array of structures. You will use nested structures. Array should be passed to functions through Parameters/arguments. Thank you

The code is:

#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>

using namespace std;

const int emps=3;
const int empinfo=8;

void inputData(ifstream &,string[][empinfo],double[][emps][emps],double[][empinfo],const int,const int);
void validateData(double[][emps][emps]);
void validateData(string[][empinfo]);
void FWE(double[][empinfo],double[][emps][emps],const double,const double,const double,const int,const int);
void TAFWE(double[][empinfo],const int,const int);
void SRinPercent(double[][empinfo],double[][emps],const int,const int);
void Salaryy(double[][empinfo],double[][emps],const int,const int);
void Letter(double[][empinfo],string[][empinfo],const int,const int);
void Report(ofstream &, string[][empinfo],double[][emps][emps],double[][empinfo],double[][emps]);

int main()
{
string employeeinfo[emps][empinfo];
double years[emps][emps][emps];
double finals[emps][empinfo];
double salary[emps][emps];
const double FALL=.39;
const double SPRING=.27;
const double SUMMER=.24;
int n;

//declaring fstream cin and cout
ifstream fin;
ofstream fout;

//opening the input and output files
fin.open("Input6.txt");

fout.open("Output6.txt");

if(!fin) //file checking
{
cout<<"File did not open correctly";
}
cout<<"How many employees?"<<endl;
cin >> n;

while(n<1 || n>5)
{
cout<<"Error: Please enter a number between 1 and 5:";
cin>>n;
}

inputData(fin,employeeinfo,years,finals,empinfo,emps);

validateData(employeeinfo);

validateData(years);

FWE(finals,years,FALL,SUMMER,SPRING,emps,empinfo);

TAFWE(finals,emps,empinfo);

SRinPercent(finals,salary,emps,empinfo);

Salaryy(finals,salary,emps,empinfo);

Letter(finals,employeeinfo,emps,empinfo);

Report(fout,employeeinfo,years,finals,salary);


fin.close();
fout.close();

return 0;
}

//FUNCTION VALIDATEDATA1
void validateData(double years[][emps][emps])
{
for(int g=0;g<emps;g++)
{
for(int y=0;y<emps;y++)
{
for(int z=0;z<emps;z++)
{
if(years[g][y][z]<1.00 || years[g][y][z]>1000.00)
{
cout<<"Invalid lenght"<<endl;
cin>>years[g][y][z];
}
}

}
}
}

//FUNCTION VALIDATEDATA2
void validateData(string employeeinfo[][empinfo])
{
for(int x=0;x<emps;x++)
{
for(int m=3;m<empinfo;m++)
{
if(employeeinfo[x][m].length()>50 || employeeinfo[x][m].length()<1)
{
cout<<"Employee info too long"<<endl;
cin>>employeeinfo[x][m];
}
}
}
}

void inputData(ifstream & fin,string employeeinfo[][empinfo],double years[][emps][emps],double finals[][empinfo],int empinfo,int emps)
{
for(int n=0;n<3;n++)
{
for(int m=0;m<7;m++)
{
getline(fin,employeeinfo[n][m]);
}
for(int y=0;y<3;y++)
{
for(int z=0;z<3;z++)
{
fin>>years[n][y][z];
}
}
fin>>finals[n][5];//salary

fin.ignore();
}
}

//FUNCTION FWE
void FWE(double finals[][empinfo],double years[][emps][emps],const double FALL,const double SUMMER,const double SPRING,const int emps,const int empinfo)
{
int x=0;
for(int n=0;n<emps;n++)
{
finals[n][0]=(years[n][x][x]*FALL)+(years[n][x][x+1]*SUMMER)+(years[n][x][x+2]*SPRING);

finals[n][1]=(years[n][x+1][x]*FALL)+(years[n][x+1][x+1]*SUMMER)+(years[n][x+1][x+2]*SPRING);

finals[n][2]=(years[n][x+2][x]*FALL)+(years[n][x+2][x+1]*SUMMER)+(years[n][x+2][x+2]*SPRING);

}
}

//FUNCTION TAFWE
void TAFWE(double finals[][empinfo],const int emps,const int empinfo)
{
for(int n=0;n<emps;n++)
{
finals[n][3]=finals[n][0]+finals[n][1]+finals[n][2];
finals[n][4]=finals[n][3]/3;
}
}

//FUNCTION SRINPERCENT
void SRinPercent(double finals[][empinfo],double salary[][emps],const int emps,const int empinfo)
{
for(int n=0;n<emps;n++)
{
if(finals[n][4]<75)
{
salary[n][0]=0;
}
else if(finals[n][4]>75 && finals[n][4]<=80)
{
salary[n][0]=1;
}
else if(finals[n][4]>80 && finals[n][4]<=90)
{
salary[n][0]=3;
}
else if(finals[emps][4]>90 && finals[emps][4]<=100)
{
salary[n][0]=5;
}
else
{
salary[n][0]=10;
}

}
}

//FUNCTION SALARY
void Salaryy(double finals[][empinfo],double salary[][emps],const int emps,const int empinfo)
{
for(int n=0;n<emps;n++)
{
if(finals[n][4]<75)
{
salary[n][1]=finals[n][5]*0.00;
salary[n][2]=salary[n][1]+finals[n][5];
}
else if(finals[n][4]>75 && finals[n][4]<=80)
{
salary[n][1]=finals[n][5]*0.01;
salary[n][2]=salary[n][1]+finals[n][5];
}
else if(finals[n][4]>80 && finals[n][4]<=90)
{
salary[n][1]=finals[n][5]*0.03;
salary[n][2]=salary[n][1]+finals[n][5];
}
else if(finals[n][4]>90 && finals[n][4]<=100)
{
salary[n][1]=finals[n][5]*0.05;
salary[n][2]=salary[n][1]+finals[n][5];
}
else
{
salary[n][1]=finals[n][5]*.1;
salary[n][2]=salary[n][1]+finals[n][5];
}


}
}

//FUNCTION LETTER
void Letter(double finals[][empinfo],string employeeinfo[][empinfo],const int emps,const int empinfo)
{
for(int n=0;n<emps;n++)
{
if(finals[n][4]<70)
{
employeeinfo[n][7]="Warning! you're grades are too low!";
}
else if(finals[n][4]>=95)
{
employeeinfo[n][7]="Good job! you're grades are awesome!!"
; }
}
}

//FUNCTION REPORT

void Report(ofstream & fout,string employeeinfo[][empinfo],double years[][emps][emps],double finals[][empinfo],double salary[][emps])
{
int year1=2015,x=0;
for(int n=0;n<3;n++)
{
//employee information output
fout<<right<<setw(65)<<employeeinfo[n][0]<<endl;
fout<<setw(75)<<employeeinfo[n][1]<<endl;
fout<<setw(42);
fout<<endl<<"Name of Employee: "<<employeeinfo[n][2]<<endl;
fout<<setw(42)<<"Name of Supervisor: "<<employeeinfo[n][3]<<endl;
fout<<setw(42)<<"Employee ID#:: "<<employeeinfo[n][4]<<endl;
fout<<setw(42)<<"Telephone Number: "<<employeeinfo[n][5]<<endl;
fout<<setw(42)<<"Address: "<<employeeinfo[n][6]<<endl;

//semester eval's output
fout<<setw(36)<<setprecision(0)<<fixed<<"Fall Semester Evaluation,"<<year1+1<<": "<<setprecision(2)<<fixed<<years[n][x][x]<<endl;
fout<<setw(36)<<setprecision(0)<<fixed<<"Spring Semester Evaluation,"<<year1+1<<": "<<setprecision(2)<<fixed<<years[n][x][x+1]<<endl;
fout<<setw(36)<<setprecision(0)<<fixed<<"Summer Semester Evaluation,"<<year1+1<<": "<<setprecision(2)<<fixed<<years[n][x][x+2]<<endl;
fout<<setw(36)<<setprecision(0)<<fixed<<"Fall Semester Evaluation,"<<year1+2<<": "<<setprecision(2)<<fixed<<years[n][x+1][x]<<endl;
fout<<setw(36)<<setprecision(0)<<fixed<<"Spring Semester Evaluation,"<<year1+2<<": "<<setprecision(2)<<fixed<<years[n][x+1][x+1]<<endl;
fout<<setw(36)<<setprecision(0)<<fixed<<"Summer Semester Evaluation,"<<year1+2<<": "<<setprecision(2)<<fixed<<years[n][x+1][x+2]<<endl;
fout<<setw(36)<<setprecision(0)<<fixed<<"Fall Semester Evaluation,"<<year1+3<<": "<<setprecision(2)<<fixed<<years[n][x+2][x]<<endl;
fout<<setw(36)<<setprecision(0)<<fixed<<"Spring Semester Evaluation,"<<year1+3<<": "<<setprecision(2)<<fixed<<years[n][x+2][x+1]<<endl;
fout<<setw(36)<<setprecision(0)<<fixed<<"Summer Semester Evaluation,"<<year1+3<<": "<<setprecision(2)<<fixed<<years[n][x+2][x+2]<<endl;

//FWE OUTPUT

fout<<fixed<<setprecision(2);

fout<<setw(42)<<"Final Weighted Evaluation,2016: "<<finals[n][0]<<endl;

fout<<setw(42)<<"Final Weighted Evaluation, 2017: "<<finals[n][1]<<endl;

fout<<setw(42)<<"Final Weighted Evaluation, 2018: "<<finals[n][2]<<endl;

fout<<setw(42)<<"Total Weighted Evaluation: "<<finals[n][3]<<endl;

fout<<setw(42)<<"Average Final Weighted Evaluation: "<<finals[n][4]<<endl;

fout<<setw(42)<<"Current Salary: "<<finals[n][5]<<endl;

//salary information output
fout<<setw(42)<<setprecision(0)<<" Salary Raise in %: "<<salary[n][0]<<"%"<<endl;

fout<<setw(42)<<setprecision(0)<<" Salary Raise in Dollars: "<<"$"<<salary[n][1]<<endl;

fout<<setw(42)<<"Salary in Dollars with the Raise: "<<"$"<<salary[n][2]<<endl;

//footer output
fout<<endl<<" Note:This report for"<<employeeinfo[n][2]<<" was prepared according to the fair practice of the University."<<endl;

fout<<" Any discrepancies must be reported by " << employeeinfo[n][2]<< " to his supervisor, "<<employeeinfo[n][3]<< ". "<<endl;

fout<<" "<<employeeinfo[n][7]<<endl<<endl;

}
}

input file is:

University, San Francisco
Annual Employee Evaluation Report Sept. 1,2018 to August 31,2019
John Smith
Lebron James
124-34343
(123)123-4534
123 Main Street, Nowhere california
90.00
92.00
87.00
98.00
78.00
90.00
91.00
89.00
97.00
90000
University, San Francisco
Annual Employee Evaluation Report Sept. 1,2018 to August 31,2019
Kobe Bryant
dwight Howard
434-5454
(234)123-3233
125 Main Street,Pasadena California
40.00
57.00
52.00
40.00
55.00
56.00
47.00
50.00
53.00
70000
University, San Francisco
Annual Employee Evaluation Report Sept. 1,2018 to August 31,2019
Shaquile O'neal
Michael Jordan
124-3766
(123)123-5077
1323 2nd Street, San Diego California
89.00
90.00
87.00
80.00
98.00
90.00
97.00
85.00
98.00
80000

The result should be this, the output file:

University, San Francisco

Annual Employee Evaluation Report Sept. 1,2018 to August 31,2019

Name of Employee: John Smith

Name of Supervisor: Lebron James

Employee ID#:: 124-34343

Telephone Number: (123)123-4534

Address: 123 Main Street, Nowhere california

Fall Semester Evaluation,2016: 90.00

Spring Semester Evaluation,2016: 92.00

Summer Semester Evaluation,2016: 87.00

Fall Semester Evaluation,2017: 98.00

Spring Semester Evaluation,2017: 78.00

Summer Semester Evaluation,2017: 90.00

Fall Semester Evaluation,2018: 91.00

Spring Semester Evaluation,2018: 89.00

Summer Semester Evaluation,2018: 97.00

Final Weighted Evaluation,2016: 80.67

Final Weighted Evaluation, 2017: 81.24

Final Weighted Evaluation, 2018: 83.04

Total Weighted Evaluation: 244.95

Average Final Weighted Evaluation: 81.65

Current Salary: 90000.00

Salary Raise in %: 3%

Salary Raise in Dollars: $2700

Salary in Dollars with the Raise: $92700

Note:This report forJohn Smith was prepared according to the fair practice of the University.

Any discrepancies must be reported by John Smith to his supervisor, Lebron James.

University, San Francisco

Annual Employee Evaluation Report Sept. 1,2018 to August 31,2019

Name of Employee: Kobe Bryant

Name of Supervisor: dwight Howard

Employee ID#:: 434-5454

Telephone Number: (234)123-3233

Address: 125 Main Street,Pasadena California

Fall Semester Evaluation,2016: 40.00

Spring Semester Evaluation,2016: 57.00

Summer Semester Evaluation,2016: 52.00

Fall Semester Evaluation,2017: 40.00

Spring Semester Evaluation,2017: 55.00

Summer Semester Evaluation,2017: 56.00

Fall Semester Evaluation,2018: 47.00

Spring Semester Evaluation,2018: 50.00

Summer Semester Evaluation,2018: 53.00

Final Weighted Evaluation,2016: 43.32

Final Weighted Evaluation, 2017: 43.92

Final Weighted Evaluation, 2018: 44.64

Total Weighted Evaluation: 131.88

Average Final Weighted Evaluation: 43.96

Current Salary: 70000.00

Salary Raise in %: 0%

Salary Raise in Dollars: $0

Salary in Dollars with the Raise: $70000

Note:This report forKobe Bryant was prepared according to the fair practice of the University.

Any discrepancies must be reported by Kobe Bryant to his supervisor, dwight Howard.

Warning! you're grades are too low!

University, San Francisco

Annual Employee Evaluation Report Sept. 1,2018 to August 31,2019

Name of Employee: Shaquile O'neal

Name of Supervisor: Michael Jordan

Employee ID#:: 124-3766

Telephone Number: (123)123-5077

Address: 1323 2nd Street, San Diego California

Fall Semester Evaluation,2016: 89.00

Spring Semester Evaluation,2016: 90.00

Summer Semester Evaluation,2016: 87.00

Fall Semester Evaluation,2017: 80.00

Spring Semester Evaluation,2017: 98.00

Summer Semester Evaluation,2017: 90.00

Fall Semester Evaluation,2018: 97.00

Spring Semester Evaluation,2018: 85.00

Summer Semester Evaluation,2018: 98.00

Final Weighted Evaluation,2016: 79.80

Final Weighted Evaluation, 2017: 79.02

Final Weighted Evaluation, 2018: 84.69

Total Weighted Evaluation: 243.51

Average Final Weighted Evaluation: 81.17

Current Salary: 80000.00

Salary Raise in %: 3%

Salary Raise in Dollars: $2400

Salary in Dollars with the Raise: $82400

Note:This report forShaquile O'neal was prepared according to the fair practice of the University.

Any discrepancies must be reported by Shaquile O'neal to his supervisor, Michael Jordan.

Explanation / Answer

#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>

using namespace std;

//Global constant variables
const double FALL = 0.39,
             SPRING = 0.37,
             SUMMER = 0.24;
const int YEAR3 = 3;
const int SEMESTER3 = 3;
const int COMPUTED = 9;

//Global variable for employee number
int n;
//int alphabets;

struct Personal
{
   string head1,
            head2,
            name,
            supervisor,
            ID,
            phone,
            address,
            letter_one,
            letter_two;
};

struct Compute
{
    double evaluation[YEAR3][SEMESTER3],
            computed[COMPUTED];
};

struct Employee_Data
{
    Personal non_numeric;
    Compute numeric;
};


//function prototypes
void inputData(ifstream &, struct Employee_Data employee[], int );
void validateData(struct Employee_Data employee[], int );
void validateData(struct Employee_Data employee[], int );
void FWE(struct Employee_Data employee[], int );
void TAFWE(struct Employee_Data employee[], int );
void SRinPercent(struct Employee_Data employee[], int );
void Salary(struct Employee_Data employee[], int );
void Letter(struct Employee_Data employee[], int );
void Report(ofstream &, struct Employee_Data employee[], int );


int main()
{

//input number of employees
cout << " Enter number of employees you want to evaluate (3-100): ";
cin >> n;

Employee_Data employees[n];

//validate input for employee numbers
while (n < 3 || n > 100)
{
      cout << "Invalid input: Enter a number between 3-100: ";
      cin >> n;

}

ifstream inFile;
inFile.open("input.txt");

   //validate if the inFile exists.
if (!inFile)
{
      cout << "ERROR! Make sure the file is in the same directory." << endl;
      return -1;
}

ofstream outFile;
outFile.open("output.txt");

//validate outFile
if (!outFile)
{
      cout << "ERROR! Make sure the file is in the same directory." << endl;
      return -1;
}

   for (int emp = 0; emp < n ; emp++) //Outer for-loop for employees

    {
        //function calls
        inputData(inFile, employees, emp);
        validateData(employees, emp);
        validateData(employees, emp);
        FWE(employees, emp);
        TAFWE(employees, emp);
        SRinPercent(employees, emp);
        Salary(employees, emp);
        Letter(employees, emp);
        Report(outFile, employees, emp);
    }

inFile.close();
outFile.close();
return 0;
}

//get input data from the file
void inputData(ifstream &inFile, struct Employee_Data employee[],int emp)
{

        /* for(int i = 0; i < 7; i++)
          {
            getline(inFile, employee[emp].non_numeric.s[i]);
          } */

            getline(inFile, employee[emp].non_numeric.head1);//get heading 1
            getline(inFile, employee[emp].non_numeric.head2);//get heading 2
            getline(inFile, employee[emp].non_numeric.name);//get name of the employee
            getline(inFile, employee[emp].non_numeric.supervisor);//get supervisor's name
            getline(inFile, employee[emp].non_numeric.ID);//get employee's id
            getline(inFile, employee[emp].non_numeric.phone);//get employee's phone #
            getline(inFile, employee[emp].non_numeric.address);//get employee's address

            for (int year = 0; year < YEAR3; year++)//years for-loop
            {
                for(int semester = 0 ; semester < SEMESTER3; semester++)//semesters for-loop
                {
                    inFile >> employee[emp].numeric.evaluation[year][semester];//get years and semesters' data
                }

            }

            //get current salary
            inFile >> employee[emp].numeric.computed[5];
            inFile.ignore();
}


//validate strings data
void validateData(struct Employee_Data employee[], int emp)
{
      if (employee[emp].non_numeric.head1.length() > 50)
        {
            cout << "ERROR 1! ";
            return;
        }
        if (employee[emp].non_numeric.head2.length() > 75)
        {
            cout << "ERROR 2! ";
            return;
        }
        if (employee[emp].non_numeric.name.length() < 0)
        {
            cout << "ERROR 3 ";
            return;
        }
        if (employee[emp].non_numeric.supervisor.length()< 0)
        {
            cout << "ERROR 4 ";
            return;
        }
        if (employee[emp].non_numeric.ID.length() > 20)
        {
            cout << "ERROR 5 ";
            return;
        }
         if (employee[emp].non_numeric.phone.length() > 20)
        {
            cout << "ERROR 6 ";
            return;
        }
        if (employee[emp].non_numeric.address.length() > 75)
        {
            cout << "ERROR 7 ";
            return;
        }

      /* for (int validate = 0; validate < alphabets; validate++)
        {
            if (employee[emp].non_numeric[validate].length <= 0)
            {
                cout << "It is an invalid number of strings characters. ";
                continue;
            }
        } */

}

//validate numeric data
void validateData1(struct Employee_Data employee[], int emp )
{

        for (int year = 0; year < YEAR3; year++)
        {
            for (int semester =0; semester < SEMESTER3; semester++)
            {
            if (employee[emp].numeric.evaluation[year][semester] < 3.00 ||
                employee[emp].numeric.evaluation[year][semester] > 1000.00)
                {
                    cout << "Invalid numerical data!";
                    break;
                }
            }
        }
}

//computer final weighted evaluation
void FWE(struct Employee_Data employee[], int emp)
{
    employee[emp].numeric.computed[0] = (employee[emp].numeric.evaluation[0][0]*FALL)+
                                        (employee[emp].numeric.evaluation[0][1]*SUMMER) +
                                        (employee[emp].numeric.evaluation[0][2]*SPRING);
    employee[emp].numeric.computed[1] = (employee[emp].numeric.evaluation[1][0]*FALL)+
                                        (employee[emp].numeric.evaluation[1][1]*SUMMER) +
                                        (employee[emp].numeric.evaluation[1][2]*SPRING);
    employee[emp].numeric.computed[2] = (employee[emp].numeric.evaluation[2][0]*FALL)+
                                        (employee[emp].numeric.evaluation[2][1]*SUMMER) +
                                        (employee[emp].numeric.evaluation[2][2]*SPRING);

}

//compute total final weighted and average final weighted
void TAFWE(struct Employee_Data employee[], int emp)
{
    employee[emp].numeric.computed[3] = employee[emp].numeric.computed[0]+
                                        employee[emp].numeric.computed[1]+
                                        employee[emp].numeric.computed[2];
    employee[emp].numeric.computed[4] = employee[emp].numeric.computed[3]/3;

}

//This function will compute and store into proper array elements the Salary Raise in %.
void SRinPercent( struct Employee_Data employee[], int emp)
{
        if (employee[emp].numeric.computed[4] < 75)
        {
            employee[emp].numeric.computed[6] = 0;
        }
        else if ( employee[emp].numeric.computed[4] > 75 &&
                 employee[emp].numeric.computed[4] <= 80)
        {
            employee[emp].numeric.computed[6]= 1;
        }
        else if (employee[emp].numeric.computed[4] > 80 &&
                 employee[emp].numeric.computed[4] <=90 )
        {
            employee[emp].numeric.computed[6]= 3;
        }
        else if (employee[emp].numeric.computed[4] > 90 &&
                 employee[emp].numeric.computed[4] <=100)
        {
            employee[emp].numeric.computed[6] = 5;
        }
        else if (employee[emp].numeric.computed[4] > 100)
        {
            employee[emp].numeric.computed[6] = 10;
        }

}

//compute salary in dollars and the final total amount
void Salary( struct Employee_Data employee[], int emp)
{

        employee[emp].numeric.computed[7] = (employee[emp].numeric.computed[6]/100) *
                                            employee[emp].numeric.computed[5];
        employee[emp].numeric.computed[8] = employee[emp].numeric.computed[5] +
                                            employee[emp].numeric.computed[7];
}

//stored letter notes in proper arrays
void Letter( struct Employee_Data employee[], int emp)
{
        if (employee[emp].numeric.computed[4] < 70)//letter one stored in letter_one array
        {
            employee[emp].non_numeric.letter_one = "Warning letter: "
                           " We are concerned with your grade and we would like "
                           " to speak with you as soon as possible.";

        }
        else if (employee[emp].numeric.computed[4] >= 90)//letter two stored in letter_two array
        {

            employee[emp].non_numeric.letter_two = "Appreciation Letter: "
                            " Congratulation, your hard work has paid off. Your first step to success looks great!";

        }

}

//Output all the data to a file
void Report(ofstream &outFile, struct Employee_Data employee[], int emp)
{
        //set format
        outFile << setprecision(2) << fixed << showpoint;

        outFile << " " << employee[emp].non_numeric.head1 << endl; //report header 1
        outFile << " " << employee[emp].non_numeric.head2 << endl; //report header 2
        outFile << endl; //space
        outFile << " Name of the Employee: " << employee[emp].non_numeric.name << endl;//report employee name
        outFile << "Name of the Supervisor: " << employee[emp].non_numeric.supervisor << endl;//report supervisor name
        outFile << "        Employee's ID#: " << employee[emp].non_numeric.ID << endl;//report employee ID
        outFile << "      Telephone number: " << employee[emp].non_numeric.phone << endl;//report employee phone #
        outFile << "               Address: " << employee[emp].non_numeric.address << endl;//report employee address

        outFile << endl;

        for (int year = 0; year < YEAR3; year++)//loop for years
        {
            for(int semester = 0 ; semester < SEMESTER3; semester++)//loop to get each semester value
            {
                switch(semester)//show three semesters
                {
                    case 0://spring semesters for 2013-2015
                        outFile << fixed << showpoint << setprecision(2);
                        outFile << " Spring Semester Evaluation, " << 2013+year
                                <<": " << employee[emp].numeric.evaluation[year][semester]<< " ";
                        break;

                    case 1://summer semester for 2013-2015
                        outFile << fixed << showpoint << setprecision(2);
                        outFile << " Summer Semester Evaluation, " << 2013+year
                                <<": " << employee[emp].numeric.evaluation[year][semester]<< " ";
                        break;

                    case 2://fall semester for 2013-2015
                        outFile << fixed << showpoint << setprecision(2);
                        outFile << " Fall Semester Evaluation,   " << 2013+year
                                <<": " << employee[emp].numeric.evaluation[year][semester]<< " ";
                        break;
                }

            }
            //space
            outFile << endl;

        }

          //set format
          outFile << fixed << showpoint << setprecision(2);

          //display final semester evaluation
          outFile << " Final Semester Evaluation, 2013: " << employee[emp].numeric.computed[0] << endl;
          outFile << " Final Semester Evaluation, 2014: " << employee[emp].numeric.computed[1] << endl;
          outFile << " Final Semester Evaluation, 2015: " << employee[emp].numeric.computed[2] << endl;

          outFile << endl;

          //display total weighted and average final weighted
          outFile << " Total Final Weighted Evaluation: " << employee[emp].numeric.computed[3] << endl;
          outFile << " Average Final Weighted Evaluation: " << employee[emp].numeric.computed[4]<< endl;

          //output current salary, percent, raised in dollar, and total
          outFile << " Current Salary : " << "$"<<employee[emp].numeric.computed[5]<< endl;
          outFile << " Salary Raised in percent : "<< employee[emp].numeric.computed[6]<< "%"<< endl;
          outFile << " Salary Raised in Dollar : $"<< employee[emp].numeric.computed[7] << endl;
          outFile << " Total Salary Raised with Dollar: $"<< employee[emp].numeric.computed[8] << endl;

          outFile << endl;


        //space
        outFile << endl;
        outFile << endl;

        //Display notes
        outFile << "Note:    This report for "<< employee[emp].non_numeric.name << " was prepared according "
                << " to the fair practice "
                << " of the University." << endl;
        outFile << "         Any discrepancies must be reported by " << employee[emp].non_numeric.name << " to her/his "
                << "supervisor, "<< employee[emp].non_numeric.supervisor <<"." << endl;
        outFile << "--------------------------------------------------------------------------------------------" << endl;

        //space
        outFile << endl;

}