In the assignment program bundle you will find a class PNode forrepresenting polynomials as described above. Each node has two datafields, one for storing the degree of a term and one for storingthe corresponding coefficient. The related class PolyList creates alist of PNodes arranged so that it matches a polynomial written innormal form. This is enforced by the class invariant, which saysthat (when the list is not empty) the remaining nodes are ordered(descending) according to their degree field, all nodes in the listhave different (distinct) degree fields and all nodes have non-zerocoefficient field.
PNode simplify(PNode p) — The output of this
OR
OR