001package de.hdm_stuttgart.mi.sd1.interest; 002 003 004/** 005 * Testing simple accounts 006 * 007 */ 008public class App { 009 /** 010 * @param args unused 011 */ 012 public static void main(String[] args) { 013 014 Account account = new Account(20.); // Create a new instance of class Account 015 016 account.setBalance(100.); // set account's balance 017 System.out.println("Balance:" + account.getBalance()); // Display account's balance 018 019 Account.setAssetInterestRate(1.0); // Setting the global interest rate 020 021 account.applyInterest(3); // raise balance by three years compounded interest 022 023 System.out.println("balance:" + account.getBalance()); // Display account's balance again 024 025 026 Account.setAssetInterestRate(15.); 027 account.setBalance(-1000.); // You owe me something! 028 account.applyInterest(3); 029 030 System.out.println("balance:" + account.getBalance()); // Display account's balance again 031 } 032}