Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. package Finance.Client;
  2.  
  3. import Finance.Bank.BankAccount;
  4.  
  5. public class BankApp {
  6.  
  7. public static void main(String[] args) {
  8. BankAccount account1 = new BankAccount("Homer Simpson", 200);
  9. account1.displayInfo();
  10. account1.deposit(100);
  11. account1.displayInfo();
  12. account1.Withdraw(50);
  13. account1.displayInfo();
  14. double rate = BankAccount.getInterestRate();
  15. System.out.printf("Rate = %.2f \n", rate);
  16. BankAccount.setInterestRate(.5);
  17. rate = BankAccount.getInterestRate();
  18. System.out.printf("Rate = %.2f \n", rate);
  19. int days = 200;
  20. double interest = account1.calculateInterest(days);
  21. System.out.printf("Interest = %.2f Eur \n", interest);
  22. } // main()
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement