#ifndef _RTRIANGLE_H #define _RTRIANGLE_H #include "Shape.h" class RightTriangle : public Shape { public: RightTriangle(int h, int b) : Shape("Right triangle"), height(h), base(b) { } ~RightTriangle() { cout << "Right Triangle destroyed" << endl; } double area() const { return .5 * height * base; } double perimeter() { return height + base + sqrt(base*base + height*height); } private: const int height; const int base; }; #endif