Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Finance.Client;
- import Finance.Bank.BankAccount;
- public class BankApp {
- public static void main(String[] args) {
- BankAccount account1 = new BankAccount("Homer Simpson", 200);
- account1.displayInfo();
- account1.deposit(100);
- account1.displayInfo();
- account1.Withdraw(50);
- account1.displayInfo();
- double rate = BankAccount.getInterestRate();
- System.out.printf("Rate = %.2f \n", rate);
- BankAccount.setInterestRate(.5);
- rate = BankAccount.getInterestRate();
- System.out.printf("Rate = %.2f \n", rate);
- int days = 200;
- double interest = account1.calculateInterest(days);
- System.out.printf("Interest = %.2f Eur \n", interest);
- } // main()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement