Solutions To Teaching Object-Oriented Programming

SITI HAFIZAH AB HAMID

Department of Software Engineering

University of Malaya

50630 Kuala Lumpur

MALAYSIA

Abstract: - Object-oriented programming is very important in today’s computer science education curriculum. Object-orientation as a software development paradigm has existed for some time; its beginnings can be traced to as long ago as the introduction of SIMULA in 1967. Thus, to ensure the success of the programming, the instructors has to play their role in their teaching methods and let the students master the principles of object-orientation first and programming second. This paper is presented problems that have been faced by instructors of object-oriented programming for quite a long time and suggested solutions to those problems. The case study takes place on Faculty of Computer Science and Information Technology in University of Malaya. Five problems and six solutions have been reported in this paper as the input and the output of the study.

Key-Words: - Object-Oriented Programming, Pedagogy

1Introduction

Teaching object-oriented programming has clearly become an important part of computer science education. Over the years, object-oriented languages are becoming increasingly widely used in software projects. Their importance for state-the-art software development is now generally accepted, and they have achieved popularity with academics and practitioners alike [19]. A lot of papers has been discussed and proposed ways on implementing object-oriented course in curriculum. In the last ten years, some educators did not agree with the idea of putting the subject as introductory course. However, there are some practitioners and educators proposed ways to make it possible. One main failure is that the students had learned the object-oriented programming but do not know how to apply and program in object-oriented style. This paper is proposing some methods that could be done and should be thought and considered to make the teaching worthwhile. Besides, it reviews problems that still exist in teaching object-oriented programming.

2Current Situation

The objectives of object-oriented programming in WXES2404 and WXES1111 ((Principles of) Object-Oriented Programming) in Faculty of Computer Science and Information Technology in University of Malaya are designing and implementing object-oriented programming. The subjects use Microsoft Visual C++ as a language. The subjects cover the procedural programming using C++, introduction to class, operator overloading, inheritance, polymophism, and virtual function. This syllabus includes message passing, dynamic binding, constructor and destructor. Students have to attend lecture, tutorial and lab session. The course starts by learning the theory first and coding later. The theory covers the basic concept of object-oriented. Currently, the students use more than one textbook to understand the course [10-12].

3Problems

Without considering the student’s laziness, there are still a lot of problems in teaching and learning object-oriented programming. The problems have been raised since it has been introduced in curriculum.

3.1Textbooks

Bellin [5] says that it is possibly because widespread use of the object-oriented paradigm in computer science education is yet to become a reality, some professors report great difficulty in finding appropriate textbooks. Most of the textbooks have both procedural and object-oriented programming [10-13,15]. Therefore, first learner can study the syntax of procedural programming before proceed to object-oriented. And, the emphasis of the textbooks is on the syntax not on the concept. Some weak students claim that they just memorize the syntax when they cannot understand the concept. This is not a good scenario since it is not the purpose of learning object-oriented programming. Farrell and Schildt [11,12] use step-by-step method in delivering the content and most of the novice students like this way. However, it is not enough for intermediate level students because they give fewer examples. Stroustrup’s textbook [16] is definitely for advanced programmer who already had a strong background of procedural programming. While Schildt [17] has a good textbook that providing a lot of examples, however the compiler is specifically Borland C++. The different is not big (syntax), but sometimes it gives inconvenient to student to understand. If the students want to learn in detail about syntax with good examples, they can refer to Deitel’s textbook. However, the examples are slightly complicated to understand especially for beginners.

3.2Teaching Tools

In 1987, IntelliCorp Inc. has introduced a good tool in teaching object-oriented programming called KEE system. The emphasis of overall system is the concept of object-orientation. The KEE system offers the user a frame based object structure. This means that hierarchies of objects with descriptive or behavioral attributes are the central part of any system that users design. The objects can be manipulated through a highly interactive window-oriented interface. Users can work with class object and member objects [8].

Jeroo [1] is another tool that has a basic set of features and syntax that provides an easy transition to Java and C++. However, it has its own syntax that student has to consider in using it as a tool of learning. Even though it says the syntax is very close to Java and C++, it is still an extra burden to student. Same things go to Blue [19], a language for teaching object-oriented programming. Blue is a good language to use, if the course emphasis on the idea and concept of object-orientation without considering the language. The Blue language is purely object-oriented where it does not support the development of non-class-based code. It follows four principles, which are no conceptual redundancy, clean concepts, readability and software engineering support [19].

3.3Language Used

