// File: student.C // // Definition of StudentRecord class #include #include #include #include #include "bstring6.h" #include "student.h" //====================================================================== // default constructor // StudentRecord::StudentRecord() { ssn = 0 ; } // Alternate constructor // StudentRecord::StudentRecord(int ss, const BString& nm, const BString& mj) { ssn = ss ; name = nm ; // BString assignment major = mj ; // BString assignment } bool StudentRecord::operator <(const StudentRecord& x) const { return ssn < x.ssn ; } bool StudentRecord::operator ==(const StudentRecord& x) const { return ssn == x.ssn ; } // overload << // ostream& operator <<(ostream& ostrm, const StudentRecord& x) { ostrm << "[" << x.ssn << ", " << x.name << ", " << x.major << "]" << endl ; return ostrm ; }