bery - 北大未名BBS

bery 你的投降,要出于你的自由意志。 [离线]

本站职务:版务

个人文集 The third side of bery

关注

基本信息

你的投降,要出于你的自由意志。
保密

活跃概况

13422
45675
776
8.3
本站元老
35
2020-08-09 13:14:17
2020-08-09 13:17:37

个人说明

个人简介及联系方式见文集(虽然很少更新神马的)





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);

        }

};

您输入的密码有误,请重新输入