예제 #1
0
 //Factory Method
 protected AircraftFactory MakeAircraft()
 {
     engine  = airFactory.createEngine();
     cockpit = airFactory.createCockPit();
     wings   = airFactory.createWings();
     return(this);
 }
예제 #2
0
 static void M2(IWings w, int distance)
 {
     w.Fly(distance);
 }