static void Main(string[] args)
        {
            CoffePowder  coffe      = new CoffePowder(100);
            WaterGalon   water      = new WaterGalon(1000);
            CoffeMilk    milk       = new CoffeMilk(400);
            CoffeMechine yummyCoffe = new CoffeMechine(coffe, water, milk);

            Console.WriteLine("Coffee Machine!\n");
            Console.WriteLine("Pilihan : ");
            Console.WriteLine("a. Espresso");
            Console.WriteLine("b. Cappucino");
            Console.Write("Masukan pilihan : ");
            char order = char.Parse(Console.ReadLine());

            if (order == 'a')
            {
                Console.WriteLine("\ncheck " + yummyCoffe.checkAvailability());
                String result = yummyCoffe.makeEsspresso();
                Console.WriteLine("result " + result);
            }

            if (order == 'b')
            {
                Console.WriteLine("check " + yummyCoffe.checkAvailability());
                String result = yummyCoffe.makeCappucino();
                Console.WriteLine("result " + result);
            }

            Console.WriteLine("check " + yummyCoffe.checkAvailability());
        }
Пример #2
0
        static void Main(string[] args)
        {
            CoffePowder  coffe      = new CoffePowder(100);
            WaterGalon   water      = new WaterGalon(1000);
            Milk         milk       = new Milk(400);
            CoffeMechine yummyCoffe = new CoffeMechine(coffe, water, milk);

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

            Console.WriteLine("result " + result);

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

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

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

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

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

            Console.WriteLine("check " + yummyCoffe.checkAvailability());
        }
Пример #3
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.makeEsspresso();

            Console.WriteLine("result " + result);

            Console.WriteLine("check " + yummycoffe.checkAvailability());
            result = yummycoffe.makeEsspresso();
            Console.WriteLine("result " + result);

            Console.WriteLine("check " + yummycoffe.checkAvailability());
            result = yummycoffe.makeEsspresso();
            Console.WriteLine("result " + result);

            Console.WriteLine("check " + yummycoffe.checkAvailability());
            result = yummycoffe.makeEsspresso();
            Console.WriteLine("result " + result);

            Console.WriteLine("check " + yummycoffe.checkAvailability());
            result = yummycoffe.makeEsspresso();
            Console.WriteLine("result " + result);

            Console.WriteLine("check " + yummycoffe.checkAvailability());
            result = yummycoffe.makeEsspresso();
            Console.WriteLine("result " + result);

            Console.WriteLine("check " + yummycoffe.checkAvailability());
        }
Пример #4
0
        static void Main(string[] args)
        {
            Console.WriteLine("Starbucks Coffe");


            CoffePowder  coffe      = new CoffePowder(100);
            WaterGalon   water      = new WaterGalon(1000);
            Milk         milk       = new Milk(300);
            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.makeEsspresso();
            Console.WriteLine("result" + result);

            //3nd cup coffe
            Console.WriteLine("check" + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeEsspresso();
            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.makeEsspresso();
            Console.WriteLine("result" + result);

            Console.WriteLine("check" + yummyCoffe.checkAvailability());
        }
Пример #5
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");


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

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

            Console.WriteLine("result " + result);

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

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

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

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

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

            Console.WriteLine("check " + yummyCoffe.checkAvailability());
        }
Пример #6
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            CoffePowder  coffe      = new CoffePowder(1000);
            WaterGalon   water      = new WaterGalon(10000);
            Milk         milk       = new Milk(10000);
            CoffeMechine yummyCoffe = new CoffeMechine(coffe, water);
            CoffeMechine cappucino  = new CoffeMechine(coffe, water, milk);

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

            Console.WriteLine("result" + result);

            Console.WriteLine("check " + cappucino.checkAvailability());
            result = cappucino.makeEsspresso();
            Console.WriteLine("result" + result);
            //2
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeEsspresso();
            Console.WriteLine("result" + result);

            Console.WriteLine("check " + cappucino.checkAvailability());
            result = cappucino.makeEsspresso();
            Console.WriteLine("result" + result);
            //3
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeEsspresso();
            Console.WriteLine("result " + result);

            Console.WriteLine("check " + cappucino.checkAvailability());
            result = cappucino.makeEsspresso();
            Console.WriteLine("result" + result);
            //4
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeEsspresso();
            Console.WriteLine("result " + result);

            Console.WriteLine("check " + cappucino.checkAvailability());
            result = cappucino.makeEsspresso();
            Console.WriteLine("result" + result);
            //5
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeEsspresso();
            Console.WriteLine("result " + result);

            Console.WriteLine("check " + cappucino.checkAvailability());
            result = cappucino.makeEsspresso();
            Console.WriteLine("result" + result);
            //6
            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            result = yummyCoffe.makeEsspresso();
            Console.WriteLine("result " + result);

            Console.WriteLine("check " + cappucino.checkAvailability());
            result = cappucino.makeEsspresso();
            Console.WriteLine("result" + result);

            Console.WriteLine("check " + yummyCoffe.checkAvailability());
            Console.WriteLine("check " + cappucino.checkAvailability());
        }