// COBOL Programmers Swing With Java - copyright 2005 Doke, Hardgrave, & Johnson // Chapter 3 - Java Structure // Program to model the AccountProcessor class // AccountProcessor.java 1 JAN 05 public class AccountProcessor { public static void main (String args[]) // main is first method executed { // attribute values int accountNumber = 12345; float currentBalance = 50.00F; // create a checking account instance CheckingAccount anAccount = new CheckingAccount(accountNumber, currentBalance); // retrieve and display current balance System.out.println ("Beginning Balance: " + anAccount.getCurrentBalance()); // post a $20 check then again retrieve and display current balance anAccount.recordACheck (20.00F); System.out.println ("Balance After $20 check: " + anAccount.getCurrentBalance()); // post a $15 deposit then again retrieve and display current balance anAccount.recordADeposit (15.00F); System.out.println ("Balance After $15 deposit: " + anAccount.getCurrentBalance()); } // end main } // end of accountProcessor.java