public override void Ride(FamilyCar familycar)
 {
     Console.WriteLine($"{this.GetType().Name}Win{familycar.GetType().Name}");
 }
Example #2
0
 public abstract void Ride(FamilyCar familycar);
 public Driver(CarFactory carFactory)
 {
     _familyCar = carFactory.CreateFamilyCar();
     _sportsCar = carFactory.CreateSportsCar();
 }