Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class MultPractice implements StudyPractice {
private int numOne;
private int numTwo;
public MultPractice(int a, int b) {
numOne = a;
numTwo = b;
}
public String getProblem() {
return numOne + " TIMES " + numTwo;
}
public void nextProblem() {
numTwo++;
}
}
public interface StudyPractice {
/** Returns the current practice problem */
String getProblem();
/** Changes to the next practice problem */
void nextProblem();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment