gfactory
ShapeFactory.h
Go to the documentation of this file.
1
#ifndef FIRSTFACTORY_H
2
#define FIRSTFACTORY_H 1
3
4
class
Shape
{
5
public
:
6
virtual
void
Area
() = 0;
7
virtual
~Shape
() =
default
;
8
9
};
10
11
class
Triangle
:
public
Shape
{
12
public
:
13
void
Area
();
14
};
15
16
17
class
Box
:
public
Shape
{
18
public
:
19
void
Area
();
20
};
21
22
23
#endif
// FIRSTFACTORY_H
Box
Definition:
ShapeFactory.h:17
Box::Area
void Area()
Definition:
ShapeFactory.cc:10
Shape
Definition:
ShapeFactory.h:4
Shape::Area
virtual void Area()=0
Shape::~Shape
virtual ~Shape()=default
Triangle
Definition:
ShapeFactory.h:11
Triangle::Area
void Area()
Definition:
ShapeFactory.cc:6
examples
ShapeFactory.h
Generated by
1.9.1