#20 Bank account

Open
primeranary wil 1 commits van primeranary/ZCW-Inheritance-AbstractBankAccount:master samenvoegen met master

+ 13
- 0
.idea/libraries/Maven__junit_junit_4_12.xml Bestand weergeven

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: junit:junit:4.12">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml Bestand weergeven

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: org.hamcrest:hamcrest-core:1.3">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 1
- 0
.idea/modules.xml Bestand weergeven

@@ -3,6 +3,7 @@
3 3
   <component name="ProjectModuleManager">
4 4
     <modules>
5 5
       <module fileurl="file://$PROJECT_DIR$/bankaccountlab.iml" filepath="$PROJECT_DIR$/bankaccountlab.iml" />
6
+      <module fileurl="file://$PROJECT_DIR$/bankaccountlab.iml" filepath="$PROJECT_DIR$/bankaccountlab.iml" />
6 7
     </modules>
7 8
   </component>
8 9
 </project>

+ 124
- 0
.idea/uiDesigner.xml Bestand weergeven

@@ -0,0 +1,124 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="Palette2">
4
+    <group name="Swing">
5
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
6
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
7
+      </item>
8
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
9
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
10
+      </item>
11
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
12
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
13
+      </item>
14
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
15
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
16
+      </item>
17
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
18
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
19
+        <initial-values>
20
+          <property name="text" value="Button" />
21
+        </initial-values>
22
+      </item>
23
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
24
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
25
+        <initial-values>
26
+          <property name="text" value="RadioButton" />
27
+        </initial-values>
28
+      </item>
29
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
30
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
31
+        <initial-values>
32
+          <property name="text" value="CheckBox" />
33
+        </initial-values>
34
+      </item>
35
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
36
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
37
+        <initial-values>
38
+          <property name="text" value="Label" />
39
+        </initial-values>
40
+      </item>
41
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
42
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
43
+          <preferred-size width="150" height="-1" />
44
+        </default-constraints>
45
+      </item>
46
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
47
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
48
+          <preferred-size width="150" height="-1" />
49
+        </default-constraints>
50
+      </item>
51
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
52
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
53
+          <preferred-size width="150" height="-1" />
54
+        </default-constraints>
55
+      </item>
56
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
57
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
58
+          <preferred-size width="150" height="50" />
59
+        </default-constraints>
60
+      </item>
61
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
62
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
63
+          <preferred-size width="150" height="50" />
64
+        </default-constraints>
65
+      </item>
66
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
67
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
68
+          <preferred-size width="150" height="50" />
69
+        </default-constraints>
70
+      </item>
71
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
72
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
73
+      </item>
74
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
75
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
76
+          <preferred-size width="150" height="50" />
77
+        </default-constraints>
78
+      </item>
79
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
80
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
81
+          <preferred-size width="150" height="50" />
82
+        </default-constraints>
83
+      </item>
84
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
85
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
86
+          <preferred-size width="150" height="50" />
87
+        </default-constraints>
88
+      </item>
89
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
90
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
91
+          <preferred-size width="200" height="200" />
92
+        </default-constraints>
93
+      </item>
94
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
95
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
96
+          <preferred-size width="200" height="200" />
97
+        </default-constraints>
98
+      </item>
99
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
100
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
101
+      </item>
102
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
103
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
104
+      </item>
105
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
106
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
107
+      </item>
108
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
109
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
110
+      </item>
111
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
112
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
113
+          <preferred-size width="-1" height="20" />
114
+        </default-constraints>
115
+      </item>
116
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
117
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
118
+      </item>
119
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
120
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
121
+      </item>
122
+    </group>
123
+  </component>
124
+</project>

+ 594
- 354
.idea/workspace.xml
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 8
- 0
pom.xml Bestand weergeven

@@ -7,6 +7,14 @@
7 7
     <groupId>com.zipcodewilmington</groupId>
8 8
     <artifactId>bankaccountlab</artifactId>
9 9
     <version>1.0-SNAPSHOT</version>
10
+    <dependencies>
11
+        <dependency>
12
+            <groupId>junit</groupId>
13
+            <artifactId>junit</artifactId>
14
+            <version>RELEASE</version>
15
+            <scope>test</scope>
16
+        </dependency>
17
+    </dependencies>
10 18
 
