20 lines
512 B
Java
20 lines
512 B
Java
package intro.bank;
|
|
|
|
public class ContoCorrenteCurrency extends ContoCorrente {
|
|
private Currency currency;
|
|
|
|
public ContoCorrenteCurrency(String owner, Currency currency) {
|
|
super(owner);
|
|
this.currency = currency;
|
|
}
|
|
public ContoCorrenteCurrency(String owner, Integer balance, Currency currency) {
|
|
super(owner, balance);
|
|
this.currency = currency;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return super.toString().substring(0,super.toString().length()-1)+" "+this.currency+"]";
|
|
}
|
|
}
|