// A simple application to show how to use the Account class // Nancy McCracken 9/14/97 // // AccountTest ----uses----> Account // public class AccountTest1 { static Account george; // variable for instance of Account class public static void main (String[] args) { double interest; // create a new instance of the Account class george = new Account ("George", 5000. ); System.out.println("George's Bank Account Balance"); System.out.println("Initial balance is $" + george.getbalance()); // call an Account method on the instance george george.deposit(1500.); System.out.println("Deposits $1500. $" + george.getbalance()); george.withdraw(523.); System.out.println("Attempt to withdraw $523. $" + george.getbalance()); interest = george.monthactivity(); System.out.println("After one month, interest $" + interest); System.out.println("End of the month $" + george.getbalance()); } }