class Rectangle

Defined at line 10 of file ./include/Rectangle.h

Rectangle class derived from Shape.

Represents a rectangle with a given width and height.

Public Methods

void Rectangle (double width, double height)

Constructs a new Rectangle object.

Parameters

width Width of the rectangle.
height Height of the rectangle.

Defined at line 3 of file ./src/Rectangle.cpp

double area ()

Calculates the area of the rectangle.

Returns

double The area of the rectangle.

Defined at line 6 of file ./src/Rectangle.cpp

double perimeter ()

Calculates the perimeter of the rectangle.

Returns

double The perimeter of the rectangle.

Defined at line 10 of file ./src/Rectangle.cpp