Week 2: Object Oriented Programming
Outcomes
You should be able to:
- Write or identify a definition for
- Functions
- Methods
- Class
- Object
- Encapsulation
- Abstraction
- Inheritance
- Polymorphism
- Constructor
- __init__
- Override(s)
- Magic Methods
- Subclass
- Superclass
- Read class-based pseudocode and explain/identify the goal of the code [Continued from last week]
- Read existing Python code and connect it to corresponding pseudocode [Continued from last week]
Activities
- Schafer's Videos - Getting Started with Object Oriented Programming
- If you care, here are the PowerPoint Slides from the videos
- Motivating Object Oriented Programming [Video, 6 minutes]
- The Concepts and Vocabulary of Objects [Video, 20 minutes]
- There is a lot of detail in here.
- Focus on the big picture and the general meaning behind the four pillars.
- Come to an understanding on the vocabulary of the four pillars.
- But don't worry about being a detailed expert.
- Looking at code for the a Python class, version 1
- Modifying the CreditCard to explain the idea behind magic methods
- The Fraction Class (different code from what will be in your textbook. Same basic idea)
- Textbook Reading
- Section 1.13.1
- This is long and detailed
- But it covers most everything you need to know about objects
- Section 1.13.2
- This starts to get a bit more confusing.
- The semi-important aspect of this is the concept of inheritance and not the actual implementation of the inheritance in the Logic Gates example.
- Pay attention to the discussions about inheritance more than any code itself.
- Cross reference this with the discussion about inheritance from my videos above.
- Checking your understanding of OOP vocabulary
- You Do It (YDI) Activity #2
Additional Resources
- If you think you are starting to get it but you want to hear it ONE MORE TIME from a different source, consider the following resources I really like:
- You may have noticed this on the table of contents page for your textbook. Professor Gerry Jenkins is a retired professor from Long Beach City College who made a bunch of videos to correspond with the readings in your textbook. I have NOT viewed all of them. But, I know how helpful it can be to have a wide variety of study resources.
- Videos 15 - 20 on this playlist correspond to material we covered this week. (To be more accurate, 15-17 align with our course. Videos 18-20 go into deeper detail on things mostly beyond the scope of this course.
- If you find this information about programming languages interesting you might grab your book from FCCS and read pp 306-316 to read about the evolution and different types of of computer programming languages
- For this course we are most interested in the material on OOP on pp 315-316
- Having said that, the material on 306-314 is stuff that you might read in the big picture of things.