Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Human Kalle = new Human();
            Robot Lasse = new Robot();
            IHumanBehaviour robotAdapter = new RobotAdapter(Lasse);

            Console.WriteLine("The human:");

            Kalle.sleep();
            Kalle.talk();
            Kalle.walk();
            Console.WriteLine();

            Console.WriteLine("The robot:");
            Lasse.recharge();
            Lasse.communicate();
            Lasse.rolls();
            Console.WriteLine();

            Console.WriteLine("The humaniod:");
            robotAdapter.sleep();
            robotAdapter.talk();
            robotAdapter.walk();
            Console.WriteLine();
            Console.ReadLine();
        }
Exemplo n.º 2
0
 public RobotAdapter(Robot humanoid)
 {
     theRobot = humanoid;
 }