blob: 16698489f7885e0c9662c03a7bd32d969cb68961 (
plain)
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
|
#include "Heating.h"
#include <iostream>
using std::cout;
using std::endl;
using std::string;
Heating::Heating()
{
temperature=0;
cout << "Konstruktor Heating called" << endl;
}
Heating::Heating(char * devName)
: GeneralDevice(devName)
{
temperature=0;
cout << "�berladener Konstruktor Heating called" << endl;
}
Heating::~Heating()
{
cout << "Destruktor Heating called" << endl;
}
void Heating::operator++(int)
{
temperature++;
}
void Heating::operator--(int)
{
temperature<=0?temperature=0:temperature--;
}
void Heating::print()
{
cout << "Name: " << getDeviceName()
<< " Temperatur: " << temperature << endl;
}
|