-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest
More file actions
59 lines (26 loc) · 1.03 KB
/
Test
File metadata and controls
59 lines (26 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package bank_project;
public class Test {
public static void main(String[] args) throws withdrawException {
//Kobi
Goldclients ClientKobi = new Goldclients (123, "kobi", 0);
PlatinumClient ClientKim = new PlatinumClient(789, "Kim", 0);
//Kim
Account a1=new Account(1,100);
Account a2=new Account(2,100);
Account a3=new Account(3,100);
Account a4=new Account(4,100);
ClientKobi.addAccount(a1);
ClientKobi.addAccount(a2);
ClientKim.addAccount(a3);
ClientKim.addAccount(a4);
System.out.println("Kobi client fortune is: " +ClientKobi.getFortune());
ClientKobi.removeAccount(a2);
System.out.println("Kobi client fortune after remove A2: " + ClientKobi.getFortune());
ClientKobi.withdraw(50);
System.out.println("Kobi client fortune after withdraw: " +ClientKobi.getFortune());
ClientKobi.deposit(100);
System.out.println(ClientKim.getFortune());
ClientKim.deposit(3000);
System.out.println(ClientKim.getFortune());
}
}