Exemple #1
0
        static void Main(string[] args)
        {
            CoffePowder  coffe      = new CoffePowder(100);
            WaterGalon   water      = new WaterGalon(1000);
            milk         milk       = new milk(300);
            CoffeMachine yummyCoffe = new CoffeMachine(coffe, water, milk);

            //1st
            Console.WriteLine("check" + yummyCoffe.checkAvailability());
            String result = yummyCoffe.makeEsspresso();

            Console.WriteLine("result" + result);
            //2nd
            Console.WriteLine("check" + yummyCoffe.checkAvailability());
            result = yummyCoffe.MakeCappucino();
            Console.WriteLine("result" + result);
            //3nd
            Console.WriteLine("check" + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeEsspresso();
            Console.WriteLine("result" + result);
            //4nd
            Console.WriteLine("check" + yummyCoffe.checkAvailability());
            result = yummyCoffe.MakeCappucino();
            Console.WriteLine("result" + result);
            //5nd
            Console.WriteLine("check" + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeEsspresso();
            Console.WriteLine("result" + result);
            //6nd
            Console.WriteLine("check" + yummyCoffe.checkAvailability());
            result = yummyCoffe.MakeCappucino();
            Console.WriteLine("result" + result);

            Console.WriteLine("check" + yummyCoffe.checkAvailability());
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World");

            CoffePowder  coffe      = new CoffePowder(100);
            WaterGalon   water      = new WaterGalon(1000);
            Milk         milk       = new Milk(400);
            CoffeMechine yummyCoffe = new CoffeMechine(coffe, water, milk);

            //1st cup coffe
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            String result = yummyCoffe.makeCappucino();

            Console.WriteLine("result " + result);

            //2nd cup coffe
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeCappucino();
            Console.WriteLine("result " + result);

            //3nd cup coffe
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeCappucino();
            Console.WriteLine("result " + result);

            //4nd cup coffe
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeCappucino();
            Console.WriteLine("result " + result);

            //5nd cup coffe
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeCappucino();
            Console.WriteLine("result " + result);

            //6nd cup coffe
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeCappucino();
            Console.WriteLine("result " + result);

            Console.WriteLine("check " + yummyCoffe.checkAvailability());
        }
Exemple #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Farabi Coffe Shop!!");

            CoffePowder  coffe      = new CoffePowder(100);
            WaterGalon   water      = new WaterGalon(1000);
            Milk         milk       = new Milk(500);
            CoffeMachine yummyCoffe = new CoffeMachine(coffe, water, milk);

            //1st cup coffe
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            String result = yummyCoffe.makeEsspreso();

            Console.WriteLine("result " + result);

            //2nd cup coffe
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeEsspreso();
            Console.WriteLine("result " + result);

            //3th cup coffe
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeCappucino();
            Console.WriteLine("result " + result);

            //4th cup coffe
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeCappucino();
            Console.WriteLine("result " + result);

            //5th cup coffe
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeEsspreso();
            Console.WriteLine("result " + result);

            //6th cup coffe
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeEsspreso();
            Console.WriteLine("result " + result);
        }
Exemple #4
0
 public CoffeMachine(CoffePowder powder, WaterGalon galon, milk milk)
 {
     this.waterGalon  = galon;
     this.coffePowder = powder;
     this.milk        = milk;
 }