The following program will read the data and calculate the pay for each employee.

Complete the program that

 

// header file emp.h

#include<iostream>

using namespace std;

struct Record

{

int id;

    string name;

char dept;

float hour;

};

void PrintRecord(Record x);

Record ReadRecord();

//end of hearder

 

// implementation file

#include “emp.h

 

void PrintRecord(Record x)

{

//you need to complete it

 

}

 

Record ReadRecord()

{

   Record x;

   // complete it

 

  return x;

}

 

// end of implementation

 

// driver program pay.cpp

 

#include”emp.h

int main()

{

    int num;

    float pay;

    Record emp;

    cout<< “Enter number of employee \n”;

    cin>> num;

     for( i = 0; i < num; i++)

     {

        cout<< “enter info for one employee\n”;

        emp = ReadRecord();

        // write formula to calculate pay

       // print out the employee record and the pay

      }

 

   return 0;

}