fork download
  1. public class FBank extends BankBase {
  2. private static int accountManageNum = 8000;
  3. private static double rate;
  4. public FBank() {
  5. super(accountManageNum);
  6. accountManageNum++;
  7. }
  8. public FBank(int money) {
  9. super(money, accountManageNum);
  10. accountManageNum++;
  11. }
  12. public void addInterest() {
  13. System.out.println(getMoney() + (int)(getMoney() * (getRate()/100.d) * (getCurrentYear() - getStartYear())));
  14. }
  15. public static void setRate(double _rate) { rate = _rate; }
  16. public static double getRate() { return rate; }
  17. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty