AddTerm method added to Polynomial class and equals method overridden in
the Term class.