19 lines
571 B
Java
19 lines
571 B
Java
package intro.bank;
|
|||
|
|
|
||
|
|
public class TestContoCorrente {
|
||
|
|
public static void main(String[] args) {
|
||
|
|
ContoCorrenteCurrency c1 = new ContoCorrenteCurrency("c1", 1000, Currency.USD);
|
||
|
|
ContoCorrenteCurrency c2 = new ContoCorrenteCurrency("c2", Currency.EUR);
|
||
|
|
ContoCorrenteCurrency c3 = new ContoCorrenteCurrency("c3",2000, Currency.GBP);
|
||
|
|
System.out.println(c1);
|
||
|
|
System.out.println(c2);
|
||
|
|
System.out.println(c3);
|
||
|
|
|
||
|
|
c2.setBalance(c2.getBalance()+200);
|
||
|
|
c3.setBalance(c3.getBalance()-1200);
|
||
|
|
|
||
|
|
System.out.println(c2);
|
||
|
|
System.out.println(c3);
|
||
|
|
}
|
||
|
|
}
|