modified MathmaticalProblems class

partition a Java class into three parts: Mathmaticalproblems.java,
ProblemsInterface.java, TestMain.java