You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
497 B
Java
21 lines
497 B
Java
package com.company.kopffitness;
|
|
|
|
import java.util.concurrent.ThreadLocalRandom;
|
|
|
|
public class MultiplicationQuiz {
|
|
|
|
private int aufgabeZahl1 = 0;
|
|
private int aufgabeZahl2 = 0;
|
|
|
|
public String getExercise(){
|
|
aufgabeZahl1 = ThreadLocalRandom.current().nextInt(1, 21);
|
|
aufgabeZahl2 = ThreadLocalRandom.current().nextInt(1, 21);
|
|
|
|
return aufgabeZahl1+" * "+aufgabeZahl2+" = ?";
|
|
}
|
|
|
|
public int getResult(){
|
|
return aufgabeZahl1 * aufgabeZahl2;
|
|
}
|
|
}
|