-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBanktest.java
More file actions
32 lines (27 loc) · 802 Bytes
/
Banktest.java
File metadata and controls
32 lines (27 loc) · 802 Bytes
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
package Bank;
public class Banktest {
public static void main(String[] args) {
BankAccount ba = new BankAccount("Nathan", 25.00);
l(ba.getOwner());
l(ba.GetBalance());
l("----------------------------------");
SavingsAccount sa = new SavingsAccount("Bob", 125.00);
sa.Deposit(20.00);
sa.addintrest();
l(sa.GetBalance());
l("----------------------------------");
CheckingAccount ca =new CheckingAccount("Billy", 250.00, 250);
ca.withdraw(25.00);
ca.UseCheck();
l(ca.GetBalance());
l("----------------------------------");
Checkingwithfees caf = new Checkingwithfees ("Cheese", 500, 20);
caf.withdraw(25.00);
caf.Deductfees();
caf.UseCheck();
l(caf.GetBalance());
}
public static void l(Object s){
System.out.println(s);
}
}