Write a program that teaches arithmetic to a young child. The program tests addition and subtraction. In level 1 it tests only addition of numbers less than 10 whose sum is less than 10. In level 2 it tests addition of arbitrary one-digit numbers. In level 3 it tests subtraction of one-digit numbers with a nonnegative difference. Generate random problems and get the player input. The player gets up to two tries per problem. Advance from one level to the next when the player has achieved a score of five points.

Complete the following files:

MathGame.java

Player.java

Use the following file:

MathGameRunner.java

/**
   This program runs the math game.
*/
public class MathGameRunner
{  
   public static void main(String[] args)
   {  
      MathGame game = new MathGame();
      game.play();
   }
}