Beispiel #1
0
 public void Drive(IDrivable vehivle)
 {
     vehivle.Start();
     vehivle.Accelerate();
     vehivle.Brake();
     vehivle.Stop();
 }
 public void Drive(IDrivable vehicle)
 {
     Console.WriteLine("Take it easy. I'm just learnig to drive");
     vehicle.Start();
     vehicle.ChangeOrientation(45);
     vehicle.ChangeOrientation(-45);
     vehicle.Stop();
 }
Beispiel #3
0
 public void Drive(IDrivable drivable)
 {
     Console.WriteLine("I'm about to drive!");
     drivable.Start();
     Console.WriteLine("I'm about to turn");
     drivable.ChangeOrientation(45);
     Console.WriteLine("I'm about to stop");
     drivable.Stop();
 }
Beispiel #4
0
 /// <summary>
 /// Test Method Driving Van and Car AroundTheBlock
 /// </summary>
 /// <param name="d">IDrivable</param>
 public static void AroundTheBlock(IDrivable d)
 {
     d.Start();
     d.Accelerate();
     d.Turn("Right");
     d.Turn("Right");
     d.Turn("Right");
     d.Turn("Right");
     d.Decelerate();
     d.Stop();
 }
Beispiel #5
0
 void IDrive.Drive(IDrivable vehicle)
 {
     Console.WriteLine("console.log(I can drive better than any human)");
     vehicle.Start();
     vehicle.Stop();
 }