// ========================================================================================
// IMPORTANT: You should not edit this file
// ========================================================================================

#ifndef __TIMESTAMP_H___
#define __TIMESTAMP_H___

#include <iostream>

// The TimeStamp class represents time with integers for the day,
// hour, min, and second.  We can increment a TimeStamp by adding an
// integer number of seconds.  We can compute the difference or time
// elapsed between two TimeStamp objects. Timestamp objects can be
// sorted chronologically.  TimeStamp objects are printed in military
// format (00:00:00 -> 23:59:59).

class TimeStamp {
public:
  // CONSTRUCTOR
  TimeStamp(int h=0, int m=0, int s=0) : days(0), hours(h), minutes(m), seconds(s) {}
  // ACCESSORS
  int getDays() const { return days; }
  int getHours() const { return hours; }
  int getMinutes() const { return minutes; }
  int getSeconds() const { return seconds; }
  // MODIFIER
  void addTime(int seconds);
private:
  // REPRESENTATION
  int days;
  int hours;
  int minutes;
  int seconds;
};

// RELATED HELPER FUNCTIONS:

// the difference in seconds between two timestamps (a should be earlier or equal to b)
int elapsed(const TimeStamp &a, const TimeStamp &b);

// for sorting
bool operator< (const TimeStamp &a, const TimeStamp &b);

// for printing
std::ostream& operator<<(std::ostream &ostr, const TimeStamp &a);

#endif

