Pay calculator
Version 2.1

DESIGN


NEW IN THIS VERSION: The Time operations are now methods (to make the program more object-oriented).


  o const float kPayRate = 12;
    

  o int main()

    Runs the calculator.  See program spec for details.

    Collaborator: Time


  o Time
  
    Each Time object represents a time on a 24-hour clock (0:00 to 23:59).
    
    Methods:
    
        void initialize()
            Sets receiver to 99:99.
            
        void read(istream & in )
            Reads receiver from in the format h:mm or hh:mm, where each h and m stands for a single digit.  No error-checking.
            
        void print(ostream & out) 
            Prints receiver to out in the format described for read.
        
        double minus(const Time & t2)
            Computes the difference, in hours, between the receiver and t2.  The difference is positive if the receiver occurs after t2.  In other words, the difference is computed as "t1 - t2".

    Implementation notes: Each time is stored as a pair of integers (hours, minutes) by using a class.  The data is private.            
  