From d09f0c42fa59cc84a19699672ca3a3c02925f25f Mon Sep 17 00:00:00 2001 From: fdai7460 Date: Mon, 6 Feb 2023 10:15:12 +0100 Subject: [PATCH] Fakultaet rechner mit Test --- src/main/java/src/TasksFrame.java | 17 ++++++++++++++++- src/test/java/src/TasksFrameTest.java | 14 +++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/main/java/src/TasksFrame.java b/src/main/java/src/TasksFrame.java index 400f4e8..1ad32df 100644 --- a/src/main/java/src/TasksFrame.java +++ b/src/main/java/src/TasksFrame.java @@ -100,6 +100,8 @@ public class TasksFrame extends JFrame { } + + private void setupExponent() { JPanel jPanel = setupPanel("Potenzrechner"); @@ -732,6 +734,8 @@ public class TasksFrame extends JFrame { } + + public int calcArea(int a, int b) { int area = a * b; @@ -745,7 +749,6 @@ public class TasksFrame extends JFrame { } - public void setupSumFromTo(){ JPanel jPanel = setupPanel("Sum from to"); @@ -797,6 +800,18 @@ public class TasksFrame extends JFrame { return sum+to; } + public int Fakultaet(int a){ + int sum = 0; + int faku=1; + while ( sum