Teaching Java with BlueJ: a Two-Year Experience Xinogalos Stelios
Satratzemi Maya
Dagdilelis Vassilios
Dept. of Applied Informatics Dept. of Applied Informatics Dept. of Educational and Social Policy, University of Macedonia University of Macedonia University of Macedonia 156 Egnatia Str., Thessaloniki, Greece 156 Egnatia Str., Thessaloniki, Greece 156 Egnatia Str., Thessaloniki, Greece +30-2310-950613 +30-2310-891897 +30-2310-891336
[email protected]
[email protected]
[email protected]
start by making small changes to existing code, but s/he should write projects from scratch too; (iv) Devote more time to flexible size object collections, such as ArrayList; (v) Prepare special exercises/activities about concepts that have proven to be difficult for students, in order to help them think consciously about them and not just write code. Our efforts for the next year will focus on the last so-called tip.
Categories and Subject Descriptors K.3.2 [Computers and Education]: Computer and Information Science Education.
General Term: Algorithms. Keywords: Object-oriented programming (OOP), Java. In this paper we present our two-year experience on teaching Java with BlueJ on the context of a compulsory course at a Department of Technology Management. The course was taught for the first time in 2005-06 and was heavily based on the features of the programming environment BlueJ and on books/papers related to BlueJ [1]. In the context of the course 11 two-hour lectures and 11 two-hour labs were given.
Table 1. Manipulating ArrayList collections. 1st Course 2nd Course Completely Correct 0% 14% No answer 48% 42% Direct access of fields outside their class 24% 8% Return of an ArrayList object statement 12% Adding an object to an ArrayList 6% 19% Cannot manipulate an ArrayList 47%
The 2nd time of teaching the course in 2006-07 some changes were made in order to face difficulties that were attributed to the underlying teaching approach and might not be characterized as intrinsic to OOP. The most important changes were: (i) the features of BlueJ were used more carefully, while the main method was taught much earlier in the course (4th lesson), so as to avoid specific difficulties related to object instantiation and the dynamic aspects of OOP; (ii) students started by making small changes to existing code, but soon enough they started creating small projects from scratch in order to apply the principles of good class design and Java presented to them and develop problem solving skills; (iii) two lessons were devoted to ArrayLists and arrays.
Table 2. Defining the main method 1st Course 2nd Course Completely Correct 0% 3% No answer 55% 48% The type of object variables is missing 13% Missing arguments in method calls 53% 33% Calling a method without an instance 7% 12% Missing ( ) in methods without arguments 27% 6% Using the name of the field that is going to be updated as an argument in set methods 6% Calling a method returning an (ArrayList) object as a void method 33% 6% Completely confused 13%
The evaluation of the 2nd course gave better results. We found out that: (i) some difficulties that were attributed to the way that BlueJ and the textbook/guidelines were used were not recorded in the 2nd course; (ii) difficulties regarding manipulating ArrayList objects were significantly eliminated (Table 1); (iii) difficulties usually appearing in the main method were not so intensive (Table 2). The percentages regarding the correct answers and the errors are calculated based on the number of students that answered corresponding questions on the exams and not their total number.
Acknowledgements.
“Pythagoras II – Funding of research groups in the University of Macedonia”, Priority Action 2.2.3e, Action 2.2.3, Measure 2.2, to be implemented within the framework of the Operational Programme “Education and Initial Vocational Training II” (EPEAEK) and co-financed by the European Union [3rd Community Support Framework, 75% financed by the European Social Fund, 25% national resources]
Based on our two-year experience on teaching OOP with BlueJ we would definitely propose it for introducing students to OOP. However, we would strongly recommend that teachers should take into account the following tips: (i) Use the features of BlueJ carefully and try to associate things accomplished by hand in BlueJ with the corresponding code; (ii) Don’t start with main, but do not suspend it for too long in the course; (iii) A student should
REFERENCES [1] Barnes, D. & Kölling, M., Objects First with Java: A practical introduction using BlueJ, Prentice Hall, 2004.
Copyright is held by the author/owner(s). ITiCSE’07, June 23–27, 2007, Dundee, Scotland, United Kingdom. ACM 978-1-59593-610-3/07/0006.
345