POB_2019/Figures/source/Rectangle.cpp
2019-05-13 20:54:13 +02:00

16 lines
286 B
C++

#include "../include/Rectangle.h"
#include <string>
using namespace std;
Rectangle::Rectangle() : w(0), h(0) {}
Rectangle::Rectangle(float _w, float _h) : w(_w), h(_h) {}
string Rectangle::type() const {
return "Rectangle";
}
float Rectangle::area() const {
return w * h;
}