BloomBank Financial Software Design CIS 3023 Project 6 Due date: Report on project classes and methods - July 27 th, 200 (Tue) Complete implementation - August 3 rd, 200 (Tue) Problem Statement: You work for Bloomberg. You are entrusted with the task of developing a financial software application called BloomBank in Java. The following are the basic requirements that you need to incorporate in the code. You may use any other Java functionality as appropriate and extend the interface. Requirements: The project should be implemented in three logical tiers as below: Tier I : Low level - Data Storage (File IO) All data from the transactions are stored in a directory called BloomBankDatabase. The first time the application is executed, this directory gets created. From then on, it is only loaded into the program for storing all banking transaction data. BloomBankDatabase directory can contain the files as described below. (Structure denotes the various fields (tokens) in the file and their order. The delimiter should always be a comma and the filetype should be csv. Name Structure Comments Customer.csv custid, custname, address, ssn, Stores customer information telephone, email CheckingAccount.csv checkingaccountid, custid, balance, checkingaccountfees Stores information about all checking accounts in the bank. SavingsAccount.csv savingsaccountid, custid, balance, savingsaccountfees Stores information about all savings accounts in the bank. Bank.csv username, userid, password Stores system access information. Default first entry should be admin,0,admin. Transaction.csv custid, checkingaccountid/ savingsaccountid, (account) type, withdraw / deposit, amount, remaining balance, current (logical) date-time (in EST) Stores all banking transactions along with current (logical*) date-time in EST. * User input during login. Admins get a userid from 0 and customers from 00. Each file is created only when the relevant operation is performed the first time. For e.g., only after the first customer is added, the file customer.csv will be created.
Tier II: Middle level Domain logic and controller. Exception Classes BloomBankIOException java.lang.exception BloomBankDatabaseNotFoundException BloomBankException BloomBankDatabaseFileNotFoundException BloomBankRuntimeException BloomBankCustomerNotFoundException BloomBankCustomerAccountNotFoundException BloomBankOverdraftException (a) BloomBankException extends Exception (Shows the message: General exception encountered. Restart!, prints the error stack trace and exits.) (b) For File Access: BloomBankIOException extends IOException. Catches all I/O Exceptions. Exception Message ( BloomBank IO Exception encountered! ). BloomBankDatabaseNotFoundException extends BloomBankIOException Checks to see if the directory BloomBankDatabase exists in the current path. Else throws exception message Non-existent BloomBankDatabase! BloomBankDatabaseFileNotFound extends BloomBankIOException Checks to see if a particular file exists in the BloomBankDatabase directory. Else throws exception message Non-existent BloomBankDatabaseFile! ) (c) For core banking application and user interface: BloomBankRuntimeException extends RuntimeException Catches runtime exception and handles it. (Message: BloomBankRuntimeException encountered! ) BloomBankOverdraftException extends BloomBankRuntimeException This handles cases where withdrawal of an amount greater than the existing balance is attempted. Overdraft fee of 20$ is charged to the Checking account. The withdrawal amount greater than balance
plus 20$ is debited from the customer s Savings account -if it exists and has the balance. If the customer does not have a Savings account or if the balance in Savings is not sufficient, then the savings account is not debited. Instead a further 30$ is debited from the Checking account. For these, enter overdraft fees into Transaction.csv file. NOTE: Any exception class may be extended or other messages and handling code can be added to improve the functionality. However, these existing exceptions should be thrown/ handled somewhere appropriately in the code. 2. Classes for the core banking application. The application should have classes for Bank, Account, CheckingAccount, SavingsAccount, and Customer. The Bank can have several customers and Checking/Savings Accounts. Customers are identified by a unique ID. The name, address, telephone and email information for customers is also saved. Each customer can have zero or more Checking accounts, but only one Savings Account. The account itself is defined as an abstract class. Checking and Savings accounts have their own unique ids. Each customer s account is identified uniquely using the customer id, account type and the account id. Some of the classes signatures are provided below (extend as required). Abstract Class Account - counter: static int - type: String - balance: double - owner: Customer +exists() : bool + getbalance( ) : double +withdraw(double amount) : int (0-success) +deposit(double amount) : int (0-success) Class Checking Account - checkingaccountid:int - custid: int - checkingaccountfees: double + processcheck(checktoprocess : Check) During withdrawal: Check if balance is less than 500$ after a withdrawal. If so, debit 0$ as TransactionOverhead Fees. Enter into Transaction.csv as Checking Fees. Class SavingsAccount - savingaccountid: int - custid: int - interestrate: double
- withdrawalcounter: int -savingsaccountfees: double + depositmonthlyinterest() During withdrawal: Check if 3 withdrawals have already happened during the current month. If so, debit 20$ as SavingsTransactionOverhead Fees (Enter into Transaction.csv as Savings Fees ) and reset the counter to zero. No minimum balance is required for Savings accounts. Use the file called Transactions.csv to record all transactions in the format below: custid, checkingaccountid/ savingsaccountid, (account) type, withdraw / deposit, amount, remaining balance, current (logical) date-time (in EST) Here is an example entry: 00,,checking,withdraw,00,900,Mon 8 Jul 200 2:08:56-0500 You may use any format for the date-time as convenient. Remember to update the methods for withdrawal for charging fees. Class Check - amount: double - checknumber: int - checkbookownername: String - accountnumber: int + getamount(): double + getchecknumber(): int This class represents bearer check which is not written to the order of a particular person and anyone may present the check and deposit it into his/her account. A customer is able to write checks and all checks need to be stored in a CheckLinkedList. Each check must have a unique number. Customers must present the unique number of a check in order to deposit it into their account. Then the check is retrieved from the checklinkedlist and the transfer of funds gets processed. Class OrderCheck - totheorderof: String + gettotheorderof(): String
This class extends the class Check and represents order check. The customer who is trying to deposit the check must present his ID. You need to retrieve the customer s name from list of customers using the presented ID; the customer name must be equal to the name stated by totheorderof. Class CheckLinkedList - head: CheckHolder + add(check:check): void + retrieve(checknum:int): Check This class implements a linked-list to maintain all checks been issued by customers. Each check is stored in a linked-list node called CheckHolder. CheckLinkedList only keeps the head of the chain of checkholders. The method add() creates a checkholder and adds it to the end of the list. The method retrieve() searches through the list to find a check that has the unique number equal to checknum. The found check should get removed from the list. Implementing appropriate constructors and get/set methods are left to you.
External view of class relationships BloomBank 0... * Account -counter: int keeps track of total number of opened accounts -type: String account type -balance: double account balance -owner: Customer +exists(): boolean +getbalance(amount:double): double +withdraw(amount:double): int returns 0 if it fails, success otherwise +deposit(amount:double): int returns 0 if it fails, success otherwise 0... * Customer -accounts: Account[] +WriteCheck(amount:double,account:Account, totheorderof:customer): int returns the check# +depositcheck(checknum:int,toaccount:account): void deposits the check to toaccount of this customer this customer should be equal to the check's order name Check bearer check -amount: double -checknumber: int -checkbookownername: String -accountnumber: int -counter: int keeps track of number of created checks used in order to establish a unique number for each check +getamount(): double +getchecknumber(): int CheckLinkedList maintains all written checks -head: CheckHolder +add(check:check): void +retrieve(checknum:int): Check 0... * CheckHolder +check: Check +next: CheckHolder OrderCheck -totheorderof: String +gettotheorderof(): String SavingAccount -savingaccountid: int -custid: int -withdrawalcounter: int -savingsaccountfees: double -interestrate: double +depositmonthlyrate(): void CheckingAccount -checkingaccountid: int -custid: int -checkingaccountfees: double +processcheck(checktoprocess:check): void
Tier III: High level - User Interface (Driver) At the start of the program, a menu should give the user options for console input or GUI. You have to implement the console input as the default case. The second menu should have a textbox for providing logical time input, and should further indicate these options: Login as admin. Login as customer. (If Login as customer is chosen the first time, an exception is thrown with the message Nonexistent BloomBankDatabase! Login as admin to create database. ) The login screen should take a username and password, and login as admin or customer based on the userid. When an admin logs in, the following options should be available: Create BloomBank database. (only available the first time when the dir does not exist). Create a new customer. Add Checking Account for customer Add Savings Account for customer See available Checking Accounts (sort by id) See available Savings Accounts (sort by id) For the customer, after login the following options should be available. See account balance (lists all accounts and balances, sorted by opening date). Deposit Withdraw Close account Each of the operations should be performed by calling methods in the relevant classes and any abnormality should handled using the custom exceptions appropriately. You are free to design the exact user-interface yourself and add additional features as you want. However, these above features are mandatory and should be incorporated in your code. GRADING: Total points: 250.. Preliminary report (Class diagram/ working documentation ) 50 pts 2. User-interface design, coding style (logic, ease of use, appropriate commenting, etc.) 00 pts 3. Use of the required classes, exceptions and methods 50pts 4. Additional improvements and extensions 50pts. ***