// time.h  P. Conrad for CISC220, 06J

// Class to represent a time of day (hours and minutes)
// If input is bad, set both hour and minute to -1
// Class includes a member function to test for a bad time setting

// Note: this isn't necessarily the best solution to this problem--exception
//  handling represents a better choice.

#ifndef TIME_H
#define TIME_H

#include <iostream>

class Time_C
{
 public:
  Time_C (); // 20
  Time_C (int theHour, int theMinute); // 21

  bool badTime () const { return (hour == -1 && minute == -1); } 
  int getHour() const { return hour;}
  int getMinute() const { return minute;}
  

  Time_C::Time_C(const Time_C & orig); // 22
  Time_C & Time_C::operator =(const Time_C &right); // 23
  Time_C::~Time_C(); // 24

  void print(std::ostream & out = std::cout) const; 

 private:
  int hour, minute;
};

std::ostream & operator << (std::ostream & right, // 25
			    const Time_C &left);


#endif
