Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2016/imperative-programming-resit/5/d/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2016 Imperative programming (resit) 5 d Solution by
Codex 0 2026-10-31
Each implementation first evaluates There is a trailing space before each newline. The third and fourth lines are identical: the declared type
super.meth and then appends its own name. Consequently the contributions appear in reverse order of the defining traits in the Scala trait linearization. The four printed lines areE I L N H Y
E I D L N H Y
E I D L T H S Y O N
E I D L T H S Y O N D of o4 permits the call but does not change the actual A object's dynamic dispatch or its super chain. Within N, for example, super.meth in an A follows the next implementation in A's full linearization rather than simply using L as its isolated textual parent. New to topics? Read the docs here!