-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShapes.h
30 lines (25 loc) · 832 Bytes
/
Shapes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "Point.h"
class Shapes
{
protected:
Point start;
char color[25];
unsigned int ID;
public:
Shapes(double x = 0, double y = 0, const char* color = "Unidentified", unsigned int ID = 0);
//Getters and setters
char* GetColor();
unsigned int GetID();
Point GetStart();
void SetColor(char* color);
void SetID(unsigned int ID);
//Some Methods that are overwritten for different objects
virtual void Print(ostream& strm) = 0;
virtual void Print()=0;
virtual void Translate(double vertical, double horizontal)=0;
virtual bool WithinRectangle(double startX, double startY, double width, double height)=0;
virtual bool WithinCircle(double startX, double startY, double radius)=0;
virtual double Area(double width, double height)=0;
virtual ~Shapes();
virtual Shapes* clone()=0;
};