-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRhombus.h
More file actions
48 lines (28 loc) · 937 Bytes
/
Rhombus.h
File metadata and controls
48 lines (28 loc) · 937 Bytes
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
#ifndef RHOMBUS_H
#define RHOMBUS_H
#include "Shape.h"
#include <iostream>
using namespace std;
class Rhombus : public Shape {
public:
Rhombus() = delete;
explicit Rhombus(int rhomDiagonal, const string &desc = "");
Rhombus(const Rhombus &) = default;
~Rhombus() override;
const Rhombus &operator=(const Rhombus &rhs);
int getDiagonal() const;
string toString() const override;
void scale(int n) override;
double geoArea() const override;
double geoPerimeter() const override;
int scrArea() const override;
int scrPerimeter() const override;
int bBoxHeight() const override;
int bBoxWidth() const override;
/* Draws textual image of the shape on a drawing surface*/
void draw(Canvas &canvas, int c, int r, char fg, char bg = ' ') const override;
private:
int diagonal;
};
ostream &operator<<(ostream &ostr, const Rhombus &rhs);
#endif // !RHOMBUS_H