From concrete to abstract: about teaching UML class diagrams to novice programmers - Barros, João Paulo (2013)
Object-oriented programming is frequently taught in the first programming course. The implicit level of indirection, expressed in the name-value duality of objects, demands an additional level of abstraction ability. This brings an additional complication for novice students, which are also fighting with flow control and composition. Graphical languages can help visualise the program structure but only if they are not seen as an additional burden. UML class diagrams are the most widely used structure diagram for object-oriented code, but they are very complex for novices. This paper presents a set of translation rules from code to a UML class diagrams that can be introduced in the first or second programming course. To that end, it discusses how to meaningfully explain the semantics of class and object relations, namely by presenting a minimal subset of the UML class diagram metamodel that supports simple and direct translations from object-oriented code. As most students learn better from concrete to abstract, this minimal subset and the respective code translation provide an intermediate step towards the use of a more complete metamodel in more advanced courses.