package math.polynomials;

import math.utils.Util;

public class Poly11 {
    public static void main(String[] args) {
        //sub(Poly poly)
        Jdm a17 = new Jdm(3, "x", 3);
        Jdm a18 = new Jdm(2, "x", 2);
        Jdm a19 = new Jdm(3, "x", 1);
        Jdm a20 = new Jdm(2, "x", 0);
        Jdm[] arr3 = {a17, a18, a19, a20};
        Poly poly4 = new Poly(arr3);
        Util.print(poly4);
        Jdm a21 = new Jdm(1, "x", 3);
        Jdm a22 = new Jdm(-2, "x", 2);
        Jdm a23 = new Jdm(1, "x", 1);
        Jdm a24 = new Jdm(-5, "x", 0);
        Jdm[] arr4 = {a21, a22, a23, a24};
        Poly poly5 = new Poly(arr4);
        Util.print(poly5);
        poly4.sub(poly5);
        poly4.reduce(new MaxFirstComp());
        Util.print(poly4);
    }
}
