#include <rectangle.h>
Inheritance diagram for Rectangle:
Public Member Functions | |
Rectangle (int l, int w, int x, int y) | |
Rectangle (int l, int w, Point c) | |
virtual std::string | getType () const |
virtual double | getArea () const |
Rectangle::Rectangle | ( | int | l, | |
int | w, | |||
int | x, | |||
int | y | |||
) |
Overloaded constructor that takes in a length, a width, and an (x,y) coordinate.
l | The length of the rectangle (must be greater than 0) | |
w | The width of the rectangle (must be greater than 0) | |
x | The X coordinate of the rectangle's center point in 2D space | |
y | The Y coordinate of the rectangle's center point in 2D space |
Rectangle::Rectangle | ( | int | l, | |
int | w, | |||
Point | c | |||
) |
Overloaded constructor that takes in a length, a width, and a center Point.
l | The length of the rectangle (must be greater than 0) | |
w | The width of the rectangle (must be greater than 0) | |
c | The center point of the rectangle in 2D space |
string Rectangle::getType | ( | ) | const [virtual] |
double Rectangle::getArea | ( | ) | const [virtual] |