public virtual void ShowResult() { Console.WriteLine($"当前的汽车{Name},当前汽车的速度{Speed}"); Thread.Sleep(1000); VehicleAction.IncrementSpeed(this); Console.WriteLine($"当前的汽车{Name},当前汽车的速度{Speed}"); Thread.Sleep(1000); VehicleAction.IncrementSpeed(this); Console.WriteLine($"当前的汽车{Name},当前汽车的速度{Speed}"); Thread.Sleep(1000); Console.WriteLine($"{this.Name} 抵达终点了~"); Console.WriteLine("汽车名称:{0} 当前速度:{1} 最大速度:{2}", this.Name, this.CurentSpeed, MaxSpeed); }
public void Run() { VehicleAction.ToRun(this); }