Implemantation of isTriangle (with evaluate method)