





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Professor: Miller; Class: Object Oriented Programming for Engineers; Subject: Computer Systems Engineering ; University: University of Alaska - Anchorage; Term: Fall 2009;
Typology: Study notes
1 / 9
This page cannot be seen from the preview
Don't miss anything!






In C++, we can overload operators for use with objects aswell
class Float_Number { private: float fnum; public: Float_Number() { } Float_Number(float fnum) { setFloat(fnum); } float getFloat() { return fnum; } void setFloat(float fnum) { this->fnum = fnum; } };
ostream& operator<< (ostream &output, Float_Number& f) { output << f.getFloat(); return output; }
Write a program to compare two strings using the < and >operators.