Ejemplo n.º 1
0
        // Fylder tanken op med den væske den har fået i sin parameter
        public string Fill(Liquid liquid)
        {
            this.liquid = liquid;
            amount      = 1000;

            return("Liqiud tank is filled with " + liquid.GetType().Name.ToLower());
        }
Ejemplo n.º 2
0
        public Coffee MakeBlackCoffee()
        {
            // Use them to make coffee
            Console.WriteLine("Making coffee with {0} and {1}.",
                              Liquid.GetType().Name,
                              PowderedCoffee.GetType().Name);

            return(new BlackCoffee());
        }
Ejemplo n.º 3
0
 public string Purchase()
 {
     return($"{Liquid.GetType().Name} - " + $"{Company.GetType().Name}");
 }