There are a lot of arguments of which language is the best language to taught in object-oriented. Many disagree with SmallTalk since most of United States’ schools use this language. However, in Malaysia, all of the colleges or universities that offering object-oriented programming use C++. And still a lot of problems arise. According to Susan S. Brilliant [6], one of the problems is C++ does not enforce the paradigm shift from procedural to object-oriented. Hybrid languages rather than pure object language ease the transition of procedural to object and vice versa. And, it is easy to say than implementing. However, people do not really think about the difficulty in C++ since it has high market value in South East Asia region. Industry requires C++ in many fields even though Java gradually is taking the market. In fact, by understanding C++, students have less difficulty to understand Java. Decker [7] uses Object Pascal in teaching object-oriented programming because the students already learned Pascal in procedural programming. There were fewer overheads to the instructors as well by using the language. Decker mentioned that he sees the course as teaching the principles of object-oriented programming, and not particular language.

3.4Understand Function and Pointer

Most of the students complain they have no problem in understanding control and loop, data types and input/output. However, they have problem in functions, array and pointer. Even though the instructors try to relate array and pointer with memory allocation by drawing it and by using the debugging tool provided by Microsoft Visual C++ (F11 and F10, for example), the students still cannot get the idea. While for function, the students mostly have problem in passing parameter. A reason of ”object-oriented programming is too hard for my CS1 students” [7] is totally true especially if the students has less understanding of function and pointer in procedural programming.

3.5Concept

Since the title is programming, most instructors concentrate of the syntax rather than concept. However, it is difficult to understand the syntax without understand the concept. The limitation of lecturing time and the influent of the textbooks makes the important part become second priority. At the end of the course, the student only can write the program but does not know to apply it in real situation. Then, the student only can be a good programmer but not a good system analyst.

4Solutions

Six solutions has been introduced and proposed to solve the above problems (and may be other problems as well).

4.1No procedural, straight to object-oriented

It is not saying that we do not need procedural programming. It is important because it is very basic of programming. But, it is suggested to split the teaching into two subjects; procedural and object-oriented programming by using same language. Instructors cannot put high expectation to student by giving different language for different concept of programming because this need extra time to student to understand. When instructors give one semester (about 14 weeks) to learn procedural programming and another semester to learn object-oriented programming, student can concentrate more and extra exercises can been given to improve their skills. However, what actually happens now is some instructors spend too much time in teaching procedural part in object-oriented programming course. It is just wasting of time.

The understanding of procedural programming is very important since most of the student who has problem in object-oriented actually has weak background in it. Dan Budny [3] proposed a very different way in teaching procedural programming. He taught Excel, Unix, HTML, and MatLab at the beginning of C language course. This method is a success in University of Pittsburgh (Engineering 0012) in ensuring the student to have a good understanding in C programming by relating some specific functions in those tools with C especially function and pointer.

4.2Group Project

Giving individual assignment and group project is very common in programming course. So that, student can explores the language and deepen the skill better. The group project should start from very beginning of understand the concept of object and class. The project should acquire student to identify the objects and classes in the real life situation or system. It does not need to student to find the answer in object-oriented way, but by using conventional thinking [2]. The most fundamental principles of object-orientation is the most critical part for student to get the whole concept of object later.

4.3Need Multimedia Courseware

Simulation has proved to be a very useful tool and is a preferred approach but always students do not see the ‘big picture’ [4]. Even though there are a lot of object-oriented programming tool available with extra features to make the student really understand the programming, a simple multimedia courseware is still a better tool for understanding most basic part of the object and especially for weak students (less understanding in procedural programming). The courseware should show the way memory works once apply object-oriented programming in every single line of codes. Besides, showing the real world object to understand the concept is highly recommended. Although, the idea of using multimedia courseware sounds simple, but the idea of implementing simulation with multimedia elements will be really effective.

4.4Integrating Object-Oriented into Other Subjects

This solution is optional solution because it has to revise the entire curriculum to suit the methodology. However, to ensure the success of object-orientation, the implementation of object-oriented cannot be applied to programming only but also to the whole structure of computer science; for example. By doing that, student will have a better understanding and will have a great skill in implementing object. However, the solution is disagreed by some people in computer science especially when it involved with ‘hardcore programming’ field like artificial intelligent and system computer. They said the emphasis on those fields is on the application of algorithm but not on the methodology of the system. Even though, object-orientation brings maintainability in the future, no matter what type of system that has been applied, but some people never bother. School of Computer Science in Carleton University [9] has experience in integrating object into other courses for example compiler construction and advanced courses. The feedback from the students is very positive. The school exposed to the student not only the basic of object-oriented programming but also using interface and libraries in developing a system. The students feel excited in the benefits of reusable and sharable features that object-oriented provided.

