using Equation object in Main.java