23 lines
505 B
Java
23 lines
505 B
Java
package me.teridax.jcash.banking;
|
|
|
|
/**
|
|
* Immutable currency account storing only overdraft.
|
|
* English equivalent to "Girokonto"
|
|
*/
|
|
public final class CurrentAccount extends Account {
|
|
|
|
/**
|
|
* Overdraft amount in currency.
|
|
*/
|
|
private final double overdraft;
|
|
|
|
public CurrentAccount(int iban, int pin, double balance, double overdraft) {
|
|
super(iban, pin, balance);
|
|
this.overdraft = overdraft;
|
|
}
|
|
|
|
public double getOverdraft() {
|
|
return overdraft;
|
|
}
|
|
}
|