Skip to content

Instantly share code, notes, and snippets.

@CompSciRocks
Created November 28, 2018 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CompSciRocks/1fb35c326130063677ccb510cdb6e396 to your computer and use it in GitHub Desktop.
Save CompSciRocks/1fb35c326130063677ccb510cdb6e396 to your computer and use it in GitHub Desktop.
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