package math.polynomials;

import math.utils.Util;

public class Poly10 {
    public static void main(String[] args) {
        //add (Poly poly)
        Jdm a7 = new Jdm(3, "x", 3);
        Jdm a8 = new Jdm(2, "x", 2);
        Jdm a9 = new Jdm(3, "x", 1);
        Jdm a10 = new Jdm(2, "x", 0);
        Jdm[] arr1 = {a7, a8, a9, a10};
        Poly poly1 = new Poly(arr1);
        Util.print(poly1);
        Jdm a11 = new Jdm(1, "x", 3);
        Jdm a12 = new Jdm(-2, "x", 2);
        Jdm a13 = new Jdm(1, "x", 1);
        Jdm a14 = new Jdm(-5, "x", 0);
        Jdm[] arr2 = {a11, a12, a13, a14};
        Poly poly2 = new Poly(arr2);
        Util.print(poly2);
        poly1.add(poly2);
        poly1.reduce(new MaxFirstComp());
        Util.print(poly1);
    }
}
