A Constructivist Approach to Teaching Object-Oriented
Programming
Computer science education is greatly affected the object-oriented
paradigm. This can be seen in the numerous new teachers being attracted
to programming languages, such as Java. Learning the object-oriented paradigm
is however difficult for most novice students, mostly because it
requires a new way of thinking about computing and more depth to grasp.
Thus, to promote the object-oriented paradigm at the introductory level,
a re-examination of the teaching method is needed. This article describes
a new teaching approach for rethinking object-oriented programming
within the constructivist epistemology.
1. INTRODUCTION
This article describes a new teaching approach to programming
motivated by principles found in the constructivist epistemology. The need
for developing a new teaching method arose when we realized that the predominant
model of instruction in computer science education - the objectivist
model of learning - was inadequate for most students to learn
object-oriented concepts, because it does not engage the mind appropriately
to successfully tackle the challenges of the object-oriented approach.
Learning the object-oriented paradigm is indeed difficult for most
novice students, mostly because it is more abstract than the procedural
approach. Moreover it requires new ways of thinking and more depth to grasp,
particularly with regard to the analysis and design activities prior to
program coding, and when the problems to be solved were different from
those whose solution was explained previously. The constructivist view
is more appropriate to deal with the pedagogical problems encountered in
switching from the procedural approach to programming to the object-oriented
paradigm, since it takes into account students' prior knowledge in programming
and students' prior experiences in problem solving [4,5]. Moreover, constructivism
offers a potentially powerful way to rethink the pedagogical practice at
the introductory level by stressing the need for the learner to play an
active role in constructing object-oriented knowledge. Constructivism
has been successfully implemented in mathematics and science education
[8,9]. It can be adopted to our field with slight modifications.
The remainder of this article is organized as follows.
In section 2 we give an overview of the objectivist and the constructivist
models of learning. In section 3 we reconceptualize object-oriented
knowledge within the constructivist epistemology. In section 4 we outline
a constructivist approach for learning object-oriented programming at the
introductory level. Finally, some remarks on further work conclude the
article.
2. PARADIGMS OF LEARNING
2.1 The Objectivist Model of Learning
Basically, computer science education relies on the objectivist
model of learning which views learning as the passive transmission
of knowledge from the teacher to the learner. This model does not suggest
that students' prior knowledge, e.g. procedural programming, can affect
current learning, e.g. object-oriented concepts, since its metaphor
of mind is that of a blank page, a tabula rasa, waiting to be filled
with knowledge [9]. Clearly, the objectivist model of learning does
not engage the mind appropriately to go beyond inappropriate prior knowledge.
The result is, even after one year of instruction, a lack of conceptual
understanding, bad programming habits and serious misconceptions about
object-oriented program development. Programming is understood as an art
rather than a discipline with principles which guide the development of
readable, modular, extensible, and reusable objects [7]. This situation
is, to some extent, the result of passive learning: listening to lectures,
reading textbooks, and doing programming work without engaging the
mind appropriately to successfully tackle the object-oriented paradigm
[5,7].
2.2 The Constructivist Model of Learning
In stark contrast to the objectivist view, the constructivist
perspective regards learning less as the product of passive transmission
than a process of active construction. Learning is an active process
in which learners construct new knowledge based upon their prior knowledge.
Consequently, a constructivist approach to learning needs to probe prior
knowledge and evaluate whether it conflicts with the knowledge being taught.
Similarly, a constructivist methodology needs to evaluate how the procedural
model of programming conflicts with the object-oriented approach. If it
does, new ways must be found of reconstructing the object-oriented concepts;
otherwise there is no guarantee that the object-oriented approach will
be adopted. The constructivist perspective clearly diverges from the objectivist
model of learning which presumes that knowledge can be put directly
into the learner's head. Interested readers should consult [1,3,5,6,7,8,9]
for more details. There are basic principles for designing a constructivist
learning strategy for object-oriented programming.
-
Object-oriented concepts must be actively constructed
by learners, not passively transmitted by teachers.
-
The role of object-oriented concepts must be emphasised
in problem solving.
-
Students' prior knowledge must be evaluated to find
out wether it conflicts with the object-oriented approach.
-
In order to be useful for problem solving, problem situations
must be related to object-oriented concepts and to the object-oriented
language being used, which must themselves be strongly related to each
other.
-
The process of constructing interrelated object-oriented
knowledge requires problem-solving skills.
-
Traditional modes of learning such as lectures should
be replaced by a set of activities where the students are actively
engaged in the concepts being constructed.
-
To get students actively involved in problem solving, the
activities must focus around a set of realistic, intrinsically motivating
problems.
3. A CONSTRUCTIVIST VIEW OF OBJECT-ORIENTED KNOWLEDGE
3.1 Object-Oriented Knowledge Types
From a constructivist point of view, there are three strongly
interrelated knowledge types which are relevant for the object-oriented
approach:
-
Object-oriented concepts, that is abstraction, encapsulation,
inheritance, polymorphism, and dynamic binding. These concepts may be
used to understand problem situations, to design object-oriented models,
and to choose appropriate means of implementation. Students must also learn
to use object-oriented components within the WWW, by incorporating objects
in a form that is reusable, concurrent, interactive, and distributed [2].
-
Then, we need an object-oriented language for implementing
object-oriented concepts. Today, Java is the most popular
object-oriented language. It includes powerful means of implementation,
such as Java Development Kit (JDK), the WWW, visual application builder
tools, as well as existing reusable components - JavaBeans - which can
be adapted and extended to fit the requirements of new problems.
-
Finally, we need a variety of problem situations from which
we derive problem-specific knowledge - that is the relevant features
and the requirements of the problem that can be expressed in terms of
object-oriented concepts.
Traditional teaching of object-oriented programming does
not focus on building strong links between these knowledge types. However,
from a constructivist point of view, these knowledge types need to be closely
related to each other to be useful for problem solving. This means that
problem situations must be closely linked to object-oriented concepts and
to the object-oriented language constructs, which must themselves be closely
linked to each other [3].
3.2 Skills for Constructing Object-Oriented Knowledge
The constructivist view asserts the construction of
interrelated knowledge necessitates problem-solving skills. This
is consistent with research and the practical experiences of expert software
designers. Insights from software engineers indicate that designers focus
on the overall structure of the software system, that is on the general
functions of the parts and how they interrelate with each other to form
the whole. Moreover, the analysis of the problem domain and the design
of a conceptual model are more central to the development of software than
the code. This means that building interrelated object-oriented knowledge
requires thinking at a higher level than the code level, see [11]. Given
this background, we can distinguish the following categories of problem-solving
skills:
-
Analysis skills, such as understanding, describing,
refining, and representing problem situations using object-oriented concepts.
-
Design skills, such as modeling, integrating, reusing,
and combining object-oriented components.
-
Analogical thinking skills, such as recognizing similarities
and differences between problem situations using object-oriented concepts.
-
Reflexive, critical thinking skills, such as evaluating,
explaining, and justifying the solution process.
Novice students use knowledge in different ways from
experienced software designers. In contrast to experts, beginning students
are usually not aware of the importance of problem-solving skills. They
focus on programming issues rather than on the conceptual aspects [11].
In addition, students have a great deal of difficulty in solving new problems,
because they cannot use object-oriented concepts to identify similarities
between problems they have already solved and the new problem they are
currently trying to solve [4,7].
4. A CONSTRUCTIVIST APPROACH TO OBJECT-ORIENTED PROGRAMMING
The goal of a constructivist approach to object-oriented
programming is to help each student (a) to explore their prior knowledge
about computing, (b) to refine their understanding of object-oriented concepts,
(c) to use object-oriented concepts to analyse problem situations (d) to
develop problem solving skills, (e) to solve new problems, and (e) to put
together object-oriented knowledge into an integrated unity.
4.1 Characteristics of Activities
To be successful, a teaching method motivated by constructivism
needs to be organized around a set of activities where students are actively
engaged in the knowledge being learned. Each activity includes four integrated
parts:
-
Firstly, the activity must rely on a realistic, intrinsically
interesting problem situation that motivates the students to construct
object-oriented knowledge, including specific questions that probe students'
understanding.
-
Secondly, the activity must refer to prior knowledge
needed to do the activity, e.g. concepts, tools, and language constructs
students should be familiar with. Likewise, substantial attention
should be devoted to students' misconceptions and programming
practices that directly conflict with the object-oriented approach.
-
Then, the activity must tell students the new object-oriented
knowledge that will be raised and addressed during the activity, e.g.
the concept of inheritance.
-
The final step consists of reflecting on the solution
process. This task is of primary importance for the learning process,
since it helps the teacher to discover what and how the students have learned.
4.2 Examples of Activities
In this section we give an outline of some activities
involving analysis, design, implementation, and evaluation processes.
-
Design object-oriented models using existing solutions.
This activity is based on the idea that the solutions of past problems
can be used to specify the requirements of a new problem. To be able to
reuse existing solutions, students need analogical thinking skills to identify
conceptually similar problems they have previously analysed. The solutions
might be adapted, modified and extended to meet the problem requirements.
Finally, the activity consists of designing an object-oriented model
on the basis of the information available.
-
Explore the class library for reusable code.
This activity will allow the exploration of class libraries using object-oriented
concepts. It is of primary importance for the implementation process. Java
and similar languages provide sufficient flexibility to achieve this activity.
Basically, objects in class libraries can be reused, and extended with
slight modifications through inheritance. With reuse, students learn to
incorporate existing software components - for example JavaBeans - , standard
classes, and objects into the solutions of new problems. Existing code
might be adapted and extended to fit new problems. To be efficient, reusable
code should be stored so that it may be retrieved at any time.
-
Study experts' design solutions. Students can
learn most effectively from following design practices of expert software
designers. Good examples of software design should include a study approach
with experts' solutions and a summary of experts' thinking process. Students
can then model their solutions on experts' thought processes using higher-order
thinking skills. Likewise, substantial attention should be devoted to well-designed
code, since it is extremely important for students to be able to read,
modify, and extend good examples of well-structured, object-oriented code
[11].
-
Organize object-oriented knowledge in terms of similarities
and differences. This activity will help students to structure
object-oriented knowledge by continually making connections between previously
taught knowledge and new knowledge. For instance, to build connections
between simple and distributed objects, we must look backward to what we
have previously learned about simple objects. This is followed by
looking forward in terms of developing distributed objects. This method
allows us to organize knowledge in terms of similarities and differences.
Object-oriented concepts, models, or programs are compared («How
are they alike?»), contrasted (« How are they different?»),
and then reorganized to form conceptually similar or different knowledge
structures.
-
Develop alternative solutions. To increase the number
of connections between object-oriented concepts and a variety of
problem situations, it is important to use the concepts in different contexts.
One way to do this is to develop multiple valid solutions for the same
problem, for example solutions based on simple, distributed, and concurrent
objects. By solving problems in more than one way, students learn to use
object-oriented knowledge in different ways which enhances the links between
solutions, problems, and concepts.
-
Reflect on the solution process. Most students do
not have the skills needed to reflect on what they are doing. Usually,
they focus on the product rather than on the solution process. They conceive
a solution is just a program that works for them, rather than a program
that is readable for others, modular, and extensible [8]. This activity
helps students to reflect their solutions by relating object-oriented
concepts to the problem situation they have studied. Therefore, students
should be asked questions that probe for understanding of the concepts
underlying the problems' solutions. This task will allow them to discover
their own misconceptions about programming and to correct them. It is clearly
evident that without reflection, students will be unwilling to abandon
their design and programming practices based on misconceptions, see [7].
5. CONCLUSION
In this article, we have presented a new teaching approach
to programming motivated by principles found in the constructivist epistemology.
We have come to this approach as we realized that the predominant model
of instruction - the objectivist model of learning - was inadequate to
successfully tackle the pedagogical problems encountered in switching from
the procedural approach to the object-oriented paradigm. Although
we have only been able to outline the new approach in broader terms, we
are convinced that constructivism offers - by defining learning as an active
process of construction - a potentially powerful way to rethink the pedagogical
practice in computer science. We are now in the process of implementing
the new approach by introducing constructivist ideas step by step. Developing
a complete teaching strategy requires a long-term effort in several directions:
we need to improve our understanding of students' prior knowledge, refine
the program of activities, explore higher-order cognitive skills, develop
better assessment and evaluation procedures, as well as material and teaching
aids to support constructivist learning in computer science.
REFERENCES
[1] Ben-Ari, M. Constructivism in Computer Science.
Proceedings of the 29th SIGCSE Technical Symposium on Computer Science
Education, March 1998, 257-261.
[2] Berg, D.J., and Fritzinger, J.S. Advanced Techniques
for Java Developers, John Wiley & Sons, New York 1998.
[3] Floyd, C., et al. (eds.). Software Development
and Reality Construction, Springer-Verlag, 1992, 86-100.
[4] Hadjerrouit, S. Teaching Java as First Programming
Language: A Critical Evaluation. SIGCSE Bulletin, Volume 30, Number
2, June 1998, 43-47.
[5] Hadjerrouit. S. A Constructivist Approach for
Integrating the Java Paradigm into the Undergraduate Curriculum. Proceedings
of the 3th Annual Conference on ITiCSE, August 1998, 105-107.
[6] Kafai, Y., and Resnick, M. (eds.). Constructionism
in Practice: Designing, Thinking, and Learning in a Digital World,
Lawrence Erlbaum Associates, New Jersey, 1996.
[7] Mereno-Seco, F., and Forcada, M.L. Learning Compiler
Design as Research Activity. Computer Science Education 7, 73-98, 1996.
[8] Phye, G..D. (ed.). Handbook of Academic Learning:
Construction of Knowledge, Academic Press, London 1997.
[9] Steffe, L.P., and Gale, J. (eds.). Constructivism
in Education, Lawrence Erlbaum Associates, New Jersey 1995.
[10] Sims-Knight, J.E., and Upchurch, R.L. Teaching
Object-Oriented Design Without Programming: A Progress Report. Computer
Science Education 4, 135-156, 1993.
[11] Tewari, R., and Friedman, F. L. A Framework for
Incorporating Object-Oriented Software Engineering in the Undergraduate
Curriculum. Computer Science Education 4, 45-62, 1993.
[13] Spivey, N. N. The Constructivist
Metaphor: Reading, Writing, and the Making of Meaning, Academic Press,
London 1997.
[7] Hadjerrouit, S. Educational Impacts
of the New Paradigm of Informatics.Proceedings of the Norwegian Annual
Conference on Computer Science, Tapir 1998, pp. 185-194.
[3] Brauer, W. The New Paradigm of Informatics
in: Mauer (ed.). New Results and New Trends in Computer Science, Springer-Verlag,
1991, 15-24.
The result is, even after one year of instruction,
a lack of conceptual understanding of the object-oriented paradigm and
serious misconceptions about object-oriented program development. Programming
is understood as an art rather than a discipline with principles which
guide the development of readable, modular, extensible, and reusable objects
[8]
,Object-orientation provides
not simply a new way of programming, but a new way of thinking about computing
Object-oriented concepts,
that is abstraction, encapsulation, inheritance, polymorphism and dynamic
binding. These concepts may be used to understand problem situations,
to design object-oriented models, and to choose appropriate means of implementation.
Producing students with a good understanding of the classical object-oriented
programming is however not enough, since languages, such as Java, aspire
to becoming a standard for the use of object-oriented components within
the WWW, by incorporating objects in a form that is reusable, concurrent,
interactive, and distributed [2].
To be useful for problem solving, these types of knowledge
need to be closely related to each other. This means that object-oriented
concepts, object-oriented language constructs, and object-oriented problem
requirements must be integrated to interrelated knowledge which
can be retrieved at any time [3].
knowlegde must be related
to each other: object-oriented concepts must be linked to used to understand
problem situations in terms of objects and to choose adequate means of
implementation.
Formal reasoning skills,
such as inductive and deductive reasoning, including modeling object-oriented
systems.
The goal of a constructivist
approach to object-oriented programming is to help each student to build
useful, interrelated knowledge that can be used for efficient
problem solving. When knowledge is structured, the conceptual understanding
of problems is enhanced, design and implementation ability improves, because
object-oriented concepts may be used to understand problem situations,
to design conceptual models, and to choose appropriate means of implementation.
To be successful, a pedagogical approach motivated by constructivism needs
to be organized around a set of activities where students are actively
engaged in the knowledge being learned.
Analogical thinking skills,
such as comparing and contrasting, as well as recognizing similarities
and differences between problem situations using object-oriented
concepts
This situation is, to some
extent, the result of the objectivist model of learning: performing
programming tasks without engaging the mind appropriately in understanding
the object-oriented paradigm
Keywords
Constructivism, Java, object-oriented programming
including some suggestions
as to how it can be constructed using higher-order thinking skills. This
is the main activity.
The goal of a constructivist
approach to object-oriented programming is to help each student to construct
interrelated knowledge that can be used for efficient problem solving.
When knowledge is structured, the conceptual understanding of problems
is enhanced, design and implementation ability improves, because object-oriented
concepts may be used to understand problem situations, to design conceptual
models, and to choose appropriate means of implementation. To be successful,
a pedagogical approach motivated by constructivism needs to be organized
around a set of activities where students are actively engaged in the knowledge
being learned.
The goal of the activities
is to motivate the students to construct interrelated, object-oriented
knowledge in the course of problem solving
These activities are
important for improving the ability to construct interrelated object-oriented
knowledge.