11 19
 
12 20
 </project>

+ 103
- 0
src/main/java/com/zipcodewilmington/bankaccountlab/ATM.java Bestand weergeven

@@ -0,0 +1,103 @@
1
+package com.zipcodewilmington.bankaccountlab;
2
+
3
+import java.lang.reflect.Array;
4
+import java.util.ArrayList;
5
+import java.util.Scanner;
6
+
7
+public class ATM {
8
+
9
+    private Account selectedAccount;
10
+    private ArrayList<Account> accounts = new ArrayList<Account>();
11
+
12
+    public void add(Account account) {
13
+        accounts.add(account);
14
+    }
15
+
16
+    public double getTotal() {
17
+        double total = 0.0;
18
+        for (Account account : accounts) {
19
+            total += account.getBalance();
20
+        }
21
+        return total;
22
+    }
23
+
24
+
25
+    public Account getSelectedAccount() {
26
+        return selectedAccount;
27
+    }
28
+
29
+    public void setSelectedAccount(Account selectedAccount) {
30
+        this.selectedAccount = selectedAccount;
31
+    }
32
+
33
+    public void display() {
34
+        StringBuilder sb = new StringBuilder();
35
+        int counter = 1;
36
+        for (Account account : accounts) {
37
+            sb.append(String.format("%5d. %10s %.2f \n", counter, account.getClass().getSimpleName(), account.getBalance()));
38
+        }
39
+        System.out.println(sb.toString());
40
+    }
41
+
42
+    public void run(){
43
+        this.add(new CheckingAccount(2000));
44
+        this.add(new SavingsAccount(1500));
45
+        this.add(new BusinessAccount(3000));
46
+
47
+        String input;
48
+
49
+        while(true){
50
+            if(this.selectedAccount == null){
51
+                this.display();
52
+                input = getInput("Please Select a Account: ");
53
+
54
+                if(input.equalsIgnoreCase("Checkings")){
55
+                    this.selectedAccount = this.accounts.get(0);
56
+                } else if(input.equalsIgnoreCase("Savings")){
57
+                    this.selectedAccount = this.accounts.get(1);
58
+                } else if(input.equalsIgnoreCase("Business")){
59
+                    this.selectedAccount = this.accounts.get(2);
60
+                } if(input.equalsIgnoreCase("Exit")){
61
+                    System.out.println("Thank you for using my ATM");
62
+                    break;
63
+                }
64
+            } else {
65
+                System.out.println("You are selected into your " + this.selectedAccount.getClass().getSimpleName() + "\n");
66
+                System.out.println(this.selectedAccount.getBalance());
67
+                input = getInput("Please Enter Withdraw, Deposit or Check Balance");
68
+
69
+                if(input.equalsIgnoreCase("Withdraw")){
70
+
71
+                    input = getInput("Enter a amount to Withdraw");
72
+                    this.selectedAccount.withdraw(Double.parseDouble(input));
73
+
74
+                } else if(input.equalsIgnoreCase("Deposit")){
75
+
76
+                    input = getInput("Enter a amount to Deposit");
77
+                    this.selectedAccount.deposit(Double.parseDouble(input));
78
+
79
+                } else if(input.equalsIgnoreCase("Check Balance")){
80
+
81
+                    System.out.println(this.selectedAccount.getBalance());
82
+
83
+                } else if(input.equalsIgnoreCase("exit")){
84
+
85
+                    this.selectedAccount = null;
86
+                }
87
+            }
88
+
89
+        }
90
+
91
+    }
92
+
93
+
94
+    public static String getInput(String prompt) {
95
+        System.out.println(prompt);
96
+        Scanner scanner = new Scanner(System.in);
97
+        return scanner.nextLine();
98
+    }
99
+
100
+}
101
+
102
+
103
+

+ 27
- 0
src/main/java/com/zipcodewilmington/bankaccountlab/Account.java Bestand weergeven

