예제 #1
0
        static void Main(string[] args)
        {
            UniversityTeacher universityTeacher = new UniversityTeacher(10);

            Person  person  = universityTeacher;
            Teacher teacher = universityTeacher;

            Console.WriteLine();

            Dog dog = new Dog();

            dog.GetWeight();

            Console.WriteLine();

            Animal animal     = new Animal();
            string animalName = animal.PrintType();

            Console.WriteLine(animalName);

            Cat    cat  = new Cat();
            string name = cat.PrintType();

            Console.WriteLine(name);

            Frog   frog      = new Frog();
            string frognName = frog.PrintType();

            Console.WriteLine(frognName);
        }