You are on page 1of 1

Date: Dec 03,2011

Object Oriented Programming Assignment 2 Due date: Dec 07, 2011 Submission: via email with subject as
BSEF10 OOP Assignment 2 ROLL NO: ????????? Develop template Polynomial of single variable. The internal representation of a 3 2 Polynomial should be a list of terms. For example x + 3x + 3x + 1 is a polynomial expression. Each term in polynomial contains a coefficient and an exponent. The term 2x3 has coefficient the 2 and exponent the 3. Develop a class Polynomial containing at least: a. constructors and destructor b. set and get functions c. toString function d. evaluate function e. The class should also provide the following overloaded operator =, +, -. *, ==, !=, <<, >>and [] Note: If template is difficult to manage, you must go for a double data type. BONUS: 1. Also provide, both non-static and static members, methods for all operators of part e. Warning: coping from any source, will result in severe punishment.

You might also like