Objects first with Java and BlueJ (seminar session)
Authors: Kölling Michael , Rosenberg John 
Published: July 2004

Object-oriented languages have been taught for some time at universities. The most common approach has been to teach those constructs required for imperative programming first and to introduce the notion of classes and objects somewhat later in the course. More recently, many educators have been promoting the notion of teaching about classes and objects first. This helps students to adopt the object-oriented paradigm at an early stage and encourages them to focus on the application structure before beginning coding. Most new textbooks have followed such an approach.
While this method has clear advantages, it is not easy to realise in practice. This is partly a result of the languages used for teaching. However, we would argue that the major difficulty comes from the lack of program development environments and tools which themselves fully embrace the object-oriented paradigm.
The use of Java as the language for teaching addresses some of the problems. Java with its clean support for the object-oriented paradigm is now widely regarded as a suitable choice for introductory teaching. The choice of environment, however, remains an issue.

The view of the development environment as a major difficulty in Java courses is further supported by numerous reports of educators relating their experiences with teaching introductory Java courses. While Java was consistently described as an excellent language for teaching the object-oriented paradigm, the environments available are regularly identified as a significant source of problems. These may be divided into two areas:

The environments are designed for professional programmers. They are too complex and have a steep learning curve. Thus valuable teaching time is spent teaching the students how to use the environment and this detracts from the principles of programming.

Most of the existing environments fail to fully adopt the object-oriented paradigm. Users of the environment must deal with files, lines of code and directory hierarchies rather than classes, objects and relationships.

In this seminar we will argue the case that the requirements for teaching the object-oriented paradigm and Java can only be satisfied by the provision of a program development environment specifically designed for teaching.
We will introduce BlueJ, a relatively new development environment which addresses all of these issues. We will show how the unique features of this environment can be used to create an introductory Java course that fully embraces the “object first” approach and supports the presentation of a cleaner picture of the paradigm than previously possible.
BlueJ is based heavily on earlier work by us on a language and environment called Blue. BlueJ is a complete Java development environment, written entirely in Java. It provides graphical support for object-oriented design, abstracts over files and the operating system and provides fully integrated support for a design, edit, compile and test cycle. In addition, BlueJ supports interactive creation of objects and interactive calling of methods of objects. This provides support for incremental development, one of the major advantages of object-orientation. It includes an easy-to-use debugger and support for applications and applets.
One of the main differences between BlueJ and other environments is its distinct focus on a teaching context. It combines powerful tools with an easy-to-use interface, avoiding the complexity that creates so many problems when using existing environments in a classroom.
BlueJ has been used very successfully for two semesters as Monash University.
The presentation will provide the context in which the BlueJ project has been developed. We will discuss the design principles for BlueJ, the major aims of the project and our experiences with using it in class. A demonstration of the current version of BlueJ will be given. We will also demonstrate a set of examples and problems which can be used in a first Java course and show how the course structure can be improved and support teaching “objects first” with the availability of an environment that fully supports the paradigm.
BlueJ is available free of charge and can be used by any interested institution. Details of how to obtain a copy of BlueJ will be provided at the seminar.