Activity 01
Collaborative Design: Model the School
Student groups design a class hierarchy for a school management system with students, teachers, staff, and administrators. Each group must identify at least two levels of inheritance, define a shared interface, and justify every inheritance decision using the 'is-a' relationship test. Groups present their UML diagrams and critique each other's design choices, with the teacher guiding discussion toward composition alternatives where inheritance was overused.
Compare the trade-offs between composition and inheritance in software design.
Facilitation TipDuring Collaborative Design: Model the School, circulate and ask each group to explain why they placed a method in the parent class versus a child class, forcing justification of design choices.
What to look forPresent students with two scenarios: one where inheritance is clearly appropriate (e.g., different types of vehicles inheriting from a 'Vehicle' class) and one where composition is better (e.g., a 'Car' class having an 'Engine' object). Ask students to write 1-2 sentences explaining why each design choice is suitable for its respective scenario.