class Rectangle : public Shape
Description
Represents a rectangle with a given width and height.
Defined on line 16 at Rectangle.h
Public Members
double width_
Width of the rectangle.
double height_
Height of the rectangle.
Public Methods
void Rectangle(double width, double height)
brief
Constructs a new Rectangle object.
Defined on line 3 at Rectangle.cpp
virtual double area() override const
brief
Calculates the area of the rectangle.
return
double The area of the rectangle.
Defined on line 6 at Rectangle.cpp
virtual double perimeter() override final const
brief
Calculates the perimeter of the rectangle.
return
double The perimeter of the rectangle.
Defined on line 10 at Rectangle.cpp
Typedefs
typedef std::vector<int> IntVector;
Defined on line 43 at Rectangle.h
Rectangle class derived from Shape.