Please enable JavaScript to use CodeHS

Utah Programación Informática 2

Description

En esta lección, definiremos qué son las clases y los objetos y aprenderemos cómo desglosar el código en esta estructura. Aprenderán a usar el método init para dar atributos a los objetos.

Objective

SWBAT define class and object as well as create them inside their programs.

SWBAT create an init method to give attributes to objects.

Description

En esta lección, comenzaremos a definir y llamar métodos en objetos.

Objective

SWBAT create methods inside class definitions and call them on objects.

Description

En esta lección, aprenderemos cómo sobrescribir (override) los métodos incorporados repr y eq para definir cómo el objeto creará una representación de string de sí mismo y definir la equivalencia para una clase específica.

Objective

SWBAT override the repr method to define how the object will create a string representation of itself.
SWBAT override the eq method to define equivalence for this specific class.

Description

En esta lección, los estudiantes aprenderán sobre la sobrecarga del operador y cómo los métodos matemáticos pueden redefinirse anulando su método en la definición de clase.

Objective

SWBAT override mathematical operators to redefine the way mathematical functions are performed.

Description

En esta lección, los estudiantes aprenderán sobre la diferencia entre las variables de clase y de instancia y cómo se ubican.

Objective

SWBAT describe the differences between class and instance variables.