n/a
Diff: Square.cpp
- Revision:
- 0:202298a7e6bc
- Child:
- 1:f72e3e1af03d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Square.cpp Tue Mar 22 09:30:17 2016 +0000 @@ -0,0 +1,15 @@ +#include "Square.h" +#include "Rectangle.h" +#include "mbed.h" +#include <string> + +Square::Square(float size) : Rectangle(size, size) +{ + this->width = size; + this->height = size; +} + +float Square::getArea() +{ + return width * height; +} \ No newline at end of file