Activity 01
Design Challenge: Build a Zoo Class Hierarchy
Groups design a class hierarchy for a zoo management system. They identify parent classes, child classes, inherited attributes and methods, and any behaviors that need to be overridden. Groups draw their hierarchy on paper or a whiteboard, then present it to the class and field questions about their design decisions.
Explain how inheritance allows new classes to acquire properties and behaviors from existing ones.
Facilitation TipDuring the Design Challenge, circulate and ask each group, 'Does this change in the parent class break anything in the child? How could you prevent that?'
What to look forPresent students with a scenario, for example, designing classes for different types of musical instruments. Ask them to identify one potential parent class and two child classes, listing one inherited property and one unique behavior for each child.