//****************************************************************** // SPECIFICATION FILE (reclist.h) // This file gives the specification of RecordList, an ADT for a // list of personnel records. //****************************************************************** #ifndef RECLIST_H #define RECLIST_H #include <fstream> // For file I/O #include <string> // For string class using namespace std; const int MAX_EMPL = 1000; // Maximum number of employees struct AddressType { string street; string city; string state; }; struct PersonnelData { string lastName; string firstName; AddressType address; string workHistory; string education; string payrollData; }; typedef PersonnelData* PersonPtr; class RecordList { public: void ReadAll( /* inout */ ifstream& inFile ); // Precondition: // inFile has been opened for input // && inFile contains at most MAX_EMPL records // Postcondition: // List contains employee records as read from inFile void SelSort(); // Postcondition: // List is in ascending order of employee last name void PrintAll(); // Postcondition: // All employee records have been written to // standard output RecordList(); // Postcondition: // Empty list created ~RecordList(); // Postcondition: // List destroyed private: PersonPtr ptrList[MAX_EMPL]; int length; }; #endif