Professional Documents
Culture Documents
A Comparison of Two Object-Oriented Programming Environments For Novices
A Comparison of Two Object-Oriented Programming Environments For Novices
KEY WORDS
Object-oriented programming, educational software, 2. Teaching OOP with BlueJ
educational programming environments, microworlds.
2.1 The Main Features of BlueJ
1. Introduction
Students can use the interactive interface of BlueJ (Figure
The introduction to programming one or two decades ago 1) for creating objects and invoking their methods.
was usually realized with procedural programming Students can also inspect the state of the objects that they
languages, and mainly Pascal. However, the last decade have created. This feature gives students the chance to
teachers begun to teach, some times in combination with watch the state of instance variables. Furthermore, this
procedural/imperative programming, OOP too. The first feature gives teachers the chance to delay the presentation
years of teaching OOP the most important research issue of other interface technologies and support a pure objects-
was whether the imperative or the object-oriented first approach.
programming paradigm should be used for introducing The editor supports limited coloring of source code
students to programming [1]. Nowadays, the OOP (syntax highlighting), display of line numbers and
paradigm is usually used for the introduction to brackets matching. The source code of each class is
programming and teachers/researchers have focused on presented in a separate window. In the case of syntax
devising more effective – if not effective – teaching errors, they are presented in the bottom of the window
approaches, since the teaching of OOP has proven to be and there is no interaction between the error message and
quite problematic [2]. The teaching approaches that have the corresponding line of the source code. BlueJ also
been proposed are several, but they have not been provides a visual debugger that allows the insertion of
thoroughly evaluated. The most important teaching breakpoints and step-by-step execution.
approaches that have been proposed are the following:
Lesson 3: Object interaction.
Lesson 4: Grouping objects in flexible size collections
(ArrayList), fixed size collections (array).
Lesson 5: Using class libraries.
Lesson 6: Testing and Debugging.
Lesson 7: Designing classes.
Lesson 8: Improving structure with inheritance.
Lesson 9: Polymorphism, overriding.
Lesson 10: Abstract classes and interfaces.
Lesson 11: Static methods: the main method.
Each laboratory session, started with a brief summary of
the concepts presented at the corresponding theory
session. Next, students solved in cooperation with the
instructor an assignment, which aimed at using the taught
Figure 1. The project manager window of BlueJ. concepts. A video projector was used for presenting and
discussing the various solutions suggested by students
and also their syntax, logical and semantic errors. Finally,
students carried out various assignments based on the
2.2 Using BlueJ in the Classroom
projects presented at the book. In the context of these
assignments students had to modify/extend the given
BlueJ and the series of lessons suggested by Kölling and
projects by adding fields, constructors and methods to
Barnes at their book "Objects First with Java: A practical
existing classes, and at some cases defining new classes.
introduction using BlueJ" [6] were used for teaching the
Students developed projects from scratch only at the last
compulsory one-semester course “Object-oriented Design
lessons.
and Programming” at the department of Technology
Management at the University of Macedonia. The aim of
the course is for the students to comprehend and be able 3. Teaching OOP with objectkarel
to use basic concepts of OOP. The course is taught in the
3rd semester, while students are taught the main concepts 3.1 The Main Features of objectKarel
of programming in the 2nd semester with C as a
programming language. In the final exams of the 2nd objectKarel ([4], [5]) is based on Karel++ [7] and uses a
semester course a high failure rate was recorded for the programming language closely related to C++ and Java.
specific group of students. The course of the 3rd semester objectKarel incorporates a series of lessons and activities
consisted of a weekly two-hour theory session and a for familiarizing students with OOP concepts before they
weekly two-hour laboratory session. are asked to implement them [8]. Students use a structure
In each theory session the instructor presented the editor for developing programs, so as to avoid focusing
corresponding concepts with the use of slides. on the syntax details of the programming language. The
Occasionally, the BlueJ environment was used for structure editor has the form of a menu that is
creating objects, invoking their methods and automatically updated when changes are made to classes,
presenting/discussing their result with students. All the and dialog boxes. The errors that can arise are very few
concepts were presented in the context of the projects that and they are presented at the bottom of the main window,
accompany the book of Kölling and Barnes. Some of while there is the ability of interaction between error
these projects consist of a large number (for students) of messages and the corresponding lines of source code.
classes, but not all of them were presented/studied. Students can run a program, trace through it with a speed
Specifically, for some of the classes only their role and/or defined by them or execute it step by step. Also,
part of their interface was presented to students and not objectKarel incorporates the technology of explanatory
their implementation. Copies of the projects’ source code visualization, which is the presentation of explanatory
or excerpts of the source code (commented by the messages in natural language about the semantics of the
instructor), UML class diagrams and object diagrams current statement.
were given to students in order to assist them in The actors of the microworld are robots that live in a
understanding the presented concepts and keeping notes world consisting of horizontal streets and vertical
for parts of the source code they faced difficulties with. avenues, wall sections and beepers, which are small
Eleven theory lessons and eleven laboratory lessons were plastic cones that emit a “beep” noise (see Figure 2). The
given. Approximately 45 students attended the lessons, class Primitive_Robot is the base class provided and
but 34 answered the final questionnaire. The content of contains:
each lesson can be summarized as follows: the fields street (street number), avenue
Lesson 1: Objects and classes, parameters. (avenue number), direction (the direction a
Lesson 2: Understanding class definitions.
robot is facing) and numOfBeepers (number of of the e-lessons that are incorporated in the programming
beepers in the robot’s bag), environment in order to teach the corresponding concepts.
the methods move (moves the robot to the next Next, students used the activities that are incorporated in
corner if front is clear), turnLeft (the robot turns the programming environment, and in some cases existing
left 90ο), putBeeper (the robot takes a beeper programs, so as to assimilate the concepts and become
from its bag and leaves it to its corner) and familiar with the features of the programming
pickBeeper (the robot takes a beeper from its environment. Finally, the students in groups of two
corner and places it to its bag). developed one or two programs without help from the
teacher. Students were not assigned any homework.
BlueJ group
The third question was not answered by 41% of the BlueJ 5. CONCLUSIONS
group. The rest 26% of the students answered correctly,
12% answered correctly but did not give an example, and
9% answered correctly but gave as an example either the In this paper, we tried to examine the differences that
call of internal and external calls or an incorrect piece of were observed in the comprehension of basic OOP
code that was copied from question 5. Finally, 3% gave a concepts by the students that participated in two teachings
wrong answer. based on the widespread programming environment BlueJ
[3] and the programming microworld objectKarel
Conclusions respectively. The study was based on the analysis
The misconception that “work in methods is exclusively (quantitative and qualitative) of students’ answers in the
done by assignment (and not by message passing)” [9] same (adjusted where it was necessary) questionnaire that
was not confirmed for the objectKarel group. This result was given to both groups, after the end of the lessons. The
was expected, since with the specific programming research group that designed the lessons and the instructor
language and the visual step-by-step execution of that participated in both teachings were the same.
programs, it would be very difficult for students not to
Furthermore, the concepts that we examine were taught at analysis give us the chance to redesign the introductory
the beginning of both series of lessons. courses more synthetically, since the best didactic strategy
The most important finding was that a significant seems to be the gradual use of both environments, so as to
deviation was observed in the answers given by the two make use of the advantages of both environments, a
groups of students. In all cases that such a significant teaching that we plan to carry out the next semester.
difference was observed, the students taught with In conclusion, the comparative study that is referred in the
objectKarel answered in a much more correct way. The title seems to show that the combined use of the two
students that attended the lessons with objectKarel [11] environments might constitute a better didactic strategy
answered with greater frequency (the number of questions from just using one of the two environments.
that was not answered was smaller), gave more correct
answers and provided better justifications. Also, Acknowledgments
significant deviations were observed in comparison with “Pythagoras II – Funding of research groups in the
findings of older studies. University of Macedonia”, Priority Action 2.2.3e, Action
These differences are attributed, mainly, to the way the 2.2.3, Measure 2.2, to be implemented within the
two environments function, and of course the nature of framework of the Operational Programme “Education and
the programming language. objectKarel aims mainly at a Initial Vocational Training II” (EPEAEK) and co-
“basic” understanding of concepts, a comprehension of financed by the European Union [3rd Community Support
how each concept is defined and used, while BlueJ aims Framework, 75% financed by the European Social Fund,
more at an understanding of the object-oriented design of 25% national resources]
a solution to a problem, that is a “functional”
comprehension of the basic OOP tools. So, while the References
students of the objectKarel group programmed various [1] Brilliant, S. & Wiseman, T. R. The First Programming
robots from the first lessons and studied their behavior in Paradigm and Language Dilemma, ACM SIGCSE
relation to the source code, the students of the BlueJ Bulletin, Vol. 28, Issue 1, 1996, 338-342.
group had the chance to study the structure/design of [2] Milne, I., & Rowe, G., Difficulties in Learning and
relatively big programs that make clear the advantages of Teaching Programming - Views of Students and Tutors.
ΟΟΡ, but did not program with the frequency that their International Journal of Education and Information
colleagues did with objectKarel. Another important factor Technologies, 7(1), 2002, Kluwer Academic Publishers,
for the differences observed in the answers of the two 55-66.
groups lies in the fact that objectKarel offers a clearer [3] Kölling, M., Quig, B., Patterson, A., and Rosenberg, J.
depiction of the OOP concepts examined, which makes it The BlueJ system and its pedagogy. Journal of Computer
easier for students to comprehend them and be more Science Education, 13(4), 2003, 249-268.
confident about their knowledge. For example, when a [4] Xinogalos, S. Educational Technology: a Didactic
message is sent to an object: (1) in objectKarel students - Microworld for an Introduction to OOP. Ph.D. Thesis,
without having to do anything- see on their screen that its University of Macedonia, Thessaloniki, Greece, 2002.
state changes and furthermore an explanation message is [5] objectKarel, available at:
presented; (2) in BlueJ students –in most cases- have to http://www.csis.pace.edu/~bergin/temp/findkarel.html
use the inspect function and keep track of the changes in [6] Barnes, D., and Kölling, M. Objects First with Java: A
the object’s state that is usually not depicted. practical introduction using BlueJ. 2004, Prentice Hall.
Moreover, an implicit conclusion is that a better design [7] Bergin, J., Stehlik, M., Roberts, J., and Pattis, R.
and analysis of the teachings is acquired. For example, the Karel++ - A Gentle Introduction to the Art of Object-
comprehension of a concept should not be considered as a Oriented Programming. 1997, John Wiley & Sons.
one-way street. The students taught with BlueJ applied in [8] Xinogalos, S., and Satratzemi, M. The Hands-on
a correct way the main principles of ΟΟΡ during the Activities of the Programming Microworld objectKarel,
lessons – consequently someone could assume that they ACM SIGCSE Bulletin, Vol. 37, Number 3, September
have comprehended basic concepts. However, the same 2005, 384.
students appeared to have - at some degree - an inability [9] Holland, S. Griffiths, R., and Woodman, M. Avoiding
to answer correctly and fully the corresponding questions object misconceptions, ACM SIGCSE Bulletin, Vol. 29,
at the end of the lessons. Furthermore, it is not sure that No. 1, 1997, 131-134.
the same students would be able to solve problems that [10] Carter, J., and Fowler, A. Object Oriented Students?
demand the use of these concepts. Consequently, the SIGCSE Bulletin, Vol. 28, No. 3, 1998, 271.
comprehension of a concept by students seems to be [11] Xinogalos, S., Satratzemi, M. and Dagdilelis, V. An
multilevel. introduction to object-oriented programming with a
The differences that were observed in relation to the didactic microworld: objectKarel, Computers &
findings of older studies, suggest that it is possible to Education, Volume 47, Issue 2, September 2006, 148-
overcome the corresponding difficulties with the 171.
appropriate adjustment of teaching. The findings of this