Пример #1
0
        static void Main(string[] args)
        {
            CoffePowder  coffe      = new CoffePowder(100);
            WaterGalon   water      = new WaterGalon(1000);
            CoffeMechine yummyCoffe = new CoffeMechine(coffe, water);



            Console.WriteLine("check" + yummyCoffe.checkAvailability());
            String result = yummyCoffe.Esspresso;

            Console.WriteLine("result" + result);


            Console.WriteLine("check" + yummyCoffe.checkAvailability());
            result = yummyCoffe.Esspresso;
            Console.WriteLine("result" + result);



            Console.WriteLine("check" + yummyCoffe.checkAvailability());
            result = yummyCoffe.Esspresso;
            Console.WriteLine("result" + result);



            Console.WriteLine("check" + yummyCoffe.checkAvailability());
            result = yummyCoffe.Esspresso;
            Console.WriteLine("result" + result);


            Console.WriteLine("check" + yummyCoffe.checkAvailability());
            result = yummyCoffe.Esspresso;
            Console.WriteLine("result" + result);



            Console.WriteLine("check" + yummyCoffe.checkAvailability());
            result = yummyCoffe.Esspresso;
            Console.WriteLine("result" + result);

            Console.WriteLine("check" + yummyCoffe.checkAvailability());
        }
Пример #2
0
 public CoffeMechine(CoffePowder powder, WaterGalon galon)
 {
     this.waterGalon  = galon;
     this.coffePowder = powder;
 }