/*************************************************************************/ /* File: ins_name.h Author: B. De Hamer */ /* */ /* Class InsName is used to hold the first and last name of instructors */ /* The == operator is overloaded so that comparisons can */ /* be made. */ /*************************************************************************/ #ifndef INS_NAME #define INS_NAME #include #include "std-macros.h" typedef char* InsLastName ; typedef char* InsFirstName ; class InsName { public: InsName () ; // Construct a default InsName InsName (const InsName&) ; // Construct a new InsName from an existing one InsName (char*) ; // Construct an InsName from the given last name InsName (char*, char*) ; // Construct an InsName from the given last and first name ~InsName () ; // Destruct and InsName void operator= (const InsName&) ; // Assign the argument to this name Boolean operator== (const InsName&) ; // Compare the given InsName to this one // Return true if names match // Return false otherwise void print () const ; // Print the name protected: InsLastName last_name ; // Last name of instructor InsFirstName first_name ; // First name of instructor } ; #endif