Here are the overloaded operators for the Time class:
friend ostream& operator<<(ostream& out, const Time& t) {
out << t.hour << ":" << t.minute << ":" << t.second;
return out;
}
friend istream& operator>>(istream& in, Time& t) {
in >> t.hour >> t.minute >> t.second;
return in;
}
bool operator==(const Time& t1, const Time& t2) {
return t1.hour == t2.hour && t1.minute == t2.minute &&
t1.second == t2.second;
}