Below are lecture materials, listed by date.
- January 13th
- slides, one_per_page
- slides, six_per_page
- API for Point. Do this based on the exercise, before implementing the bodies.
- completed point example
- January 20th
- class design recipe
- slides, one_per_page
- slides, six_per_page
- more to read
- API for Rational. Do this before implementing the bodies.
- completed rational numbers example
- rational numbers with managed attributes Use property to manage num and denom.
- January 27th
- slides, one_per_page
- slides, six_per_page
- general Shape superclass Has the code that is common to Square and RightAngleTriangle
- Square subclass of Shape
- RightAngleTriangle subclass of Shape
- a sample client code of Shape
- another example for inheriting, extending, overriding
- Python tutor example Try this stack example; notice the LIFO animation on the right panel
- API for Stack Work on this before you implement Stack
- API for Sack Work on this before you implement Stack
- February 3rd
- slides, one_per_page
- slides, six_per_page
- abstract Container class Has the code that is common to Stack and Sack and some other possible subclasses
- Stack implementation
- Stack unittest you may add to these
- Sack implementation using lists Try to implement Sack using dictionaries
- Sack unittest you may add to these
- a sample client code of Container
- matching parentheses as a sample client code of Stack
- API for linked list classes start from this to write your own implementation of methods. Un-comment remaining methods once the first ones are working.
- February 10th
- slides, one_per_page
- slides, six_per_page
- linked list append exercise do this exercise before see the solution
- LinkedList solution
- compare containers
- February 24th
- slides, one_per_page
- slides, six_per_page
- reading recursion exercise do this exercise before see the annotated solution
- annotated recursion exercises
- recursion code example
- recursive turtle
- March 2nd
- slides, one_per_page
- slides, six_per_page
- Tree class with methods and functions
- Queue class used in helper function
- recursion exercise on contains method do this exercise before see the annotated solution
- more functions to build for tree
- March 9th
- slides, one_per_page
- slides, six_per_page
- Binary Tree implementation
- contains exercise
- evaluate exercise
- March 16th
- slides, one_per_page
- slides, six_per_page
- March 23rd
- slides, one_per_page
- slides, six_per_page
- March 30th
- slides, one_per_page
- slides, six_per_page
- April 6th
- slides, one_per_page
- slides, six_per_page
- the cover page of the final exam
- sample solution of Test 2, Also, see solution of other tests in the main web page