You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by jdonwells May 5, 2022
The problem I saw with Unit 7 is the way it starts. We show them how to create empty classes and then populate the instances with attributes individually outside of the class. If you have spent any time in this discussion group you can imagine that doesn't work for me.
7.04 is not changed. They learn about inheritance.
7.05 is a new lesson. In this lesson I put everything they have learned together with super() and double dispatch. They are then given a lab to create add methods for two classes. Basically the Kangaroo lab from 7.03 but using double dispatch. They have items and backpacks. You can add an item to a backpack or a backpack to an item. However, you may not add two items or two backpacks together. That will print an error. https://docs.google.com/presentation/d/1fLtSQPkeQyVOJTsL5sAyODp6V6nlFfR7Nh-sFrFnBeA/edit?usp=sharing
The text was updated successfully, but these errors were encountered:
Discussed in #390
Originally posted by jdonwells May 5, 2022
The problem I saw with Unit 7 is the way it starts. We show them how to create empty classes and then populate the instances with attributes individually outside of the class. If you have spent any time in this discussion group you can imagine that doesn't work for me.
7.01 So for the first lesson I went over class creation, attributes, and methods. The lab was changed to just ask them to create a class and a method that sets the attributes. Essentially an init method but not init yet. https://docs.google.com/presentation/d/1v-03EpGBxwvYl3tUei4xTI2iQWWns9wZye3NKDP4htc/edit?usp=sharing
7.02 is not changed. They learn about a better way to initialize with the init method.
7.03 Mostly unchanged. The lab is changed to just ask them to create a str method. https://docs.google.com/presentation/d/1wnYQXib_DGD5hIXH15D7w9Lyq8LRm9-KHa9iMsqq52c/edit?usp=sharing
Notice that we are using a piece of our Zork game that was moved to Unit 6 as the basis for the lab.
7.04 is not changed. They learn about inheritance.
7.05 is a new lesson. In this lesson I put everything they have learned together with super() and double dispatch. They are then given a lab to create add methods for two classes. Basically the Kangaroo lab from 7.03 but using double dispatch. They have items and backpacks. You can add an item to a backpack or a backpack to an item. However, you may not add two items or two backpacks together. That will print an error. https://docs.google.com/presentation/d/1fLtSQPkeQyVOJTsL5sAyODp6V6nlFfR7Nh-sFrFnBeA/edit?usp=sharing
The text was updated successfully, but these errors were encountered: