triangle.h
1 #ifndef TRIANGLE_H_
2 #define TRIANGLE_H_
3 
4 #include "shape.h"
5 
14 class Triangle : public Shape
15 {
16  private:
18  int base;
20  int height;
21 
22  public:
23 
33  Triangle(int b,int h,int x,int y);
34 
43  Triangle(int b,int h,Point c);
44 
52  virtual std::string getType() const;
53 
62  virtual double getArea() const;
63 };
64 
65 #endif
Definition: triangle.h:14
Definition: shape.h:16
virtual double getArea() const
Definition: triangle.cpp:26
Triangle(int b, int h, int x, int y)
Definition: triangle.cpp:6
Definition: point.h:12
virtual std::string getType() const
Definition: triangle.cpp:20