Exemple #1
0
        static void Main(string[] args)
        {
            Ifactory    factory = new UndergraduateFactory();
            Nightingale student = factory.CreateNiahtingale();

            student.BuyRice();
            student.Sweep();
            student.Wash();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            IFactory    factory = new UngraduateFactory();
            Nightingale Student = factory.CreateNightingale();

            Student.Sweep();
            Student.Wash();
            Student.BuyRice();
            Console.Read();
        }