Exemplo n.º 1
0
 static void Main()
 {
     Worker               robot        = new Robot("robot1", 0);
     Worker               employee     = new Employee("10");
     ISleeper             developer    = new Employee("10");
     IRechargeable        rechargable  = new Robot("10", 0);
     List <IRechargeable> rechargables = new List <IRechargeable>()
     {
         rechargable
     };
     RechargeStation rs = new RechargeStation(rechargables);
 }
Exemplo n.º 2
0
        static void Main()
        {
            Employee        employee        = new Employee("Mila Akexieva");
            Robot           robot           = new Robot("R500", 80);
            RechargeStation rechargeStation = new RechargeStation();

            rechargeStation.Recharge(robot);

            employee.Work(8);
            robot.Work(24);
            Console.WriteLine(robot.CurrentPower);
        }