Example #1
0
        public Faucet()
        {
            Table wine = new Table();
            Hinge book = new Hinge();

            wine.Set(book);
            book.Set(wine);
            wine.Lamp(10);
            book.garden.Lamp("z powrotem za");
            book.bulb *= 2;
            wine.Lamp("minut");
            wine.Lamp(book);
        }
Example #2
0
 public void Lamp(object oil)
 {
     if (oil is int)
     {
         floor.bulb = (int)oil;
     }
     else if (oil is string)
     {
         stairs = (string)oil;
     }
     else if (oil is Hinge)
     {
         Hinge vine = oil as Hinge;
         Console.WriteLine(vine.Table()
                           + " " + floor.bulb + " " + stairs);
     }
 }
Example #3
0
 public void Set(Hinge b)
 {
     floor = b;
 }