Please enable JavaScript to use CodeHS

Utah Computer Programming 2

Description

In this lesson, we will define what classes and objects are and learn how to break code down in this structure. They will learn how to use the init method to give attributes to objects.

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

In this lesson, we will begin defining and calling methods on objects.

Objective

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

Description

In this lesson, we will learn how to override the built-in methods repr and eq in order to define how the object will create a string representation of itself and define equivalence for a specific class.

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

In this lesson, students will learn about operator overloading and how mathematical methods can be redefined by overriding their method in the class definition.

Objective

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

Description

In this lesson, students will learn about the difference between class and instance variables and how they are located.

Objective

SWBAT describe the differences between class and instance variables.