コード例 #1
0
ファイル: Program.cs プロジェクト: Alvitabonita/mesin-kopi
        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;
 }