verify if is triangle before returning its type or print it. Compute perimeter
added draft for class graph