Browse Source

Steuer 7% Berechner

remotes/origin/develop
fdai7460 2 years ago
parent
commit
57ca08e1fb
  1. 7
      src/main/java/src/TasksFrame.java
  2. 11
      src/test/java/src/TasksFrameTest.java

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

@ -247,6 +247,13 @@ public class TasksFrame extends JFrame {
return steuer; return steuer;
} }
public double steuer7(double x)
{
double steuer=0;
steuer = (x * 0.07) / 1.07;
return steuer;
}
private void setupUmrechnen() { private void setupUmrechnen() {
JPanel jPanel = setupPanel("Dezimal nach Binär"); JPanel jPanel = setupPanel("Dezimal nach Binär");

11
src/test/java/src/TasksFrameTest.java

@ -49,6 +49,17 @@ class TasksFrameTest {
assertEquals(0,x3,0.01); assertEquals(0,x3,0.01);
} }
@Test
void setupSteuer7(){
TasksFrame tasksFrame = new TasksFrame();
double x = tasksFrame.steuer7(1190);
assertEquals(77.85,x, 0.01);
double x2 = tasksFrame.steuer7(14);
assertEquals(0.92,x2,0.01);
double x3 = tasksFrame.steuer7(0);
assertEquals(0,x3,0.01);
}
@Test @Test
void setupDiff(){ void setupDiff(){
TasksFrame frame = new TasksFrame(); TasksFrame frame = new TasksFrame();

Loading…
Cancel
Save