@ -79,6 +79,12 @@ public class TasksFrame extends JFrame {
}
public int calcMod(int n, int x)
{
int rest = n % x;
return rest;
private void setupEulerschePhiFunk() {
JPanel jPanel = setupPanel("Eulersche Phi Funktion");
@ -91,6 +91,18 @@ class TasksFrameTest {
@Test
void setupMod()
TasksFrame tasksFrame = new TasksFrame();
int p1= tasksFrame.calcMod(5,3);
assertEquals(2,p1);
int p2 = tasksFrame.calcMod(4,2);
assertEquals(0,p2);
int p3= tasksFrame.calcMod(10,3);
assertEquals(1,p3);