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

Article excerpt

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 (OO) 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 OO, 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 OO 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-a-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. To minimize the differences in course delivery, the following steps were taken:

1. Both instructors have approximately the same amount of experience (several years) teaching computer programming (and OO programming) in the CIS Department at MSU.

2 The instructors selected two different texts written by the same author (Gaddis, 2008a; Gaddis, 2008b). The only significant difference between the two texts is the ordering of the chapters, one presenting objects and classes in the early chapters while the other doing so in the later chapters. These two texts were designed specifically by Gaddis to support either an OF or a SF approach to teaching OO programming using Java. The reading material, examples, and end-of-chapter problems throughout the texts are essentially the same with the exception of the ordering of the chapters. …