This is the Simpletron example from Deitel Java text book