@@ -0,0 +1,27 @@
1
+package com.zipcodewilmington.bankaccountlab;
2
+
3
+/**
4
+ * Created by leon on 1/10/18.
5
+ */
6
+public abstract class Account {
7
+
8
+    private double balance;
9
+
10
+    public Account(double balance) {
11
+            this.balance = balance;
12
+    }
13
+
14
+    public double withdraw(double amount) {
15
+        return balance -= amount;
16
+    }
17
+
18
+    public double getBalance() {
19
+        return balance;
20
+    }
21
+
22
+    public void deposit(double amount) {
23
+       balance += amount;
24
+    }
25
+
26
+
27
+}

+ 0
- 7
src/main/java/com/zipcodewilmington/bankaccountlab/BankAccount.java Bestand weergeven

@@ -1,7 +0,0 @@
1
-package com.zipcodewilmington.bankaccountlab;
2
-
3
-/**
4
- * Created by leon on 1/10/18.
5
- */
6
-public class BankAccount {
7
-}

+ 10
- 0
src/main/java/com/zipcodewilmington/bankaccountlab/BusinessAccount.java Bestand weergeven

@@ -0,0 +1,10 @@
1
+package com.zipcodewilmington.bankaccountlab;
2
+
3
+public class BusinessAccount extends Account {
4
+
5
+    public BusinessAccount(double balance){
6
+        super(balance);
7
+    }
8
+}
9
+
10
+

+ 8
- 0
src/main/java/com/zipcodewilmington/bankaccountlab/CheckingAccount.java Bestand weergeven

@@ -0,0 +1,8 @@
1
+package com.zipcodewilmington.bankaccountlab;
2
+
3
+public class CheckingAccount extends Account {
4
+
5
+    public CheckingAccount(double balance){
6
+        super(balance);
7
+    }
8
+}

+ 4
- 0
src/main/java/com/zipcodewilmington/bankaccountlab/MainApplication.java Bestand weergeven

@@ -4,4 +4,8 @@ package com.zipcodewilmington.bankaccountlab;
4 4
  * Created by leon on 1/10/18.
5 5
  */
6 6
 public class MainApplication {
7
+
8
+    public static void main(String[] args) {
9
+        new ATM().run();
10
+    }
7 11
 }

+ 8
- 0
src/main/java/com/zipcodewilmington/bankaccountlab/SavingsAccount.java Bestand weergeven

@@ -0,0 +1,8 @@
1
+package com.zipcodewilmington.bankaccountlab;
2
+
3
+public class SavingsAccount extends Account {
4
+
5
+    public SavingsAccount(double balance){
6
+        super(balance);
7
+    }
8
+}

+ 31
- 0
src/test/java/com/zipcodewilmington/bankaccountlab/AtmTest.java Bestand weergeven

@@ -0,0 +1,31 @@
1
+package com.zipcodewilmington.bankaccountlab;
2
+
3
+import org.junit.Assert;
4
+import org.junit.Before;
5
+import org.junit.Test;
6
+
7
+import static org.junit.Assert.assertEquals;
8
+
9
+public class AtmTest {
10
+    ATM atm;
11
+
12
+    @Before
13
+    public void setup() {
14
+        atm = new ATM();
15
+        atm.add(new CheckingAccount(2000));
16
+        atm.add(new SavingsAccount(1500));
17
+        atm.add(new BusinessAccount(3000));
18
+    }
19
+
20
+    @Test
21
+    public void getTotal() {
22
+        //Expect
23
+        double expected = 6500;
24
+
25
+        //Actual
26
+        double actual = atm.getTotal();
27
+
28
+        Assert.assertEquals(expected, actual, 0.1);
29
+    }
30
+
31
+}

+ 0
- 7
src/test/java/com/zipcodewilmington/bankaccountlab/BankAccountTest.java Bestand weergeven

@@ -1,7 +0,0 @@
1
-package com.zipcodewilmington.bankaccountlab;
2
-
3
-/**
4
- * Created by leon on 1/10/18.
5
- */
6
-public class BankAccountTest {
7
-}

+ 58
- 0
src/test/java/com/zipcodewilmington/bankaccountlab/BusinessAccountTest.java Bestand weergeven

