Implemented triangle class