IT 117: Intermediate Scripting
Class 19

Today's Topics

Tips and Examples


New Material

Reading Assignment

In Chapter 11, Inheritance, from our textbook, Starting Out with Python, you should read sections 11.1 and 11.2, Introduction to Inheritance and Polymorphism, before next Tuesday's class.

Homework 9

I have posted homework 9 here.

It is due this coming Sunday at 11:59 PM.

Quiz 5

Let's review the answers to Quiz 5.

Tips and Examples

TypeError When Creating Objects


The Constructor Is Special

Defining a Class

Creating An Object from A Class

The self Variable

Improving the Date Class

Refactoring the Date Class

The Time Class

Changing the Attributes of a Class

New Material

Accessing Attributes Directly

Data Hiding

Data Validation in The Constructor

Hiding Methods

The __str__ Method

Accessor and Mutator Methods


Graded Quiz