コード例 #1
0
 //Factory Method
 protected AircraftFactory MakeAircraft()
 {
     engine  = airFactory.createEngine();
     cockpit = airFactory.createCockPit();
     wings   = airFactory.createWings();
     return(this);
 }
コード例 #2
0
 //Factory Method
 protected virtual FighterSixteen makeFighterPlane()
 {
     engine  = new TopModelEngine();
     cockpit = new TopModelCockpit();
     return(this);
 }