#ifndef __LIST_H__
#define __LIST_H__

#include "property.h"

typedef Property ItemType;

class List
{
public:
  List();
  ~List();

  bool isFull() const;
  int getLength() const;
  void retrieveItem(ItemType& i, bool& found) const;
  
  void makeEmpty();
  void addItem(const ItemType&);
  void deleteItem(const ItemType&);
  
  void resetCurrent();
  void getNextItem(ItemType&);

private:
  void binarySearch(const ItemType&, int& loc, bool& found) const;

  int maxItems; // current size of array
  int currentIndex;
  int numItems; // current number of items in list
  ItemType* items;  // pointer to beginning of dynamically allocated array
};

#endif
