Programmer Manual
User Manual:
Open the PDF directly: View PDF .
Page Count: 31
Download | |
Open PDF In Browser | View PDF |
Table of Contents 1. Main.java 1.1. 1.2. 1.3. 1.4. 1.5. 1.6. 1.7. 1.8. 1.9. 1.10. 1.11. 1.12. 1.13. 2. Variables ClosingThread() start() main() readDatabase() removeAccount() linkAccounts() fetchTransactions() getCustomer() addCustomer() addAccount() findCustomer() getDate() AccountsPackage 2.1. Customer.java 2.1.1. 2.1.2. 2.1.3. 2.1.4. 2.1.5. 2.1.6. 2.2. Account.java 2.2.1. 2.2.2. 2.2.3. 2.2.4. 2.2.5. 2.3. Variables Constructor getCustomerId() getBalance() Abstract methods CheckingAccount.java 2.3.1. 2.3.2. 2.3.3. 2.3.4. 2.3.5. 2.3.6. 2.3.7. 2.3.8. 2.4. Variables Constructor Getters and Setters addAccount() removeAccount() toString() Variables Constructor Withdraw() Deposit() CloseAccount() getAccountType toString() getAccountId() SavingsAccount.java 2.4.1. Variables 1 2.4.2. 2.4.3. 2.4.4. 2.4.5. 2.4.6. 2.4.7. 2.5. Loan.java 2.5.1. 2.5.2. 2.5.3. 2.5.4. 2.5.5. 2.5.6. 2.5.7. 2.6. Variables Constructor Deposit Getters and setters advanceMonth() updateInterestRate() toString() PendingTransaction.java 2.6.1. 2.6.2. 2.6.3. 2.6.4. 3. Constructor Withdraw() Deposit() CLoseAccount() isCD() toString() Variables Constructor Getters and setters toString() ControllerPackage 3.1. MainController.java 3.1.1. 3.1.2. 3.1.3. 3.1.4. 3.2. SubController.java 3.2.1. 3.2.2. 3.2.3. 3.2.4. 3.2.5. 3.2.6. 3.2.7. 3.2.8. 3.2.9. 3.2.10. 3.2.11. 3.2.12. 3.2.13. 3.3. Variables function() login() initialize() Variables advanceAMonth() updateInterestRate() function() logout() returnTo() closeAccount() Deposit() Withdraw() transferFunds() initialize() changed() createTransaction() CustomerController.java 3.3.1. Variables 2 3.3.2. 3.3.3. 3.3.4. 3.3.5. 3.3.6. 3.3.7. 3.3.8. 3.4. TellerController.java 3.4.1. 3.4.2. 3.4.3. 3.4.4. 3.4.5. 3.4.6. 3.5. Variables function() returnTo() createAccount() createCustomer() functionToDoStuff() setAccountTypeVisibilty() setNewCustomerVisibilty() initialize() changed() LoanAccountController.java 3.7.1. 3.7.2. 3.7.3. 3.7.4. 3.7.5. 3.8. Variables function() logout() createAccount() createLoan() manSearch() initialize() CreateAccountController.java 3.6.1. 3.6.2. 3.6.3. 3.6.4. 3.6.5. 3.6.6. 3.6.7. 3.6.8. 3.6.9. 3.6.10. 3.7. Variables function() logout() telSearch() createAccount() initialize() ManagerController.java 3.5.1. 3.5.2. 3.5.3. 3.5.4. 3.5.5. 3.5.6. 3.5.7. 3.6. function() Logout transferFunds() Withdraw() initialize() changed() createTransaction() Variables. function() createLoan() returnMan() initialize() CollectionController.java 3.8.1. CollectionController{} 3 3.9. TransactionController.java 3.9.1. 3.9.2. 3.9.3. 3.9.4. 3.9.5. 4. Data 4.1. 4.2. 5. Variables function() returnCreditTransaction() returnCheckTransaction() returnToCus() BankingDatabase.txt EnumeratedTypes.java FXMLPackage 5.1. 5.2. 5.3. 5.4. 5.5. 5.6. 5.7. 5.8. 5.9. 5.10. 5.11. AccountCreation.fxml CreateTransactions.fxml Customer.fxml Failed.fxml LoanAccounts.fxml LoginPage.fxml ManagerMainMenu.fxml SavingsAccount.fxml SubMenu.fxml Success.fxml TellerMainMenu.fxml 1. Main.java Within main the BankingDatabase.txt is read and written when the program opens and closes. Also included are the methods to manipulate the ArrayLists themselves as well as initialize the GUI. 1.1 Variables. 1.2 ClosingThread() - Extends the Thread class. This class is runnable and responsible for writing the bank system data to the primary text file when the program closes. It gets the current data from the ArrayLists to write. 1.3 start() - Loads the FXML and runs the GUI. 4 1.4 main() - Makes system startup calls. 1.5 readDatabase() - This method is used on startup to read in the data.txt for the banking system. The data is loaded into the appropriate ArrayList. Switch is used to split out the Customer, Checking, Savings, Loan, Transactions objects. 1.6 removeAccount() - Receives an Account to be removed from the accounts ArrayList. 1.7 linkAccounts() - Links accounts to a customer. 1.8 fetchTransactions() - Recieves an accointId and returns the transactions for the account. 5 1.9 getCustomer() - Returns a customer from the customer ArrayList with the specified SSN. 1.10 addCustomer() - Receives a customer object and adds it to the customer ArrayList. 1.11 addAccount() - Recieves an account object and adds it to the accounts ArrayList. Calls linkAccounts to link the account tot the customer. 1.12 findCustomer() - Returns true/false if the customer exists in the system. 1.13 getDate() - Return the current date. 2. AccountsPackage The Account Package includes all the code pertaining to customer, account and transaction data. Included are the following classes. 2.1 Customer.java The customer class stores all the data needed for a customer in the system. All variables are protected and all methods are public. Every customers customerId is their social security number and thus unique. 2.1.1 Variables - The following variables are stored: 2.1.2 Constructor- The constructor will initialize all variables in the class. 6 2.1.3 Getters and Setters - All variables have simple getter and setter methods which will not be listed here. 2.1.4 addAccount() - This method adds an Account item to the customers accounts ArrayList. A check is performed to ensure the account is owned by the customer. 2.1.5 removeAccount() - This method removes an Account i tem to the customers accounts ArrayList. A check is performed to ensure the Account i s owned by the Customer. 2.1.6 toString() - returns the Customer i nformation in String format. 2.2 Account.java The Account class holds the account information. This class is abstract and extends to Loan, CheckingsAccount, SavingAccount classes. There cannot be an Account w ithout a Customer w ho owns it. 7 2.2.1 Variables. 2.2.2 Account() - constructor 2.2.3 getCustomerId() - Returns customerId. 2.2.4 getBalance() - Returns balance. . 2.2.5 Abstract Methods - The last 3 methods are abstract to be used by the extended classes. 2.3 CheckingAccount.java CheckingAccount is an extension of Account, and allows for customer to have a Checking Account. 2.3.1 Variables. 2.3.2 Constructor - The constructor will initialize all variables in the class, and make sure the identifier is 0 or not. 8 2.3.3 Withdraw() - This methods will get the customer withdraw, and make sure the account have enough balance to withdraw, and return the amount. If a backup Savings Account exists, check withdraw against balance. If Withdraw is greater than the balance it will withdraw overge from the backup account. Else check balance against withdraw amount and if over deny withdrawal. Returns amount withdrawn successfully. 9 2.3.4 Deposit() - Receives an amount and adds it to balance. 2.3.5 CloseAccount() - Removes this Account from the system. Receives current time then removes the balance from the Account t o be paid out to the customer. Pending transactions are checked for outstanding transactions. This account is sent to Main.removeAccount() to be removed from database ArrayList. Former balance is returned. 10 2.3.6 getAccountType() - Returns accountType. 2.3.7 toString() - Returns the Account as String in the following format: 2.3.8 getAccountId() - Returns identifier. 2.4 SavingsAccount.java SavingsAccount is an extension of accounts and holds the saving account information for customers. 2.4.1 Variables. 2.4.2 Constructor. 2.4.3 Withdraw() - If the account is a CD the methods returns 0. If the withdrawal is less than the balance the amount is withdrawn and balance updated, else return 0. Amount withdrawn is returned. 11 2.4.4 Deposit() - Receives amount to deposit and updates the balance. 2.4.5 CloseAccount() - Closes this Account. I f the Account is a CD the due date is checked. If closure call is before the CD due date no interest is returned. Else the close call is after CD due date the balance is returned with the calculated interest. Else the account is not a CD the balance is returned with occured interest. Balance is set to 0 and the account is sent to Main.removeAccount() to be removed from the database ArrayList. 2.4.6 isCD() - Returns boolean true if a due date exists as CDDue. 2.4.7 toString() - Returns this SavingsAccount information in String in the following format: 2.5 Loan.java 12 The loan class is an extension of accounts, that shows the loan information for customers. There are 3 loan types that each have different monthly payment calcualtions: ST(Short Term) - balance/(5*12.0))+(balance/2)*5*this.currentInterestRate LT(Long Term) - balance/(30*12.0))*30*this.currentInterestRate CC(Credit Card) - balance/(1*12.0))+(balance/2)*1*this.currentInterestRate 2.5.1 Variables. 2.5.2 Constructor - Creates a loan object. The currentPaymentDue is set based on accountType. The payment calculations are performed within the constructor. The payment due is calculated based on accountType. 2.5.3 Deposit() - Deposit is used to make payments on the Loan account. When the method is called it checks if the payment is late. If payment is not late it is calculated against the balance and payment due. A new payment due is calculated. If payment is late the late payment flag is 13 set to true. If balance is 0 the account will close itself. 2.5.4 Getters and Setters - The following methods are simple getter and setter methods: getAccountType() getDatePaymentDue() getCurrentInterestRate() setCurrentInterestRate() getCurrentPaymentDue() getLastPayment() getMissedPaymentFlag() setMissedPaymentFlag() getIdentifier() 2.5.5 advanceMonth() - This method is used to simulate 30 days passing. It will look at the current account balance, and interest rate and calculate a new balance. It will also give it a new due date. 2.5.6 updateInterestRate() - Function to update the interest rate. Takes in a new value for the new interest rate. 0.01 = 1%. 2.5.7 toString() - Returns the loan account data in the following format: 14 2.6 PendingTransaction.java This class handles pending transactions against accounts. It include functionality to stop payments if they have not been honored yet. 2.6.1 Variables. 2.6.2 Constructor. 2.6.3 Getters and setters - included simple getters and setters are as follows: getAccountID() getTransactionID() getAmount() getPayToOrderOf() getDateOfTransaction() getIsStopped() setIsStopped() 2.6.4 toString() - Returns a String of the PendingTranaction data in the following format: 15 3. ControllerPackage The Controller class will access the input boxes and other various items from the fxml pages. The pages should contain fx:id to be able to be accessed on this page using event listeners. 3.1 MainController.java This controller handles the initial login of a Manager Teller or Customer 3.1.1 Variables: 3.1.2 function() - This used for changing the gui pages and setting the new scene. 3.1.3 login(): loads the FXML and get user information and separate the login is Teller or manager or customer. 16 3.1.4 initialize(URL arg0, ResourceBundle arg1) 3.2 SubController.java The SubController handles all the overall user functionality for the system. 3.2.1 Variables - In addition to the below image there are many Button, ComboBox, TextField, TextArea, ListView, Pane and Label variables as well. 3.2.2 advanceAMonth() - On button click, advance the loan a month. This allows us to watch interest rise automatically,Set the current amount due,Set the loan balance to what the customer owes on that loan,Signals that a month has passed and the customer has been notified. 17 3.2.3 updateInterestRate() - Check if the account is valid or not, on valid account, it grabs the new interest rates and updates it, then returns the rate. 3.2.4 function() - This used for changing the gui pages and setting the new scene. 3.2.5 logout() - This used for user log out the page. 3.2.6 returnTo() - This used for Gui return to manager page or teller page. 18 3.2.7 closeAccount() - This used for close account. 3.2.8 Deposit() - This used for deposit the money to account. 3.2.9 Withdraw() - This used for withdraw money from account. 3.2.10 transferFunds() - This used for checking or saving account transfer funds to other. 19 3.2.11 initialize() - Sets customers account being displayed to the selected customer on the Manager/Teller page. Within the function, there are various controllers that change what is being displayed. 3.2.12 changed() - Depending on the combobox selected, it will change the information in the fields being displayed 3.2.13 createTranscation() - This used for user create a transaction. 3.3 CustomerController.java The CustomerController handles the functions a customer is allowed to perform while logged in. 3.3.1 Variables - In addition to the below image there are many Button, ComboBox, TextField, TextArea and ListView variables as well. 3.3.2 function() - This used for changing the gui pages and setting the new scene. 3.3.3 logout() - This used for user log out the page. 20 3.3.4 transferFunds() - This used for checking or saving account transfer funds to other. 3.3.5 Withdraw() - This used for withdraw money from account. 3.3.6 initialize() - updating display to show customers information. 3.3.7 changed() setting local variables. 3.3.8 createTranscation() - This used for user create transaction. 3.4 TellerController.java The TellerController handles the functions a teller is allowed to perform while logged in. 3.4.1 Variables. 3.4.2 function() 21 3.4.3 logout() - Allows a teller to log out. 3.4.4 telSearch() - Method for a teller to search for a customer in the system by SSN. 3.4.5 createAccount() - Method to begin creating an account from the teller page. 3.4.6 initialize(URL arg0, ResourceBundle arg1) 3.5 ManagerController.java The ManagerController handles the functions a manager is allowed to perform while logged in. 3.5.1 Variables. 3.5.2 function() 22 3.5.3 logout() - Method to log a manager out. 3.5.4 createAccount() - Method to begin creating an account for a manager. 3.5.5 createLoan() - Method to begin creating a Loan as a manager. 3.5.6 manSearch() - This method allows the manager to search the system for a customer. 3.5.7 initialize(URL arg0, ResourceBundle arg1) 3.6 CreateAccountController.java The CreateAccountController handles functionality for creating a account for a customer. 3.6.1 Variables - In addition to the below image there are many Button, ComboBox, TextField, and Label variables as well. 23 3.6.2 function() - This function will be used to set and go to the next scene. 3.6.3 returnTo() - This function, based on login permissions, will take you back to the manager or teller main page. 3.6.4 createAccount() - This method will create an account object as long as there is a customer to create an account for. Lastly, account is sent to main to be added to the accounts ArrayList. 3.6.5 createCustomer() When called it reads the input variables and creates a customer object. The customer is sent to main and added to the customer ArrayList. 24 3.6.6 functionToDoStuff() 3.6.7 setAccountTypeVisibilty() 25 3.6.8 setNewCustomerVisibilty() 3.6.9 initialize() - Sets the values in the sub-menu CreateAccount to the selected account type. 26 3.6.10 changed() - Checks to see if you are using a new or pre existing customer. Changes the fields displayed depending on what was selected in the combo box. 3.7 LoanAccountController.java The LoanAccountController handles functionality for creating loans in the system. 3.7.1 Variables: 3.7.2 function() - This is used to traverse pages. 3.7.3 createLoan() - Checks that there is not a null so a loan can be created Grabs the dates. 27 The following show where the loan type string is abbreviated so it can be passed to the constructor The loan is then created and added to the accounts ArrayList in Main. 3.7.4 returnMan() - Returns the GUI to the manager main menu screen. 3.7.5 initialize() 3.8 CollectionController.java Taking in an ArrayList and turning them into a ObservableList for use with combo boxes. 3.8.1 CollectionController{}. 28 3.9 TransactionController.java The TransactionController is used for obtaining values from the CreateTransactions.fxml page. The controller should pass the content to savings the account class. 3.9.1 Variables. 3.9.2 function() - This used for changing the gui pages and setting the new scene. 3.9.3 returnCheckTransaction(ActionEvent actionEvent) - Used to submit the credit card transaction. 29 3.9.4 returnCheckTransaction(ActionEvent actionEvent) - Used to submit the checking transactions. 3.9.5 returnToCus() - Checks the login type and makes sure to transfer the user to the correct area when navigating. 4. Data 4.1 BankingDatabase.txt - This text file is the main data file for the banking system. It is accessed only at the startup and shutdown of the system. Each block of data in the file is headed by the type of data to follow. Examples to follow: 30 4.2 EnumeratedTypes.java - See entire file below: 5. FXMLPackage In the FXML package are the generated FXML files used for the GUI objects and styling. The following is the list of all the files: 5.1 AccountCreation.fxml 5.2 CreateTransactions.fxml 5.3 Customer.fxml 5.4 Failed.fxml 5.5 LoanAccounts.fxml 5.6 LoginPage.fxml 5.7 ManagerMainMenu.fxml 5.8 SavingsAccount.fxml 5.9 SubMenu.fxml 5.10 Success.fxml 5.11 TellerMainMenu.fxml 31
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : Yes Producer : Skia/PDF m73 Page Count : 31EXIF Metadata provided by EXIF.tools