Session F4C
0-7803-8552-7/04/$20.00 © 2004 IEEE October 20 – 23, 2004, Savannah, GA
34
th
ASEE/IEEE Frontiers in Education Conference
F4C-7
A Simulation Tool To Help Learning Of Object
Oriented Programming Basics
Micaela Esteves
1
and António José Mendes
2
1
Micaela Esteves, Assistant, Escola Superior de Tecnologia e Gestão de Leiria (ESTG), Portugal, micaela@estg.ipleiria.pt
2
António José Mendes, Professor, Centro de Informática e Sistemas da Universidade de Coimbra, toze@dei.uc.pt
Abstract - In this paper we present the OOP-Anim learning
environment. It was developed to help our students to learn
the basic concepts of object oriented programming and to
develop their programming capabilities using this
paradigm. To achieve those goals students must practice
intensively the development and debugging of programs.
We believe this environment can help, since it uses
animation to facilitate program understanding and error
detection / correction. This debugging process has a lot of
educational potential, as students can learn when
correcting their own mistakes. When they reach a working
solution, their experience and confidence normally
improves, facilitating further learning. In the paper we
describe the environment main features, some possible uses
and the educational advantages associated with that
utilization.
Index Terms – Active learning, Animation, Object Oriented
Programming learning, Simulation.
INTRODUCTION
The option for object oriented languages in introductory
programming courses is now common. Our own courses have
migrated from C to Java in the last few years. However, the
difficulties felt by many students in learning how to program
correctly haven’t changed significantly. Many students
continue to find difficult to understand the conceptual issues
involved in programming and algorithmic design. Object-
oriented programming (OOP) concepts like classes, objects,
references and messages are no exception and often many
students fail to understand them and, especially, to use them to
solve problems.
These are some of the reasons that can explain the level of
student failure common in introductory programming courses,
such as [1]:
• Programs have a dynamic nature, but most learning
materials have a static format (e.g. text books) which
makes difficult to understand (and explain) program’s
dynamic behavior.
• The abstract nature of programming makes many students
fail to visualize how programming structures work and
how problems can be solved using them.
• Programming learning needs a very practical approach
when compared with many other courses the students are
used, more dependent on theoretical knowledge and
memorization.
• The large number of students that courses often have
makes difficult for teachers to give individualized support
to their students.
• Many times students with very different programming
skills level coexist in the same course.
• Programming languages syntaxes are complex, especially
for non English speaking students, and do not include
visual representations for a better understanding.
Animation based simulation has been proposed as a way
to reduce student’s difficulties. It can make concrete and visual
program’s dynamics and support practical work at the student
own learning rhythm. It can be argued that animated views can
help students in three central learning activities: Understand
programs; Evaluate existing programs; Develop new programs
[2]. This last activity is the most important and also the most
difficult. Many students can understand programs previously
developed by the teacher or other students, but they fail when
they have to develop a program themselves to solve some
problem, even if it is similar to the one they understood.
In order to help our students, we developed OOP-Anim, an
environment that can simulate and animate the execution of
simple Java programs. It can support the three above
mentioned learning activities. Students can use it to better
understand and evaluate example programs given by the
teacher and, most important, they can simulate and correct
their own programs. We believe learning is more effective
when students assume a more active role. We encourage them
to try to solve problems we suggest, alone or in group work,
and, if their solution doesn’t work as expected, to enter the
Java code in the environment. There they can simulate their
solution and see the corresponding animation. This allows
them to compare how they thought the program would work
with how the program really works. Ideally this process should
lead to error detection, correction and, hence, learning. In our
opinion, these activities are very important in programming
learning because normally students reach a higher competence
and confidence level after being able to correct all errors and
have the program running correctly. This is extremely
important, since after a first wrong attempt many students give
up solving the problem and try to find a teacher or a colleague
that shows them a solution. Even if they understand that