| 1 | #include "Rectangle.h" |
|---|---|
| 2 | |
| 3 | Rectangle::Rectangle(double width, double height) |
| 4 | : width_(width), height_(height) {} |
| 5 | |
| 6 | double Rectangle::area() const { |
| 7 | return width_ * height_; |
| 8 | } |
| 9 | |
| 10 | double Rectangle::perimeter() const { |
| 11 | return 2 * (width_ + height_); |
| 12 | } |
