#include <iostream>
#include <cstring>
using namespace std;
class Coffeemachine {
int coffee=0, water=0, sugar=0;
public:
Coffeemachine();
Coffeemachine(int x, int y, int z);
void drinkEsppresso();
void drinkAmericano();
void drinksugarcoffee();
void show();
void fill();
};
Coffeemachine::Coffeemachine() {
coffee = 0, water = 0, sugar = 0;
}
Coffeemachine::Coffeemachine(int x ,int y,int z) {
coffee = x; water = y; sugar = z;
}//생성자 구현완료!
void Coffeemachine::drinkEsppresso() {
coffee = coffee - 1;
water = water - 1;
}
void Coffeemachine::drinkAmericano() {
coffee = coffee - 2;
water = water - 1;
}
void Coffeemachine::drinksugarcoffee() {
coffee = coffee - 1;
water = water - 2;
sugar = sugar - 1;
}
void Coffeemachine::show() {
cout << "Status of Coffee Machine, " << "COFFEE:" << coffee << "\t" << "WATER: " << water << "\t" << "SUGAR:" << sugar << endl;
}
void Coffeemachine::fill() {
coffee = 10;
water = 10;
sugar = 10;
}
int main() {
Coffeemachine java(5,10, 3);
java.drinkEsppresso();
java.show();
java.drinkAmericano();
java.show();
java.drinksugarcoffee();
java.show();
java.fill();
java.show();
}