-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRectangle.h
49 lines (34 loc) · 1.19 KB
/
Rectangle.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
//-----------------------------------------------------------
// File : Rectangle.h
// Class: COP 3003, Fall 2022
// Devl : Katarya Johnson-Williams
// Desc : Declaration of a Rectangle class object
//---------------------------------------------------------
// HEADER GUARD
#ifndef PROJECT_SHAPES_CALCULATOR_RECTANGLE_H
#define PROJECT_SHAPES_CALCULATOR_RECTANGLE_H
#include "Shape.h"
class Rectangle: public Shape {
protected:
float width;
float height;
public:
// Constructors
//---------------------------------------------------------
Rectangle(); // default constructor
Rectangle(Point bottomLeft, float newWidth, float newHeight);
// Accessors
//---------------------------------------------------------
Point getBottomLeftPoint();
void setBottomLeftPoint(Point point);
float getWidth();
void setWidth(float value);
float getHeight();
void setHeight(float value);
// Methods
//---------------------------------------------------------
float calculatePerimeter();
float calculateArea();
virtual std::string shapeProperties();
};
#endif //PROJECT_SHAPES_CALCULATOR_RECTANGLE_H