+++ /dev/null
-public class BankAccount\r
-{\r
- //can't init here, won't compile, do it in the constructor\r
- \r
- //nine digits\r
- String AccountNumber; //field #1\r
- \r
- //account owner's name\r
- //always 10 chars\r
- //pad with @\r
- String FirstName; //field #2 \r
- String MiddleName; //field #3\r
- String LastName; //field #4\r
- \r
- //1 == Savings\r
- //2 == Checking\r
- //3 == Teller\r
- String AccountType; //field #5\r
- \r
- //ints only, should use floats in the future\r
- //1234567890\r
- //assumes balance does is never negative\r
- //always 10 chars\r
- //pad with @\r
- String Balance; //field #6\r
- \r
- //four digits\r
- String PIN; //field #7\r
- \r
- public BankAccount()\r
- {\r
- \r
- }\r
- \r
- public BankAccount(String account, String first, String middle, String last, String type, String balance, String pin)\r
- {\r
- if(account != null)\r
- AccountNumber = account;\r
- if(first != null) \r
- FirstName = first;\r
- if(middle != null)\r
- MiddleName = middle;\r
- if(last != null)\r
- LastName = last;\r
- if(type != null)\r
- AccountType = type;\r
- if(balance != null)\r
- Balance = balance;\r
- if(pin != null)\r
- PIN = pin;\r
- }\r
- \r
- public void modifyAccount(String account, String first, String middle, String last, String type, String balance, String pin)\r
- {\r
- if(account != null)\r
- AccountNumber = account;\r
- if(first != null) \r
- FirstName = first;\r
- if(middle != null)\r
- MiddleName = middle;\r
- if(last != null)\r
- LastName = last;\r
- if(type != null)\r
- AccountType = type;\r
- if(balance != null)\r
- Balance = balance;\r
- if(pin != null)\r
- PIN = pin;\r
- }\r
-}\r