4.5Methodology First Language Second

Haibin Zhu and MengChu Zhou [2] have proposed a very good idea in teaching object-oriented programming. They proposed to instructors to teach the methodology first and language later with six steps in doing so. It is very true that 90% of Computer Science or Information Technologies or any computer literate studies teaching programming at the very beginning of the course. It gives a same problem in every semester in every institution; lack of time in teaching programming course. The instructors have to explained the concept in very fast mode before proceed to programming part. That is why most of the students just ignore the concept and concentrate on the syntax since the examination mostly about the programming rather than the concept.

4.6Problem Based Learning

Problem-Based Learning (PBL) has been introduced in University of Malaya in December 2000 to medical student in clinical course. According to Ellis, in PBL environment, students work in groups on real-life problems and have the opportunity to determine for themselves what they need to learn in the relevant subject area(s). While Boud and Felitti (referenced by Ellis), PBL is a way of constructing and teaching courses using problems as the stimulus and focus for student activity. It is not simply the addition of problem solving activities to otherwise discipline centered curricula, but a way of conceiving of the curriculum, which is centered on key problems in professional practice. By this definition, instructors can apply the method in understanding the concept of object-oriented programming by giving real situation problem. However, this method cannot be applied to the whole content of the course. This is because students still need fully-guidance in introduction of programming language and they are still freshmen. Difficulty in study leads to lack of interest in the future.

5Conclusion

There are many problems has been counter since the object-oriented ahs been introduced. There are many efforts has been done to solve the problem but same old problems still remain. The problems should be reduced as the technology goes rapidly. People need good programmer to maintain and enhanced the current technology. Good programmer comes from good guidance.

References:

[1]Sanders, D and Dorn, B, Jeroo: A Tool for Introducing Object-Oriented Programming, ACM Proceedings of SIGSE’03, Nevada, USA, 2003.

[2]Zhu, H and Zhou, M. Methodology First and Language Second, ACM Proceedings of OOPSLA’03, California, USA, 2003.

[3]Budny, D, Luna, L, Vipperman, J and Patzer, J, FourSteps To Teaching C Programming, IEEE Proceedings of 32nd Frontiers in Education Conference, Boston, USA, 2002.

[4]Maj, S.P, Veal, D and Charlesworth, P, Is Computer Technology Taught Upside Down?, ACM Proceedings of ITICSE 2000, Helsinki, Finland, 2000.

[5]Bellin, D, A Seminar Course in Object Oriented Programming, SIGCSE Bulletin, 1992, pp. 134-137.

[6]Brilliant, S and Wiseman, T, The First Programming Paradigm and Language Dilemma, ACM Proceedings of SIGCSE’96, Philadelphia, USA, 1996, pp. 338-342.

[7]Decker, R and Hirshfield, S, The Top 10 Reasons Why Object-Oriented Programming Can’t be Taught in CS1, ACM Proceedings of SIGCSE’94, Arizona, USA, 1994, pp. 51-55.

[8]Renate, M and Kempf, S, Teaching Object-Oriented Programming With the KEE System, ACM Proceedings of OOPSLA’87, 1987, pp. 11-25.

[9]Pugh, J, Lalonde, W and Thomas, D, Introducing Object-Oriented Programming into The Computer Science Curriculum, ACM 0-89791-217-9/87/0002/0098, 1987, pp. 98-102.

[10]Deitel, H and Deitel, P, C++ How To Program Fourth Edition, Prentice Hall, USA, 2003.

[11]Farrell, J, Object Oriented Programming Using C++, Course Technology, Canada, 2001.

[12]Schildt,, H, C++ A Beginner’s Guide, McGraw Hill Osborne, USA, 2002.

[13]Cohoon and Davidson, C++ Program Design Third Edition, McGraw Hill, USA, 2002.

[14]Irvine, K.R, C++ and Object-Oriented Programming, Prentice Hall, USA, 1997.

[15]Sellapan, P, Visual C++, Federal Publication, Malaysia, 2001.

[16]Stroustrup, B, C++ Programming Language, Addison Wesley, USA, 1999.

[17]Schildt, H, Borland C++, McGraw Hill Osborne, USA, 1997.

[18]Ellis, A, Resources, Tools, and Techniques for Problem Based Learning in Computing, Proceedings of ITICSE’98, 1998, pp. 41-57.

[19]Kolling, M and Rosernberg, J, Blue – A Language For Teaching Object-Oriented Programming, ACM Proceedings of SIGCSE’96, Philadelphia, USA, 1996, pp. 190 – 195.