-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCimb.java
More file actions
35 lines (27 loc) · 1.33 KB
/
Cimb.java
File metadata and controls
35 lines (27 loc) · 1.33 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
public class Cimb {
public static void main(String[] args) {
SavingsAccount account = new SavingsAccount();
account.setAccountNumber(1234);
account.setAccountName("Juan Dela Cruz");
account.setBalance(10000.0);
System.out.println(account.showInfo());
System.out.println("Account type: " + account.showAccountType());
System.out.println("Interest rate: " + account.getInterestRate());
System.out.println("New balance: " + account.computeBalanceWithInterest());
System.out.println("Benefits: " + account.showBenefits());
System.out.println("----------------------");
GSave gSave = new GSave(account);
System.out.println(gSave.showInfo());
System.out.println("Account type: " + gSave.showAccountType());
System.out.println("Interest rate: " + gSave.getInterestRate());
System.out.println("New balance: " + gSave.computeBalanceWithInterest());
System.out.println("Benefits: " + gSave.showBenefits());
System.out.println("----------------------");
UpSave upSave = new UpSave(account);
System.out.println(upSave.showInfo());
System.out.println("Account type: " + upSave.showAccountType());
System.out.println("Interest rate: " + upSave.getInterestRate());
System.out.println("New balance: " + upSave.computeBalanceWithInterest());
System.out.println("Benefits: " + upSave.showBenefits());
}
}