From test, 9 Years ago, written in Plain Text.
Embed
  1. public class BankAccount extends JFrame
  2.  
  3. {
  4.     private int balance = 0;
  5.         private String accountID;
  6.  
  7.         public BankAccount(String accountID) {
  8.                 for (int i = 0; i<accountID.length();i++) {
  9.                 char c = accountID.charAt(i);
  10.                  if (! Character.isDigit(c)) {
  11.                         throw new IllegalArgumentException();
  12.                 }
  13.         }
  14.                 this.accountID = accountID;
  15.         }