package math.polynomials;

import math.utils.Util;

public class Poly13 {
    public static void main(String[] args) {
        Jdm a1 = new Jdm(2, "x", 2);
        Jdm a2 = new Jdm(-2, "x", 1);
        Jdm a3 = new Jdm(2, "x", 0);
        Jdm[] arr1 = {a1, a2, a3};
        Poly poly1 = new Poly(arr1);
        Util.print(poly1);
        Jdm a5 = new Jdm(2, "x", 1);
        Jdm a6 = new Jdm(5, "x", 0);
        Jdm[] arr2 = {a5, a6};
        Poly poly2 = new Poly(arr2);
        Util.print(poly2);
        poly1.mult(poly2);
        poly1.reduce(new MaxFirstComp());
        Util.print(poly1);
    }
}
