   /** Adds a new entry to this bag.
       @param newEntry  The object to be added as a new entry.
       @return  True if the addition is successful, or false if not. */
   public boolean add(T newEntry)
   {
      if (initialized)
      {
         boolean result = true;
         if (isArrayFull())
         {
            result = false;
         }
         else
         { // Assertion: result is true here
            bag[numberOfEntries] = newEntry;
            numberOfEntries++;
         } // end if

         return result;
      }
      else
         throw new SecurityException("ArrayBag object is not initialized " +
                                     "properly.");
   } // end add
//================================
   // Throws an exception if this object is not initialized.
   private void checkInitialization()
   {
      if (!initialized)
      throw new SecurityException("ArrayBag object is not initialized " +
                                  "properly.");
   } // end checkInitialization

   /** Adds a new entry to this bag.
       @param newEntry  The object to be added as a new entry.
       @return  True if the addition is successful, or false if not. */
   public boolean add(T newEntry)
   {
      checkInitialization();
      boolean result = true;
      if (isArrayFull())
      {
         result = false;
      }
      else
      {  // Assertion: result is true here
         bag[numberOfEntries] = newEntry;
         numberOfEntries++;
      } // end if

      return result;
   } // end add
