Astro 503, Spring 2006 Homework #8 Due THURSDAY, Mar 16 1. Write an implementation of the set template (and its iterator) using a binary tree. Then write a driver program to test its methods by inserting a bunch of objects and printing them out in order. Here's what the interface to your stripped-down set class should look like: template class setIterator { private: setIterator(...your arguments here); public: setIterator(const setIterator& rhs); ~setIterator(); setIterator& operator=(const setIterator& rhs); bool operator==(const setIterator& rhs); bool operator!=(const setIterator& rhs); setIterator& operator++(); setIterator& operator--(); T& operator*(); //dereference template friend class set; }; template class set { public: template friend class setIterator; typedef setIterator iterator; void insert(iterator& i, T& val); iterator erase(iterator& i); //return iterator to element past // erased one iterator begin() const; iterator end() const; bool empty() const; int size() const; }; 2. Alter the topTwelveWords.cpp program so that it will print out all the words that have the same frequency as the 12th as well as the top 12. Then write another program (or add to this one) that will print out the median word when they're placed in dictionary-style alphabetical order. Run on ...the Gettysburg address ...the 2006 State of the Union address (will need to make perhaps your own classes to put into containers, and likely some predicate functions for them.) 3. Have a fully defined interface for your part of the Ephemeris Project.