I thought I’d share another extra activity that my students are working on. This comes after U2L3 and the goal is to get them to represent a wolf family tree by creating a wolf class with multiple constructors. They then go to the main method and call their constructors to create the tree.
- Mild - parent wolves are of type String
- Medium - parent wolves are of type Wolf
- Spicy - Add a getter for a wolf name and a method to print the wolf and their parents to the console
- Extra Spicy - Add methods to display the full ancestry of a wolf from that child.
(We’re in Minnesota, but this could likely be translated to any endangered species that is local to you.)
Project inspired by Cornell’s old Rhinos project.
@madeline_r_burton - Thank you so much for sharing. This looks like an engaging activity. My class just started Lesson 4, but I may use this for a review this week.
I am sure others will also appreciate you sharing your hard work.
I think you could easily put it after lesson 4 and practice using the this keyword too - we just hadn’t gotten there yet! FYI, the biggest confusion was whether they did it ‘right’. This was cleared up by writing a void function to print all attributes of the class like the one written for Mountain in the code.org levels (example: printMountainInfo()). (depending on how they implemented the parents, this got a little trickier so some printed more info than others).
Now I’m trying to figure out how I might extend it for the next two days so that I can have a running practice homework scenario. The this keyword is easy, but I didn’t really design the problem for inheritance. Why might researchers want to represent a subclass of Wolf? I might tweak this a little next year and see if I can pull it forward throughout the unit…
@madeline_r_burton Thank you for sharing another wonderful resource! I love that you are bringing in relevant content to your students about the place they are from.