Question 1
A school system has classes Teacher and Department. Each department is managed by exactly one teacher, and each teacher can manage zero or one departments. Draw a UML class diagram showing the Teacher class (with attributes: Name:STRING, StaffID:STRING and method GetName():STRING) and the relationship between Teacher and Department with multiplicity labels. [4]
1
Teacher class box with three sections: class name, attributes (- Name : STRING, - StaffID : STRING), methods (+ GetName() : STRING).
1
Department class box shown (can be empty or with at least class name).
1
Association line (solid) connecting Teacher and Department.
1
Correct multiplicity: Teacher side: 0..1 (a department has zero or one teacher managing it); Department side: 1 (each teacher manages exactly one department) — OR the reverse depending on how the relationship direction is interpreted. Mark awarded for correct 1:1 or 0..1 labels with justification.