コード例 #1
0
 public Driver(CarFactory carFactory)
 {
     CarFactory = carFactory;
     SportsCar = CarFactory.CreateSportsCar();
     FamilyCar = CarFactory.CreateFamilyCar();
 }
コード例 #2
0
 public Driver(CarFactory carFactory)
 {
     CarFactory = carFactory;
     SportsCar  = CarFactory.CreateSportsCar();
     FamilyCar  = CarFactory.CreateFamilyCar();
 }