#include <bits/stdc++.h>
using namespace std;
class Cashsuper
{
private:
public:virtual double addcash(double cash) = 0;double Getresult(double money){return addcash(money);}
};class Cashnormal : public Cashsuper
{public:double addcash(double cash){cout << "do nothing:" << endl;return cash;}
};class Cashrebate : public Cashsuper
{public:double addcash(double cash){cout << "do rebate:" << endl;return cash;}
};class CashReturn : public Cashsuper
{
public:double addcash(double cash){cout << "do return:" << endl;return cash;}
};class Context
{
private:Cashsuper *cashsuper;public:double CreatCobtext(char o,double cash){Cashsuper *oper=nullptr;switch (o) {case 'a':oper = new Cashnormal();break;case 'b':oper = new Cashrebate();break;case 'c':oper = new CashReturn();break;}return oper->Getresult(cash);}};
int main()
{Context context;context.CreatCobtext('c',100000);
}