Objects-First vs. Structures-First Approaches to Oo Programming Education: An Empirical Study

Article excerpt

ABSTRACT

Software development is a cornerstone of information technology and computer programming is a key element of software development. Teaching computer programming to undergraduates can be challenging. Adding to the challenge is the near universality of the object-oriented paradigm in computer programming courses. A key question facing programming instructors is whether to take an objects-first approach or a structures-first approach in the classroom. Conventional wisdom seems to favor an objects-first approach, but no hard empirical evidence exists on this question. This study performs a field experiment by having two nearly equivalent sections of introductory Java programming test these two fundamental approaches to OO programming education. The results clearly indicate that students who take an objects-first approach to OO programming outperform those who take a structures-first approach.

INTRODUCTION

The teaching of introductory programming is a foundation in many computer information systems (CIS) and computer science (CSC) curricula. In recent years, virtually all introductory programming courses have shifted from the procedural approach to the object-oriented (00) approach. Most beginning programming courses appear to be teaching Java , C++, or one of the Visual Studio .NET languages (Visual Basic, C#, or J#) as evidenced by the popularity of various computer programming texts. All of these programming languages are 00, as contrasted with the purely procedural languages of Fortran, Pascal, COBOL, and C.

The basis of any type of computer programming involves the three programming 'structures': sequence (do A, do B, do C, ...), selection (if... else decisions), and repetition (while or for loops). The basics of 00 programming involve creating classes that serve as templates for instantiating objects in computer memory. Objects have attributes (instance fields) and behaviors (methods) and usually represent things in the real world (such as students, products, or airline reservations). While learning the basics of structured programming (sequence, selection, and repetition) is not always easy for most beginning students of CIS and CSC, it is the general consensus that learning OO programming concepts and techniques may be even more challenging for most students (Sheetz, et al., 1997).

Therefore, one of the most relevant questions regarding how OO programming courses should be taught is whether it is better to teach structured programming concepts first, followed by OO programming concepts, or vice versa. It appears that most authors claim it is better to teach objects first ('early objects') in order to ingrain the student with OO concepts and techniques early and often, thus ensuring greater success in later OO programming (Thramboulidis, 2003; Ragonis & Ben- Ari, 2005). Although the Objects first' (OF) approach may sound more plausible than a 'structures first' (SF) approach, there appears to be no empirical evidence to support the claim. The purpose of this study is to perform a field experiment to test the claim that OF is superior to SF.

RESEARCH METHOD

The research question driving this study is: What effect does teaching an objects-first approach (vis-à-vis teaching a structures-first approach) have on the performance of introductory programming students in understanding OO concepts and writing OO programs? The hypothesis being tested is that there is no difference in the performance of introductory programming students when provided with an objects-first or a structures-first approach to OO programming.

To test this hypothesis, the authors of this study each taught one section of introductory OO programming (CIS 260) to a section of about 25 students during the Fall 2007 semester at Missouri State University (MSU). These instructors had already been scheduled to teach these sections, so it was not possible for the same instructor to teach both sections due to scheduling conflicts. …