#include "Coffeemachine.h" #include using std::cout; using std::endl; using std::string; //using std::istream; using std::ostream; Coffeemachine::Coffeemachine() { numberOfCups=0; cout << "Konstruktor Coffeemachine called" << endl; } Coffeemachine::Coffeemachine(char * devName) :GeneralDevice(devName) { numberOfCups=0; cout << "Überladener Konstruktor Coffeemachine called" << endl; } Coffeemachine::~Coffeemachine() { cout << "Destruktor Coffeemachine called" << endl; } void Coffeemachine::operator++(int) { numberOfCups++; } void Coffeemachine::operator--(int) { numberOfCups<=0?numberOfCups=0:numberOfCups--; } void Coffeemachine::print() { cout << "Name: " << getDeviceName() << " Cups: " << numberOfCups << endl; }