Polygon
Polygon(int height, int width)
The Polygon()
function constructs the Polygon.
Parameters
int height - (optional) is the width of the polygon
int width - is the width of the polygon.
(.hpp)(.cpp)
~Polygon()
The ~Polygon()
function destroys the object
(.hpp)(.cpp)
int getHeight()
The getHeight()
function returns the polygon height
(.hpp)(.cpp)
int getWidth()
The getWidth()
function returns the polygon width
(.hpp)(.cpp)
void setHeight(int height)
The setHeight()
function sets the polygon height
Parameters
int height - no description
(.hpp)(.cpp)
void setWidth(int width)
The setWidth()
function sets the polygon width
Parameters
int width - no description
(.hpp)(.cpp)
float area()
The area()
function runs if there is no child class (polymorphism) so we return an invalid area
(.hpp)(.cpp)