@@ -0,0 +1,58 @@
1
+package com.zipcodewilmington.bankaccountlab;
2
+
3
+import org.junit.Assert;
4
+import org.junit.Before;
5
+import org.junit.Test;
6
+
7
+import static org.junit.Assert.*;
8
+
9
+public class BusinessAccountTest {
10
+
11
+
12
+    BusinessAccount ba;
13
+
14
+
15
+    @Before
16
+    public void setUp() throws Exception {
17
+        ba = new BusinessAccount(2000);
18
+    }
19
+
20
+
21
+    @Test
22
+    public void withdraw() {
23
+        //when
24
+        ba.withdraw(15);
25
+        //expected
26
+        double expected = 1985;
27
+        //Actual
28
+        double actual = ba.getBalance();
29
+
30
+        Assert.assertEquals(expected, actual, 0);
31
+    }
32
+
33
+    @Test
34
+    public void deposit() {
35
+        //when
36
+        ba.deposit(15);
37
+        //expected
38
+        double expected = 2015;
39
+        //Actual
40
+        double actual = ba.getBalance();
41
+
42
+        Assert.assertEquals(expected, actual, 0);
43
+
44
+    }
45
+
46
+    @Test
47
+    public void getBalance() {
48
+
49
+        //expected
50
+        double expected = 2000;
51
+        //Actual
52
+        double actual = ba.getBalance();
53
+
54
+        Assert.assertEquals(expected, actual, 0);
55
+
56
+
57
+    }
58
+}

+ 54
- 0
src/test/java/com/zipcodewilmington/bankaccountlab/CheckingAccountTest.java Bestand weergeven

@@ -0,0 +1,54 @@
1
+package com.zipcodewilmington.bankaccountlab;
2
+
3
+import org.junit.Assert;
4
+import org.junit.Before;
5
+import org.junit.Test;
6
+
7
+public class CheckingAccountTest {
8
+
9
+    CheckingAccount ca;
10
+
11
+
12
+    @Before
13
+    public void setUp(){
14
+        ca = new CheckingAccount(2000);
15
+    }
16
+
17
+
18
+    @Test
19
+    public void withdraw() {
20
+        //when
21
+        ca.withdraw(15);
22
+        //expected
23
+        double expected = 1985;
24
+        //Actual
25
+        double actual = ca.getBalance();
26
+
27
+        Assert.assertEquals(expected, actual, 0);
28
+    }
29
+
30
+    @Test
31
+    public void deposit() {
32
+        //when
33
+        ca.deposit(15);
34
+        //expected
35
+        double expected = 2015;
36
+        //Actual
37
+        double actual = ca.getBalance();
38
+
39
+        Assert.assertEquals(expected, actual, 0);
40
+
41
+    }
42
+
43
+    @Test
44
+    public void getBalance() {
45
+        //expected
46
+        double expected = 2000;
47
+        //Actual
48
+        double actual = ca.getBalance();
49
+
50
+        Assert.assertEquals(expected, actual, 0);
51
+
52
+
53
+    }
54
+}

+ 53
- 0
src/test/java/com/zipcodewilmington/bankaccountlab/SavingsAccountTest.java Bestand weergeven

@@ -0,0 +1,53 @@
1
+package com.zipcodewilmington.bankaccountlab;
2
+
3
+import org.junit.Assert;
4
+import org.junit.Test;
5
+
6
+public class SavingsAccountTest {
7
+
8
+    CheckingAccount sa;
9
+
10
+
11
+    @org.junit.Before
12
+    public void setUp() throws Exception {
13
+        sa = new CheckingAccount(2000);
14
+    }
15
+
16
+
17
+    @Test
18
+    public void withdraw() {
19
+        //when
20
+        sa.withdraw(15);
21
+        //expected
22
+        double expected = 1985;
23
+        //Actual
24
+        double actual = sa.getBalance();
25
+
26
+        Assert.assertEquals(expected, actual, 0);
27
+    }
28
+
29
+    @Test
30
+    public void deposit() {
31
+        //when
32
+        sa.deposit(15);
33
+        //expected
34
+        double expected = 2015;
35
+        //Actual
36
+        double actual = sa.getBalance();
37
+
38
+        Assert.assertEquals(expected, actual, 0);
39
+
40
+    }
41
+
42
+    @Test
43
+    public void getBalance() {
44
+        //expected
45
+        double expected = 2000;
46
+        //Actual
47
+        double actual = sa.getBalance();
48
+
49
+        Assert.assertEquals(expected, actual, 0);
50
+
51
+    }
52
+
53
+}