MathCS.org Java MathCS.org - Java

Breakout

This is a simple game illustrating Object-Oriented programming, creating simple graphics and using sounds, and working withg threads. The game consists of the following classes:

  • Game.java: The main class
  • Controller.java: class to handle key events
  • Status.java: class to update the status line
  • Arena.java: class to contain the drawing area. This is where most of the action takes place. Includes the thread to run in the background.
  • Brick.java: Class to represent a single "Brick" and how it is drawn.
  • ping.wav: A 'ping' for hitting a wall
  • pong.wav: A 'pong' for hitting the paddle or a brickk
  • music.wav: background music

Put all classes into one folder, compile, and run the 'Game'

When everything works, answer the following questions: