Exemplo n.º 1
0
        static void Main(string[] args)
        {
            MobilePhoneA mobilePhoneA = new MobilePhoneA();

            mobilePhoneA.PowerOn();
            mobilePhoneA.DialUp();
            mobilePhoneA.about();
            mobilePhoneA.PowerOff();

            MobilePhoneB mobilePhoneB = new MobilePhoneB();

            mobilePhoneB.PowerOn();
            mobilePhoneB.DialUp();
            mobilePhoneB.about();
            mobilePhoneB.PowerOff();

            AbstractClass abstractClass;

            abstractClass = new ConcreteClassA();
            abstractClass.TemplateMethod();
            abstractClass = new ConcreteClassB();
            abstractClass.TemplateMethod();
        }