import static java.
lang.
Math.
*;
public class TBank extends BankBase {
private static int accountManageNum = 6000;
private static double rate;
private int due;
public TBank(int due) {
super(0, accountManageNum);
accountManageNum += 10;
this.due = due;
}
public TBank(int money, int due) {
super(money, accountManageNum);
accountManageNum += 10;
this.due = due;
}
public void addInterest() {
if(getCurrentYear() - getStartYear() >= due) {
System.
out.
println(getMoney
() + (int)((getMoney
() * (pow
(1 + rate
/100.
d, due
) - 1)))); } else {
System.
out.
println(getMoney
()); }
}
public static void setRate(double _rate) { rate = _rate; }
public static double getRate() { return rate; }
}
aW1wb3J0IHN0YXRpYyBqYXZhLmxhbmcuTWF0aC4qOwoKcHVibGljIGNsYXNzIFRCYW5rIGV4dGVuZHMgQmFua0Jhc2UgewogICAgcHJpdmF0ZSBzdGF0aWMgaW50IGFjY291bnRNYW5hZ2VOdW0gPSA2MDAwOwogICAgcHJpdmF0ZSBzdGF0aWMgZG91YmxlIHJhdGU7CiAgICBwcml2YXRlIGludCBkdWU7CiAgICBwdWJsaWMgVEJhbmsoaW50IGR1ZSkgewogICAgICAgIHN1cGVyKDAsIGFjY291bnRNYW5hZ2VOdW0pOwogICAgICAgIGFjY291bnRNYW5hZ2VOdW0gKz0gMTA7CiAgICAgICAgdGhpcy5kdWUgPSBkdWU7CiAgICB9CiAgICBwdWJsaWMgVEJhbmsoaW50IG1vbmV5LCBpbnQgZHVlKSB7CiAgICAgICAgc3VwZXIobW9uZXksIGFjY291bnRNYW5hZ2VOdW0pOwogICAgICAgIGFjY291bnRNYW5hZ2VOdW0gKz0gMTA7CiAgICAgICAgdGhpcy5kdWUgPSBkdWU7CiAgICB9CiAgICBwdWJsaWMgdm9pZCBhZGRJbnRlcmVzdCgpIHsKICAgICAgICBpZihnZXRDdXJyZW50WWVhcigpIC0gZ2V0U3RhcnRZZWFyKCkgPj0gZHVlKSB7CiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbihnZXRNb25leSgpICsgKGludCkoKGdldE1vbmV5KCkgKiAocG93KD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