-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInterfaceImplTest.java
More file actions
28 lines (21 loc) · 770 Bytes
/
InterfaceImplTest.java
File metadata and controls
28 lines (21 loc) · 770 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
package oop.interf;
public class InterfaceImplTest {
public static void main(String[] args) {
Bank n = new Nabil(); // OR This is also right: Nabil n = new Nabil( );
printBankInfo(n);
NicAsia na = new NicAsia();
printBankInfo(na);
Bank sc = new StandChart();
printBankInfo(sc);
}
public static void printBankInfo(Bank b) {
System.out.println("Bank Name: " + b.getBankName() + "\tInterest Rate: " + b.getRate()
+ "\t Service Charge Rate: " + Bank.serviceChargeRate);
}
/*
* public static void printBankInfo( String bankName, double rate, int
* serviceChargeRate ) { System.out.println( "Bank Name: " + bankName +
* "\tInterest Rate: " + rate + "\t Service Charge Rate: " +
* serviceChargeRate ); }
*/
}