Programming Assignment 1. Due 05 Oct 2015
1. Write a C++ program to perform multiplication, addition, subtraction
and evaluation of polynomials USING POINTERS and LINKED LIST implementation.
Create a polynomial class with the following member functions (you may have
more if you want).
constructor to initialize zero polynomial.
constructor to initialize arbitrary polynomial (read input)
operator+
operator*
operator-
print
evaluate
exponent
modulus
Your implementation should be based on POINTERS and LINKED LIST. 0 points
otherwise. Also, when storing a polynomial, your linked list should
not contain anything with co-efficient zero.
You develop an interface to test the program. For instance,
you can create commands such as Create Polynomial,
Add Polynomial, Subtract Polynomial, and Evaluate Polynomial.
Suppose P and Q are two polynomials and n is an integer.
exponentiation operation: P^n = P * P * P * ... n times
modulus operation: P mod Q - Explanation will be given during regular
class hours.
IMPORTANT: You are not allowed to share codes, copy from any printed
source or internet. Please see the handout regarding cheating.
We will talk about exponentiation and modulus operation
in the class.