|
|
CPSC128: Object-Oriented Programming I (W'06) Class Notes
Lecture notes, handouts, and readings for upcoming classes will be posted here.
Lecture notes are usually posted two or three days after class.
Week 14
Week 13
Week 12
Week 11
Week 10
-
Lecture Notes:
Copying Instances
-
Python Cheatsheet:
Week 10 Draft
-
Readings:
No new readings for this week, but have another look through the OOP-related sections of
Learning Python (chapters 19 through 22).
Week 8
Week 7
Week 6
-
Lecture Notes:
Object Identity
-
Exercises:
Classes
-
Python Cheatsheet:
Week 6 Draft
-
Readings:
Learning Python,
Chapter 19 (OOP: The Big Picture) but go ahead and gloss over the mentions of "inheritance" for the time being,
Chapter 20 (Class Coding Basics) just up to "Classes are Customized by Inheritance" on p.310,
Chapter 21 (Class Coding Details) just the "The Class Statement" and "Methods" sections pp.317-321;
A Byte of Python,
Chapter 11 (Object-Oriented Programming) but skip the "Inheritance" section;
How to Think Like a Computer Scientist,
Chapter 12 (Classes and Objects),
Chapter 13 (Classes and Functions),
Chapter 14 (Methods),
Chapter 15 (Sets of Objects)
Week 5
-
Lecture Notes:
Modules
-
Exercises:
Functions and Modules
-
Python Cheatsheet:
Week 5 Draft
-
Readings:
(Some readings have been moved from last week to this week.)
Learning Python,
Chapter 15 (Modules: The Big Picture),
Chapter 16 (Module Coding Basics) but skip the "Module Namespaces" section pp.261-266,
Chapter 18 (Advanced Module Topics) just the section "Mixed Usage Modes: __name__ and __main__" pp.280-281;
A Byte of Python,
Chapter 8 (Modules)
Week 4
-
Lecture Notes:
Functions and Side-Effects
-
Exercises:
Containers and Functions
-
Python Cheatsheet:
Week 4 Draft
-
Readings:
Learning Python,
Chapter 11 (Documenting Python Code) but skip the "PyDoc: HTML Reports" section pp.178-181,
Chapter 12 (Python Basics),
Chapter 13 (Scopes and Arguments) just the sections "Name Resolution: The LEGB Rule" on pp.199-202 and
"Passing Arguments" from page 207 up to the "Arbitrary Arguments Examples" section on page 212;
A Byte of Python,
Chapter 7 (Functions);
How to Think Like a Computer Scientist,
Chapter 3 (Functions),
Chapter 5 (Fruitful Functions) but skip section 5.5 "More Recursion" through to the end
Week 3
-
Lecture Notes:
Mutable and Immutable Objects
-
Exercises:
Strings and Lists
-
Sample Programs:
Lists vs Dictionaries
-
Exercise Solutions:
Strings and Lists
-
Exercise Solutions:
Lists and Dictionaries
-
Readings:
Learning Python,
Chapter 6 (Lists and Dictionaries),
Chapter 7 (Tuples, Files, and Everything Else) just up to "Python's Type Hierarchies" on page 123, and
Chapter 10 (while and for Loops) from "for Loops" on page 160 through the end;
A Byte of Python,
Chapters 6 (just "The for loop" and "The break statement"), and 9;
How to Think Like a Computer Scientist,
Chapters 8, 9, and 10;
Discover Python, Part 2: Understanding Objects and Containers,
Discover Python, Part 4: Using Lists,
Discover Python, Part 6: The for Loop,
Discover Python, Part 7: How to use Dictionaries Successfully
Week 2
Week 1
-
Lecture Notes:
Programming Fundamentals
-
Handout:
Sample Program: Circle Calculations
-
Python Cheatsheet:
Week 1 Draft
-
Readings:
Learning Python,
Chapter 1 (A Python Q&A Session), Chapter 2 (How Python Runs Programs),
Chapter 3 (How You Run Programs) but skip the section starting in the middle of page 31 through the top of page 40
as well as the Embedding Calls section on page 46,
Chapter 4 (Numbers), and Chapter 5 (Strings);
A Byte of Python,
Chapters 1 through 5;
How to Think Like a Computer Scientist,
Chapters 1, 2, and 7;
Discover Python, Part 1: Python's built-in numerical types
|