A comparison of the comprehension of object-oriented and procedural programs by novice programmers
This paper reports on two experiments comparing mental representations and program comprehension by novices in the object-oriented and procedural styles. The subjects were novice programmers enrolled in a second course in programming which taught either the object-oriented or the procedural paradigm. The first experiment compared the mental representations and comprehension of short programs written in the procedural and object-oriented styles. The second experiment extended the study to a larger program incorporating more advanced language features. For the short programs there was no significant difference between the two groups with respect to the total number of questions answered correctly, but the object-oriented subjects were superior to the procedural subjects at answering questions about program function, This suggests that function information was more readily available in their mental representations of the programs and supports an argument that the object-oriented notation highlights function at the level of the individual class. For the long program a corresponding effect was not found. The comprehension of procedural subjects was superior to object-oriented subjects on all types of question. The difficulties experienced by the object-oriented subjects in answering questions in a larger program suggest that they faced problems in marshaling information and drawing inferences from it. We suggest that this result may be related to a longer learning curve for novices of the object-oriented style, as well as to features of the OO style and the particular OO language notation, (C) 1999 Elsevier Science B.V. All rights reserved.
novice programmers object-oriented programming empirical studies of programming learning to program