/* This file contains the interface for class Student.

----------------------------------------------------------------*/

#ifndef STUDENT
#define STUDENT

#include <iostream.h>                     // interactive I/O
#include <fstream.h>                      // file I/O

#include "Year.h"
#include "Strings.h"
#include "Boolean.h"

class Student
{
// -- the private section --
/********** the data members **********/

  Strings
    FirstName_,
    LastName_;
  long
    StudentNumber_;
  Year
    StudentYear_;
  double
    Credits_,
    GPA_;

public:
/********** member functions **********/
   /*----- Class constructors ----- */
   /***** With Data Element Values *****/
   /* To initialize a declaration of a Student object
         with individual values for the data elements.

      Precondition:  A Student object has been declared.
      Receive:       Strings FName (default "")
                        and LName (default "")
                     long integer SNumb (default 0)
                     Year object StuYear (default Freshman)
                     double Creds (default 0.0)
                        and GPA (default 0.0)
      Postcondition: The data members of this Student object have
                        been initialized to FName, LName, SNumb,
                        StuYear, Creds, and GPA, respectively.
   ---------------------------------------------------------------*/

   Student(const Strings& FName, const Strings& LName,
           long SNumb = 0, Year StuYear = Freshman,
           double Creds = 0.0, double GPA = 0.0);

   Student(void) { Student(Strings(""),Strings("")); }

   /*----- Relational Operators -----
      These operators provide the six basic relational operators
        between two Student objects.
   ----------------------------------------------------------------*/

   /*----- Equality ----- */
   friend Boolean operator==(const Student& Left, const Student& Right);

   /*----- Inequality ----- */
   friend Boolean operator!=(const Student& Left, const Student& Right);

   /*----- Less than ----- */
   friend Boolean operator<(const Student& Left, const Student& Right);

   /*----- Greater than ----- */
   friend Boolean operator>(const Student& Left, const Student& Right);

   /*----- Less than or equal ----- */
   friend Boolean operator<=(const Student& Left, const Student& Right);

   /*----- Greater than or equal ----- */
   friend Boolean operator>=(const Student& Left, const Student& Right);

   /*----- Data member extractor -----
      These functions extract the data members of the
        Student object.
   ---------------------------------------------------------------*/

   Strings FirstName(void) const              // extract first name
   {
      return FirstName_;
   }

   Strings LastName(void) const               // extract last name
   {
      return LastName_;
   }

   long StudentNumber(void) const             // extract number
   {
      return StudentNumber_;
   }

   Year StudentYear(void) const               // extract year
   {
      return StudentYear_;
   }

   double Credits(void) const                 // extract credits
   {
      return Credits_;
   }

   double GPA(void) const                     // extract GPA
   {
      return GPA_;
   }


   /*----- Input/Output -----
      These functions provide normal stream input and output on
        a Day object.
   ----------------------------------------------------------------*/
   friend istream& operator>> (istream& In, Student& S);
   friend ostream& operator<< (ostream& Out, const Student& S);
};

#endif
