Please enable JavaScript to use CodeHS

Ciencias de la computación, Nivel A (Nitro)

Lesson 9.5 Creación de referencias utilizando la herencia

Description

En esta lección, los estudiantes crearán referencias utilizando jerarquías de herencia. Un objeto puede asumir diferentes formas dependiendo de su implementación. Java puede llamar al método correcto incluso cuando un objeto está disfrazado como un tipo de referencia más genérico. Esto se conoce como polimorfismo. Esta lección corresponde al tema 9.5 de Programación Avanzada de Ciencias Computacionales.


Objective

Students will be able to:

  • Define reference variables of a superclass to be assigned to an object of a subclass in the same hierarchy

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU Mod-3 When multiple classes contain common attributes and behaviors, programmers create a new class containing the shared attributes and behaviors forming a hierarchy. Modifications made at the highest level of the hierarchy apply to the subclasses. (LO’s 3.B, 3.C)