/* This file contains the interface for library Day.

   Names Declared:
      Day, an enumeration of the values Sunday through Saturday
      operator<<, a function to output a Day value
      operator>>, a function to input a Day value
-----------------------------------------------------------------*/

#include <iostream.h>
#include <fstream.h>

/********** the enumeration type **********/

enum Day {DayUnderflow = -1, Sunday, Monday, Tuesday, Wednesday,
          Thursday, Friday, Saturday, NumberOfDay, DayOverflow = 7};


/********** output function **********

   Receive:  Out, an ostream reference
             DayVal, a Day value
   Output:   The character string corresponding to DayVal onto Out
   Return:   ostream reference Out
-----------------------------------------------------------------*/

ostream& operator<< (ostream& Out, Day DayVal);


/*********** input function **********

   Receive: In, an istream reference
            DayVal, a Day reference
   Input:   A character string, from In
   Output:  An error message, if there is no Day value that 
               corresponds to the input string
   Return:  If there is a Day value corresponding to the string, 
               return that Day value via parameter DayVal
            istream In
-----------------------------------------------------------------*/

istream& operator>> (istream& In, Day& DayVal);  


/********** file output function **********

   Receive:  Out, an fstream reference
             DayVal, a Day value
   Output:   The character string corresponding to DayVal onto Out
   Return:   fstream reference Out
-----------------------------------------------------------------*/

fstream& operator<< (fstream& Out, Day DayVal);


/********** file input function **********

   Receive: In, an fstream reference
            DayVal, a Day reference
   Input:   Aa character string, from In
   Output:  An error message, if there is no Day value that 
               corresponds to the input string
   Return:  If there is a Day value corresponding to the string, 
               return that Day value via parameter DayVal
            fstream In
-----------------------------------------------------------------*/

fstream& operator>> (fstream& In, Day& DayVal); 


/********** successor function **********

   Receive: DayVal, a Day value
   Return:  The following Day value, with Saturday followed 
               by Sunday
-----------------------------------------------------------------*/

Day Next (Day DayVal); 


