Classes and Objects -- the Basics
Students will...
- understand what it means to create a new type (i.e., a new class).
- understand that a new type includes the values to be stored (the data) and the operations defined on that data.
- be able to use the terminology state and methods of an object.
- be able to write code to define a new class, including the constructor method
__init__
.
- be able to converse using the terms instantiation, instance, attribute, constructor, and accessor.
- be able to write code to create a new instance (object) of a class.
- be able to explain the use of the parameter self.
- understand the utility of creating a constructor that takes (optional) initial values for the state of the object.