The example application includes the following classes:
A state machine class, that manages the various screens and transitions between them.
SplashScreen
A class that displays an image in the center of the screen, so the MIDlet can do initialization while this splash screen is displayed.
MenuList
The menu list is the screen shown after the splash screen, when the game is over, or when the game is paused.
InstructionsScreen
The instructions screen displays instruction text to the user.
HighScoreScreen
The high-score screen is used to display the current high score (the best time so far).
SheepdogCanvas
The sheepdog canvas is the main game screen.
Field
This class draws the grassy field and water.
Sheepdog
This class draws the sheepdog.
Sheep
This class draws the sheep and creates the artificial intelligence (AI) behavior for the animals.
GameOverScreen
This screen is displayed when the player gets the fifth sheep into the fold.
SoundEffects
This class uses the MIDP 2.0 Media API to play four sound effects.