Projects

In June '09 and June '10 I ran a workshop, Computer Science Meets Cell Phone, at Phillips Exeter Academy's annual Math, Science and Techology Conference. During these workshops we have created several projects. For attendees who want to pick up the source code for the projects (and all other interested parties), the source code for those projects is available here.

Currency Converter

This project creates a simple, first program. It demonstrates:

  • the Java ME Form class (one Form for specifying a conversion rate, and another into which the user enters the amount to be converted).
  • the use of the Java ME RecordStore for persistence (storing information —the conversion rate —between runs of the program
  • separation of domain and interface using the Observer design pattern. Note: the Observable class and the Observer interface are both included in Java SE, but absent in Java ME. Therefore, I wrote (and include) identical implementations of Observable and Observer
  • taking basic functionality found in Java ME classes (i.e. RecordStore) and building new classes with higher-level, reusable functionalality (i.e. the Preferences class)

Here are the source files for the project:

ConvertMIDlet.java
ConvertGui.java
Converter.java
Convertio.java
Convertprefs.java
Preferences.java

(You may click on the file names to download them to your computer)


Two-Player Tic-Tac-Toe

This project goes far beyond the Currency Converter. It creates a two-player, two-phone, two-player, Tic-Tac-Toe game. It uses Bluetooth to allow two phones to communicate their players' moves. It demonstrates:

  • use of the Java ME framework I have developed
  • Java ME TiledLayer class
  • Packet-based, Bluetooth networking
  • Touch screen phone control using icons

Here are the source files for the project:

Tictactoe.java
TictacGui.java
APacket.java
AppCommands.java
Board.java
Boardisplayer.java
Commandmark.java
Packetmark.java
Tictaciconset.java

(You may click on the file names to download them to your computer)