diff --git a/src/main/java/src/TasksFrame.java b/src/main/java/src/TasksFrame.java index 533e966..b272465 100644 --- a/src/main/java/src/TasksFrame.java +++ b/src/main/java/src/TasksFrame.java @@ -995,6 +995,13 @@ public class TasksFrame extends JFrame { return x; } + public int bin3(int a, int b) + { + int x = 0; + x = a*a - b*b; + return x; + } + private void setupBinF() { diff --git a/src/test/java/src/TasksFrameTest.java b/src/test/java/src/TasksFrameTest.java index 27503d7..c99c3db 100644 --- a/src/test/java/src/TasksFrameTest.java +++ b/src/test/java/src/TasksFrameTest.java @@ -26,6 +26,16 @@ class TasksFrameTest { 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 void setupPI() {