Browse Source

3-te Binomische Formel Funktion + Test

remotes/origin/develop
fdai7460 2 years ago
parent
commit
a70ed77d06
  1. 7
      src/main/java/src/TasksFrame.java
  2. 10
      src/test/java/src/TasksFrameTest.java

7
src/main/java/src/TasksFrame.java

@ -995,6 +995,13 @@ public class TasksFrame extends JFrame {
return x; return x;
} }
public int bin3(int a, int b)
{
int x = 0;
x = a*a - b*b;
return x;
}
private void setupBinF() private void setupBinF()
{ {

10
src/test/java/src/TasksFrameTest.java

@ -26,6 +26,16 @@ class TasksFrameTest {
assertEquals(16,x2); assertEquals(16,x2);
} }
@Test
void bin3()
{
TasksFrame tasksFrame = new TasksFrame();
int x = tasksFrame.bin3(5,4);
assertEquals(9, x);
int x2 = tasksFrame.bin3(7,3);
assertEquals(40,x2);
}
@Test @Test
void setupPI() { void setupPI() {

Loading…
Cancel
Save