static void Main(string[] args)
        {
            //instancio a una nueva persona
            Person Persona = new Person("Pepe", "Argento");

            //usa sus metodos de la clase Person
            Persona.Greet();
            Console.ReadKey();

            //instancio un nuevo estudiante
            Student Estudiante = new Student("Coqui", "Argento");

            //usa sus metodos de la clase Student
            Estudiante.SetAge(21);
            Estudiante.Greet();
            Estudiante.ShowAge();
            Console.ReadKey();

            //instancion un nuevo maestro
            Teacher Maestro = new Teacher("Maestro", "Ciruela");

            //usa sus metodos de la clase Teacher
            Maestro.SetAge(30);
            Maestro.Greet();
            Maestro.Explain();

            Console.ReadKey();
        }
        static void Main()
        {
            Person persoon1 = new Person();

            persoon1.Greet();
            Student student1 = new Student();

            student1.SetAge(21);
            student1.ShowAge();
            Teacher teacher1 = new Teacher();

            teacher1.Greet();
            teacher1.Explain();
        }
Exemple #3
0
        static void Main(string[] args)
        {
            Person personJulian = new Person("Julian", 19);
            Person person       = new Person(21);

            Console.WriteLine(person.Greet());
            Console.WriteLine(personJulian.Greet());
            Student student = new Student();

            Console.WriteLine(student.ShowAge(student.setAge(21)));
            Teacher teacher = new Teacher();

            teacher.setAge(30);
            Console.WriteLine(teacher.Greet());
            Console.WriteLine(teacher.Explain());
        }