Esempio n. 1
0
    public static void Main1(string[] args)
    {
        double    total       = 0.0d;
        CashSuper csuper      = CashFactory.createCashAccept("80% discount");
        double    totalPrices = csuper.acceptCash(288 * 3);

        total = total + totalPrices;
        Console.WriteLine("Result : {0}", total);
    }
        private double SetType(CashType type, double price, double num)
        {
            CashSuper cashsuper = CashFactory.createCashAccept(type);

            double totalPrices = 0d;

            totalPrices = cashsuper.AcceptCash(price * num);

            return(totalPrices);
        }