-
Notifications
You must be signed in to change notification settings - Fork 1
/
Shape_Task2.h
75 lines (62 loc) · 1.18 KB
/
Shape_Task2.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/** Shape class to define shapes in a C++ code.
*
* #include "Shape_Task2.h" <BR>
* -llib
*
*/
#ifndef SHAPE_TASK2_H
#define SHAPE_TASK2_H
// SYSTEM INCLUDES
#include<iostream>
// Shape class definition
class Shape {
public:
// LIFECYCLE
/** Default + Overloaded constructor.
*/
Shape(char* = "white", int = 0);
/** Copy constructor.
*/
Shape(const Shape&);
/** Destructor.
*/
~Shape();
/** assignment operator.
*/
Shape& operator =(const Shape&);
// OPERATIONS
/** Pure virtual function that depicts drawing of Shape.
*
* @param void
*
* @return void
*/
virtual void Draw() = 0;
/** function that depicts rotation of Shape.
*
* @param void
*
* @return void
*/
void Rotate();
// ACCESS
// setters
void SetColor(char* = "white");
void SetCoord(int = 0);
void SetShape(char* = "white", int = 0);
/**
# @overload void SetShape(const Shape& aShape);
*/
void SetShape(const Shape& aShape);
// getters
char* GetColor() const;
int GetCoord() const;
const Shape& GetShape()const;
private:
// DATA MEMBERS
char* mColor;
int mCoord;
};
// end class Shape
#endif
// _SHAPE_TASK2_H_