shape.h
1 #ifndef SHAPE_H_
2 #define SHAPE_H_
3 
4 #include <iostream>
5 #include "point.h"
6 
16 class Shape
17 {
18  protected:
19 
22 
23  public:
24 
31  Shape(int x,int y);
32 
38  Shape(Point c);
39 
47  Point getCenter() const;
48 
56  void setCenter(Point c);
57 
65  virtual std::string getType() const = 0;
66 
75  virtual double getArea() const = 0;
76 };
77 
78 #endif
virtual double getArea() const =0
Point center
Definition: shape.h:21
Definition: shape.h:16
Shape(int x, int y)
Definition: shape.cpp:6
void setCenter(Point c)
Definition: shape.cpp:26
Definition: point.h:12
virtual std::string getType() const =0
Point getCenter() const
Definition: shape.cpp:20