基本信息
活跃概况
个人说明
个人简介及联系方式见文集(虽然很少更新神马的)
class jianbing
{
private:
Account WeChat, Alipay;
Drawer drawer;
Spoon spoon;
Brush brush;
Stove stove;
Shovel shovel;
double price = 6;
public:
pancake base;
unsigned int n_egg = 1;
bool b_lajiao;
bool b_conghua;
bool b_xiangcai;
bool b_baocui = true;
bool b_huotuichang = false;
jianbing()
{
Flour flour = spoon.take();
base = pancake(flour, stove);
cin >> n_egg;
Egg* eggs = new Egg[n_egg];
for(int i=0;i<n_egg;++i)
{
base.add(eggs[i]);
if(i>0)price = price+1;
}
base.flip();
brush.brush(base, tianmianjiang);
cout << "Any lajiao?" << endl;
cin >> b_lajiao;
if(b_lajiao)brush.brush(base, lajiao);
cout << "What about conghua and xiangcai?" << endl;
cin >> b_conghua >> b_xiangcai;
if(b_conghua)shovel.add(base, conghua);
if(b_xiangcai)shovel.add(base, xiangcai);
cin >> b_baocui;
if(b_baocui)shovel.add(base, baocui);
cout << "Do you want huotuichang?" << endl;
cin >> b_huotuichang;
if(b_huotuichang)
{
shovel.add(base, huotuichang);
price = price + 3;
}
base.fold();
PlasticBag bag;
bag.wrap(this);
cout << price << " yuan please." << endl;
enum {cash, wechat, alipay} method_of_payment;
cin >> method_of_payment;
switch(method_of_payment)
{
case cash: drawer.accept(price); break;
case wechat: WeChat.accept(price); break;
case alipay: Alipay.accept(price); break;
default: throw("I don\'t understand.");
}
cout << "Thank you, see you next time!" << endl;
}
~jianbing()
{
eat(this);
}
};