/************************************************************************************************* * KYU BAE * 212-04-5868 * Project #3 < Memb.h > * * build an array of lastnames from the proj3.dat file. once the array is * built, sort the array using any of the sorts done in the class, bubble sort. * allow the user to search the array for a specific name. ************************************************************************************************/ #ifndef MEMB_H #define MEMB_H #include //class declaration /******************************************************************** * class Clubmember * declaration of data members and member functions ********************************************************************/ class ClubMember { private: char FirstName; char State[3]; long int Date; char JoinCode; long int ContestNum; float AmountPaid; char Category; long int CodeNum; char Artist[41]; char Title [41]; public: ClubMember(); char Surname[11]; int Compare_Name(char* ) const; friend istream &operator>> (istream&, ClubMember&); friend ostream &operator<< (ostream&, const ClubMember&); void SetSurname (char*); void SetFirstName (char); void SetState (char*); void SetDate (long int); void SetJoinCode (char); void SetContestNum (long int); void SetAmountPaid (float); void SetCategory (char); void SetCodeNum (long int); void SetArtist (char*); void SetTitle (char*); char* GetSurname(); char GetFirstName(); char* GetState(); long int GetDate() ; char GetJoinCode(); long int GetContestNum(); float GetAmountPaid(); char GetCategory(); long int GetCodeNum(); char* GetArtist(); char* GetTitle(); }; /******************************************************************** * Class MemberList * declaration of data members and member functions * ********************************************************************/ //second class declaration class MemberList { private: int MaxSize; int ListSize; public: ClubMember* ListPtr; ClubMember* ListTwoPtr; MemberList(); void FileInput (char *); void bubble (MemberList &, int ); int binarysearch (MemberList &, char*, int, int, int); void Enter(); void PrintAllRecord (MemberList & ); }; #endif /******************************************************************** * ********************************************************************/