INST 326 Module 6
Topics
With Module 6 we are moving from procedural programming to object-oriented programming. The differences between these two styles, however, are not as great as it may seem. First, object-oriented programming is primarily a way of organizing and thinking about your code. Second, because in Python every data type is an class, you’ve already been using obhjects and methods that were built in to Python. How you use and interact with those objects is unlikely to cabange much, but now you’ll also be able to create your own classes to suit your specific use-cases.
Learning Outcomes
After completing this module, students should understand:
- How object-oriented programming differs from other styles.
- The difference between an object and a class.
- How to define a class, and the role of the “self” parameter.
- The difference between attributes and methods.
Readings
- The Python Tutorial (2001-2019). Part 9: Classes.
- Severance, Python for Everybody, Chapter 14: Object-Oriented Programming