コード例 #1
0
ファイル: Program.cs プロジェクト: maciekak/KoloCKratka
        static void Main(string[] args)
        {
            var automat = new Automat();
            var client  = new Client(automat);

            automat.ShowCoffeType();
            client.DecideCoffeeType();

            automat.ShowSugarInfo();
            client.DecideSugarQuantity();

            automat.ComputeCoffeePrice();
            int money;

            do
            {
                automat.AskForMoney();
                money = client.Pay();
            } while (!automat.ReceiveMoneyAndCheckIfEnough(money));

            automat.PrepereCoffee();
            client.GetCoffee();

            Console.ReadKey();
        }
コード例 #2
0
ファイル: Client.cs プロジェクト: maciekak/KoloCKratka
 public Client(Automat automat)
 {
     this.automat = automat;
 }