예제 #1
0
        public PoliceCar Create(int milage, bool serviceRequired)
        {
            PoliceCar polCar = new PoliceCar();

            polCar._mileAge       = milage;
            polCar.ReadForService = serviceRequired;

            return(polCar);
        }
예제 #2
0
        public static void ISNotMain(string[] args)
        {
            PoliceCarFactory factory = new PoliceCarFactory();

            PoliceCarController controller = new PoliceCarController(factory);

            PoliceCar pc = controller.New(233, true);

            Console.WriteLine(pc.ReadForService + " - " + pc._mileAge);


            Console.Read();
        }