#ifndef _SET_H
#define _SET_H

#include <vector>
//#include "Object.h"

using namespace std;

namespace uprm_icom4035{

  template <typename Item> 
  class set{
  public:
    typedef std::size_t size_type;
    typedef Item value_type;

    set(int init_capacity = 1);  // constructor based on size

    // union-assignment
    const set& operator+=(const set& s);
    // differenc-assignment
    const set& operator-=(const set& s);
    
    // determines if set is empty
    bool empty_set() const;
    // determines if s is a subset of this set
    bool sub_set(const set& s) const;
    int size() const;  // get the size of the set
    bool find(const value_type& obj) const;  // find an object in set 
    void insert(const value_type& obj); 	// add a new element to the set 
    bool erase(const value_type& obj); // erase one copy of the object
    void print(ostream& out) const;
    
  private:
    vector<value_type> elems;
  };
  
  template <typename Item>
  set<Item> operator+(const set<Item>& b1, const set<Item>& b2);

  template <typename Item>
  set<Item> operator-(const set<Item>& b1, const set<Item>& b2);

  template <typename Item>
  set<Item> operator&(const set<Item>& b1, const set<Item>& b2);
}
#endif

