Input: radius (double)
Output: none (void)
.getColor
Input: none
Output: color of the shape (type Color)
• getXPos
Input: none
Output: x position of the center (double)
.getYPos
Input: none
Output: y position of the center (double)
• getRadius
Input: none
Output: radius (double)
2.2 Triangle Class Methods
Hint: You can assume the triangles we want to draw are isosceles triangles.
• Constructor
Input: x position of bottom left corner (double), y position of bottom left corner (double),
width (double), height (double)
• calculatePerimeter
Input: none
Output: perimeter of the triangle (type double)
• calculateArea
Input: none
Output: area of the triangle (double)
• set Color
Input: color of the shape (type Color)
Output: none
• set Pos
Input: x, y position of bottom left corner (both doubles)
Output: none
• setHeight
5
Fig: 1