static void Main()
        {
            /* Apple apple = new Apple();
             * apple.MobileStandardEmployee();
             * apple.Call();
             * Samsung samsung = new Samsung();
             * samsung.Call();*/
            //run time polymorphism or Dynamic polymorphism
            MobileStandard mobileStandard;

            mobileStandard = new Apple();
            mobileStandard.Call(); //call Method in Apple
            Console.WriteLine(mobileStandard.Terms());
            mobileStandard = new Samsung();
            mobileStandard.Call(); //Call Method in samsung
            Console.WriteLine(mobileStandard.Terms());
            Console.Read();
        }
Exemplo n.º 2
0
        // creating an abstract class this abstract class must now make object as subch
        static void Main()
        {
            /*
             * Methods 1
             *  Apple ap = new Apple();
             *          ap.Call();
             */
            MobileStandart mobileStandart;

            mobileStandart = new Apple();
            mobileStandart.Call(); // Will talk about Aple

            mobileStandart = new Samsung();
            mobileStandart.Call(); // call out for samsungs


            mobileStandart.Term(); // will show samsung terms
            Console.ReadLine();
        }