Learning to create well-designed and robust Java programs requires, besides a good understanding of the language, a significant amount of practice.
JavaFests are a collaborative learning technique for teaching Java to beginning programmers. A JavaFest is a group exercise that instructors can add to their repertoire of teaching techniques. It provides an opportunity for students to practice programming in a motivating but non-threatening environment, and to learn from the experience of their peers. Moreover, a JavaFest allows the instructor to gain insight into the current standing of the students in her class.
Below we present three example JavaFests. They are particularly well suited for courses based on Barnes & Kölling's Objects First with Java textbook using the BlueJ educational development environment. The first two JavaFests are inspired by examples in that book, and all the JavaFests fit well within the second quarter of a course following the textbook. However, they do not depend on BlueJ or that book, and they can easily be adopted in other Java programming courses based on different textbooks.
The first in our sequence of JavaFests focuses on relatively straightforward data processing tasks. Students receive a sequence of data items and need to compute aggregate statistics. In order to excite students about this rather mundane task, we did not pick some arbitrary data, but we picked the current week's log of the HTTP server of our department. This motivated students to unearth information about themselves, their peers, and about their teaching assistants and professors.
The Web Analytics JavaFest uses the following scaffolding.
Feel free to download these scaffolding classes in a ZIP file containing the Java source files, oranized as a BlueJ project.
In a Turing test a human judge conducts a natural language conversations with a partner. The partner can be either a human or a machine. The judge does not see his partner. Both, the human partner and the machine try to appear human. If the judge cannot distinguish between the human and the machine, the machine passes the test, as it appears indistinguishable from a human, and thus is deemed intelligent.
The motivational goal of this JavaFest is to build a machine (a Java program) that passes the Turing test. It certainly won't be possible to build such an intelligent system in a few hours for a beginning programmer. However, constraining the conversation between the judge and the partner to a specific topic, and limiting it to a small number of questions and answers, makes the judge's task quite challenging.
We use a distributed Java RMI application to enable the competition phase of the Turing Test JavaFest. It consists of a client, used by the judge to ask questions (and projected on the classroom beamer), and a server that gathers the responses from the teaching assistant and from the software responder. The following two screenshots show the GUI of the client and server applications:
You can download our Turing Test RMI application to use it in your own classroom.
The main goal of this JavaFest is to learn to write good unit tests. The teams first need to implement a non-trivial Java class, and then they have to develop unit tests to test their class. To motivate students to write good tests, the JavaFest includes a competition where each team's tests are run against other teams' implementations. The team uncovering the largest number of bugs in the other teams' code wins the competition.
The scaffolding of the Break it! JavaFest is available in the form of the source code of the Bit class.