#include
#include
#include
using namespace std;
//Assignment Specimen Paper B Q1 Lab Period Thursday 19 Feb 2009
//==============================
/*
The employee file EMPLOYEE.DAT has been created in paper A.
Each employee is in a DEPARTMENT (6 chars) and there are at most 20 employees.
Format of Employee file
--------------
--------------
You are required to write a function DISPLAYEMPLOYEES to
display the contents of the file
The Format of the report is
============================
Depart Name: SALES
#Employees: 7
Employee's ID Name Tel No Type of Employee
K12335 TAN AH KOW 6123456 H
B45567 LEONG AH SIN 6222333 S
G22256 MUNITHAMY SUNDRAM 6812833 H
Test your function. If the file is not available give an appropriate message.
Test Data for Employee.dat Supplied by Mr Chen
-----------------------------
SALES 7
K12335TAN AH KOW 6123456H
B45567LEONG AH SIN 6222333S
G22256MUNITHAMY SUNDRAM 6812833H
A31237MUNIAH BT SUHKOR 6333235S
D23213LAM AI MIN 6222224S
C23213DELVI SINGH 6322228H
S23338SIN SANG SONG 6321235S
--------------------------------------
submit to tpjc_sg@yahoo.com
*/
class Employee{
private:
public:
// constructor
// function to display a record
// function to read a record from employee.dat
};
void DISPLAYEMPLOYEES(){
Employee x;
ifstream infile;
// read depart and no of records
// read record into an array of records
// display all the records in the array
}
void main(){
cout << "main program " << endl;
DISPLAYEMPLOYEES();
}
// function to display a record
// function to read a record from employee.dat