コード例 #1
0
        static void BuildVehicle(IVehicleFactory factory)
        {
            Engine    engine    = factory.CreateEngine();
            InnerPart innerPart = factory.CreateInnerPart();
            OuterPart outerPart = factory.CreateOuterPart();

            engine.CheckEngine();
            innerPart.CheckInnerPart();
            outerPart.CheckOuterPart();
        }