Classes Introduction
Classes allow us to define a new data type and allow us to organize our programs in a different way (Object Oriented Programming, a.k.a. OOP, a class is an object). An abstract data type has two parts: (1) attributes and (2) the operations that can be done on data of that type.
Chapter 11: Introduction to Classes
Videos
- Objects and Object-Oriented Programming (OOP)
- Object-Oriented Programming (Video)
- Building our own class (object) (Video I,
Video II)
class MyClass (object):
def __init__ (self, parameters):
suite-of-statements # initialize attributes
def some_method (self, parameters):
suite-of-statements
- Making a Clock class (Video)
Assignments
- Chapter 11 Exercises on Codio due 11/16.
- Lab09 (do pre-lab first on D2L)
- Project07 due in 3 weeks