Implemented getter, setter functions in triangle class