@ -146,7 +146,7 @@ public class TasksFrame extends JFrame {
});
}
private double kreisUmfang(double radius) {
public double kreisUmfang(double radius) {
double result = 2 * Math.PI * radius;
double roundOff = Math.round(result * 100.0) / 100.0;
@ -238,6 +238,17 @@ class TasksFrameTest {
double c = tasksFrame.average(0, 12, 38);
assertEquals(16.67, c);
@Test
void test_kreisUmfang(){
TasksFrame tasksFrame = new TasksFrame();
double a = tasksFrame.kreisUmfang(10);
assertEquals(62.83, a);
double b = tasksFrame.kreisUmfang(28);
assertEquals(175.93, b);
double c = tasksFrame.kreisUmfang(0);
assertEquals(0, c);