-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCircle_Task2.h
79 lines (64 loc) · 1.31 KB
/
Circle_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
76
77
78
79
/** Circle class inherited from Shape class.
*
* #include "Circle_Task2.h" <BR>
* -llib
*
*/
#ifndef CIRCLE_TASK2_H
#define CIRCLE_TASK2_H
// SYSTEM INCLUDES
#include<iostream>
// LOCAL INCLUDES
#include "Shape_Task2.h"
// Circle class definition
class Circle : public Shape {
public:
// LIFECYCLE
/** Default + Overloaded constructor.
*/
Circle(char* = "white", int = 0, float = 0.0);
/** Copy constructor.
*/
Circle(const Circle&);
/** assignment operator.
*/
Circle& operator =(const Circle&);
// Use compiler-generated destructor.
// ~Circle();
// OPERATIONS
/** Pure virtual function that draws Circle.
*
* @param void
*
* @return void
*/
void Draw();
/** function that computes area of Circle.
*
* @param void
*
* @return Area of circle
*/
float ComputeArea();
// ACCESS
// setters
void SetRadius(float = 0.0);
void SetCircle(char* = "white", int = 0, float = 0.0);
/**
# @overload void SetCircle(float = 0.0);
*/
void SetCircle(float = 0.0);
/**
# @overload void SetCircle(const Circle& aCircle);
*/
void SetCircle(const Circle& aCircle);
// getters
float GetRadius()const;
const Circle& GetCircle()const;
private:
// DATA MEMBERS
float mRadius;
};
// end class Circle
#endif
// _CIRCLE_TASK2_H_