
// SORTEDARRAY.H   

const int MAXSIZE = 100001;


class SortedArray {

      private:

         int loIndex, hiIndex; 
         Individual everyone[MAXSIZE];         //  The array of individuals.

         void InitializeFromFile();           //  Read in a file of chromosomes from "input"


      protected:


      public:

         SortedArray()                        //  Default constructor.  Reads chromosomes from 
              {                               //   file.
                loIndex = 0;  hiIndex = -1;
                InitializeFromFile();
              };  
         boolean Empty();                     //  Returns true if no individuals in array.
         boolean Member(Individual indi);     //  Returns true if indi is in current array.
         int IndexOf(Individual indi);        //  Returns position of indi in current array.
                                              //   returns -1 if not in array.
         void printEveryone();                //  Prints each chromosome on a separate line, to
                                              //   console.
         int totalnumber();                   //  Prints total number of chromosomes stored in array.
};

