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

            armor.Initialize();
            ArmorSuite ironMan = new IronMan();

            ironMan.Initialize();
            ArmorSuite warmachine = new WarMachine();

            warmachine.Initialize();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            ArmorSuite armorsuite = new ArmorSuite();

            armorsuite.Initialize();

            Console.WriteLine("\nCreatind IronMan...");
            ArmorSuite ironman = new IronMan();

            ironman.Initialize();

            Console.WriteLine("\nCreating WarMachine...");
            ArmorSuite warmachine = new WarMachine();

            warmachine.Initialize();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            WriteLine("Creating ArmorSuite...");
            ArmorSuite armorsuite = new ArmorSuite();

            armorsuite.Initialize();

            WriteLine("\nCreating IronMan...");
            IronMan ironMan = new IronMan();

            ironMan.Initialize();

            WriteLine("\nCreating WarMachine...");
            WarMachine warMachine = new WarMachine();

            warMachine.Initialize();
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            WriteLine("Creating ArmorSuite...");
            ArmorSuite armorsuite = new ArmorSuite();

            armorsuite.Initialize();

            WriteLine("\nCreating IronMan...");
            ArmorSuite ironman = new IronMan();

            ironman.Initialize(); //IronMan Initialize
            //ironman.Print(); //부모 클래스의 참조형 변수를 사용했기 때문에 컴파일러는 부모 클래스 객체로 취급
            //그러므로 오버라이딩이 아닌 IronMan에만 있는 Print()메소드는 사용 못함
            WriteLine("\nCreating WarMachine...");
            ArmorSuite warmachine = new WarMachine();

            warmachine.Initialize();
        }