converts the infix to postfix method to a two function object.