summaryrefslogtreecommitdiffstats
path: root/Bachelor/Prog2/Prakt2/SmartHouse/Heating.cpp
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Bachelor/Prog2/Prakt2/SmartHouse/Heating.cpp
downloadStudium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.gz
Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Bachelor/Prog2/Prakt2/SmartHouse/Heating.cpp')
-rw-r--r--Bachelor/Prog2/Prakt2/SmartHouse/Heating.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/Bachelor/Prog2/Prakt2/SmartHouse/Heating.cpp b/Bachelor/Prog2/Prakt2/SmartHouse/Heating.cpp
new file mode 100644
index 0000000..1669848
--- /dev/null
+++ b/Bachelor/Prog2/Prakt2/SmartHouse/Heating.cpp
@@ -0,0 +1,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;
+}