Пример #1
0
        static void Main(string[] args)
        {
            Caballo Babieca  = new Caballo("Babieca");
            Humano  Juan     = new Humano("Juan");
            Gorila  Kingkong = new Gorila("Kingkong");

            Kingkong.pensar();
            Console.ReadKey();
        }
Пример #2
0
        static void Main(string[] args)
        {
            //instancia perteneciente a la clase caballo

            Caballo Babieeca = new Caballo();
            Humano  Juan     = new Humano();
            Gorilas Copito   = new Gorilas();

            Babieeca.CuidarCrias(); //en el menu aparecen metodos que hereda de la clase mamiferos (cuidar crias)
            Juan.Pensar();          //no hereda metodos exclusivos de la clase caballo
            Copito.Trepar();
        }
Пример #3
0
        static void Main(string[] args)
        {
            Caballo Blanco = new Caballo("Blanco");

            Humano  Elvis  = new Humano("Michael");
            Gorilla Copito = new Gorilla("Copito");

            Blanco.Galopar();

            Elvis.Pensar();

            Copito.trepar();
        }