Home
API
Releases
Github
example_src
triangle.h
1
#ifndef TRIANGLE_H_
2
#define TRIANGLE_H_
3
4
#include "shape.h"
5
14
class
Triangle
:
public
Shape
15
{
16
private
:
18
int
base;
20
int
height;
21
22
public
:
23
33
Triangle
(
int
b,
int
h,
int
x,
int
y);
34
43
Triangle
(
int
b,
int
h,
Point
c);
44
52
virtual
std::string
getType
()
const
;
53
62
virtual
double
getArea
()
const
;
63
};
64
65
#endif
Triangle
Definition:
triangle.h:14
Shape
Definition:
shape.h:16
Triangle::getArea
virtual double getArea() const
Definition:
triangle.cpp:26
Triangle::Triangle
Triangle(int b, int h, int x, int y)
Definition:
triangle.cpp:6
Point
Definition:
point.h:12
Triangle::getType
virtual std::string getType() const
Definition:
triangle.cpp:20