Search for question
Question

Input: height (double)

Output: none

• setWidth

Input: width (double)

Output: none

.getColor

Input: none

Output: color of the shape (type Color)

• getXPos

Input: none

Output: x position of the bottom left corner (double)

getYPos

Input: none

Output: y position of the bottom left corner (double)

• getHeight

Input: none

Output: height (double)

• getWidth

Input: none

Output: width (double)

2.3 Rectangle Class Methods

• Constructor

Input: x position of upper left corner (double), y position of upper left corner (double),

width (double), height (double)

• calculatePerimeter

Input: none

Output: perimeter of the rectangle (type double)

• calculateArea

Input: none

Output: area of the rectangle (double)

• set Color

Input: color of the shape (type Color)

Output: none

• set Pos

Input: x, y position of upper left corner (both doubles)

Output: none

.setHeight

Input: height (double)

Output: none

Fig: 1