Esempio n. 1
0
 public virtual void StartVehicle(Object o, GenericVehicle v)
 {
     if (o.GetType() == typeof(Person))
     {
         v.TurnOnEngine(o, v);
     }
     else
     {
         Console.WriteLine("This life form cannot start a vehicle.\n");
     }
 }
Esempio n. 2
0
 public override void StartVehicle(Object o, GenericVehicle v)
 {
     if (this.GetAwakeStatus() == true)
     {
         Console.WriteLine(this.GetFirstName() + " started the car.\n");
         v.TurnOnEngine(o, v);
     }
     else
     {
         Console.WriteLine(this.GetFirstName() + " needs to be awake first.\n");
     }
 }