Classes and Object-oriented Programming

Lecture Slides Lecture Slides (pdf) Lecture Slides (ipynb)

Tutorial Exercise Tutorial Exercise (pdf) Tutorial Exercise (ipynb)


We saw how functions allow us to make our code more generalisable and abstract. But what if we wanted to bundle our code with the kinds of data it could operate on? Classes and object-oriented programming allow us to address this challenge.

Required Readings

  • Guttag Ch 10: Classes and Object-oriented Programming;

Additional Readings

Tutorial

  • Working with classes and methods.