1: #ifndef TIME_H 
     2: #define TIME_H 
     3: 
     4: /* this class defines a time value based on days, hours,
     5: 	and minutes.  Input and output is in the form
     6: 	   days:hours:minutes
     7: */
     8: 
     9: class Time {
    10: 	public:
    11: 		Time();
    12: 			// time value initialized to 0:00:00
    13: 
    14: 		Time(int dys, int hrs, int min);
    15: 			// time value initialized to
    16: 			//   dys:hrs:min
    17: 
    18: 		void input();
    19: 			// inputs time value in form d:hh:mm
    20: 			// from standard input stream
    21: 
    22: 		void output() const;
    23: 			// outputs time value in form d:hh:mm
    24: 			// to standard output stream
    25: 
    26: 		Time add(Time v) const;
    27: 			// returns new time developed by 
    28: 			// adding the object to the value
    29: 			// passed
    30: 
    31: 	private:
    32: 		int days;
    33: 		int hours;
    34: 		int minutes;
    35: };
    36: 
    37: #endif 
    38: 




syntax highlighting by

w e b c p p
web c plus plus