public class FBank extends BankBase {
private static int accountManageNum = 8000;
private static double rate;
public FBank() {
super(accountManageNum);
accountManageNum++;
}
public FBank(int money) {
super(money, accountManageNum);
accountManageNum++;
}
public void addInterest() {
System.
out.
println(getMoney
() + (int)(getMoney
() * (getRate
()/100.
d) * (getCurrentYear
() - getStartYear
()))); }
public static void setRate(double _rate) { rate = _rate; }
public static double getRate() { return rate; }
}
cHVibGljIGNsYXNzIEZCYW5rIGV4dGVuZHMgQmFua0Jhc2UgewogICAgcHJpdmF0ZSBzdGF0aWMgaW50IGFjY291bnRNYW5hZ2VOdW0gPSA4MDAwOwogICAgcHJpdmF0ZSBzdGF0aWMgZG91YmxlIHJhdGU7CiAgICBwdWJsaWMgRkJhbmsoKSB7CiAgICAgICAgc3VwZXIoYWNjb3VudE1hbmFnZU51bSk7CiAgICAgICAgYWNjb3VudE1hbmFnZU51bSsrOwogICAgfQogICAgcHVibGljIEZCYW5rKGludCBtb25leSkgewogICAgICAgIHN1cGVyKG1vbmV5LCBhY2NvdW50TWFuYWdlTnVtKTsKICAgICAgICBhY2NvdW50TWFuYWdlTnVtKys7CiAgICB9CiAgICBwdWJsaWMgdm9pZCBhZGRJbnRlcmVzdCgpIHsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oZ2V0TW9uZXkoKSArIChpbnQpKGdldE1vbmV5KCkgKiAoZ2V0UmF0ZSgpLzEwMC5kKSAqIChnZXRDdXJyZW50WWVhcigpIC0gZ2V0U3RhcnRZZWFyKCkpKSk7CiAgICB9CiAgICBwdWJsaWMgc3RhdGljIHZvaWQgc2V0UmF0ZShkb3VibGUgX3JhdGUpIHsgcmF0ZSA9IF9yYXRlOyB9CiAgICBwdWJsaWMgc3RhdGljIGRvdWJsZSBnZXRSYXRlKCkgeyByZXR1cm4gcmF0ZTsgfQp9