Project Design
Financial Interest Portal (FIP)
Project Design
Revision 3.0
June 28, 2015
Group #3
Perra Crosby, Michael DeSoi, Brisa Trevino
CMSC 495 6980 – Current Trends and Project in Computer Science
REVISION HISTORY TABLE
|
Revision # |
Date |
Modifier |
Description |
|
#1 |
8 – June 2015 |
Brisa Trevino |
Project Plan and Requirement - original document compiled |
|
#2 |
8 – June 2015 |
Brisa Trevino |
Project Plan and Requirement - updated all sections to reflect project objectives |
|
#3 |
16 – June 2015 |
Michael DeSoi |
Project Analysis - original document compiled |
|
#4 |
18 – June 2015 |
Brisa Trevino |
Project Analysis - reformatted document |
|
#5 |
20 – June 2015 |
Michael DeSoi |
Project Analysis - Added revision table, added Table of Contents |
|
#6 |
25 – June 2015 |
Perra Crosby |
Project Design – document compiled |
|
#7 |
27 – June 2015 |
Michael DeSoi |
Project Design - added UML diagram, corrections, updated table of contents |
|
#8 |
28 – June 2015 |
Briso Trevino |
Project Design - Document review |
|
#9 |
28 – June 2015 |
Perra Crosby |
Project Design – reformatted document and updated table of contents |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Table of Contents Purpose 4 System Overview 4 Detail Design 5 Scenarios and Event Trace Scenario 1 6 Scenario 2 6 Scenario 3 7 Scenario 4 7 Scenario 5 8 Scenario 6 8 Scenario 7 9 Scenario 8 10 Scenario 9 11 Scenario 10 12 Scenario 11 13 Scenario 12 14 Scenario 13 15 Scenario 14 16 Scenario 15 17 Scenario 16 18 Subsystem Pseudocode AccountAccess 19 DepositWithdraw 23 Interest 28 Diagrams Architectural Context Diagram 4 Entity Relationship Diagram 5
1. PURPOSE
The purpose of this design document is to present the Financial Interest Portal (FIP) design at a level that can be directly traced to the project requirements.
2. SYSTEM OVERVIEW
The Financial Interest Portal (FIP) contains the following subsystem:
AccountAccess, Output, DepositWithdraw, Interest
Figure 1: Financial Interest Portal Architectural Context Diagram
3. DETAIL DESIGN
Figure 2: Entity Relationship Diagram
4. SCENARIOS AND EVENT TRACE DIAGRAMS
Scenario 1:
Description: User enters username and password and presses login button.
Precondition: Enter Username, Password.
Post-condition: Open FIP Portal to User.
Scenario 2:
Description: User provides no value in username and password fields and presses login button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Display error message "Please enter required value."
Scenario 3:
Description: User provides same values in username and password fields and presses login button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Display error message "Please enter correct combination of username and password."
Scenario 4:
Description: User provides values in username and password fields and presses login button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Display error message "Username or password incorrect. Please try again."
Scenario 5:
Description: User logs in the system and presses “Checking Account” button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Display User Checking Account Details and Account History.
Scenario 6:
Description: User logs in the system and presses “Saving Account” button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Display User Saving Account Details and Account History.
Scenario 7:
Description: User logs in the system and presses “Checking Account” button. Then User Presses “Withdraw Amount” button. User enters amount in the field provided in dialog and presses cancel button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Close "Withdraw Amount" Dialog.
Scenario 8:
Description: User logs in the system and presses “Checking Account” button. Then User Presses “Withdraw Amount” button. User enters amount in the field provided in dialog and presses submit button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Display record number, Account Type, Amount Withdrew, Interest Incurred, Withdrawal Date/Time and Available Amount in Account.
Group 3 – Project Design Page 21
Scenario 9:
Description: User logs in the system and presses “Checking Account” button. Then User Presses
“Deposit Amount” button. User enters amount in the field provided in dialog and presses submit button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Display record number, Account Type, Amount Deposited, Interest Incurred, Deposit Date/Time and Available Amount in Account.
Scenario 10:
Description: User logs in the system and presses “Checking Account” button. Then User Presses “Deposit Amount” button. User enters no amount in the field provided in dialog and presses submit button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Display error message "Please enter amount and try again."
Scenario 11:
Description: User logs in the system and presses “Saving Account” button. Then User Presses “Withdraw Amount” button. User enters amount in the field provided in dialog and presses submit button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Display Account Type, Amount Withdrew, Interest Incurred, Withdrawal Date/Time and Available Amount in Account.
Scenario 12:
Description: User logs in the system and presses “Saving Account” button. Then User Presses “Deposit Amount” button. User enters amount in the field provided in dialog and presses submit button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Display Account Type, Amount Deposited, Interest Incurred, Deposit Date/Time and Available Amount in Account.
Scenario 13:
Description: User logs in the system and presses “Saving Account” button. Then User Presses “Transfer Amount” button. User enters receiver account no. and amount in the fields provided in dialog and presses submit button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Display error message “You have reached Money Transfer limit of this month.”
Scenario 14:
Description: User logs in the system and presses “Saving Account” button. Then User Presses “ Transfer Amount” button. User enters receiver account no. and amount in the fields provided in dialog and presses submit button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Display error message “Please enter correct receiver account number”.
Scenario 15:
Description: User logs in the system and presses “Saving Account” button. Then User Presses “Transfer Amount” button. User enters receiver account no. and amount in the fields provided in dialog and presses submit button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Display Account Type, Amount transferred, Interest Incurred, Transfer Date/Time, Available Amount, sender account Number, receiver account number, sender account title and receiver account title.
Scenario 16:
Description: User logs in the system and presses “Logout” button.
Precondition: User enters username and password on LOGIN PANEL.
Post-condition: Open User panel to User.
5. PSEUDOCODE
5. 1 AccountAccess Subsystem:
Class AccountAccess {
1. Declaration of variables and graphics buttons.
String username;
String password;
boolean isUsernameEntered=false;
boolean isPasswordEntered=false;
boolean isCorrectCombination =false;
Button Login ;
Button CheckingAccount;
Button SavingAccount;
Form FIPPORTAL;
Form LOGINPANNEL;
2. Main Method starts here. AccVoid main() {
3. Following statement open Login Panel when application starts.
Window.open(LOGINPANNEL);
4. Get username and password input from input fields and store into variables.
username= input username;
password = input password;
5. Following trigger method will start if login button is pressed.
Public void Login.onClick(){
• Call following methods to check whether username or password were entered.
Save results in Boolean variable defined above.
isUsernameEntered=checkValueEntered(username);
isPasswordEntered =checkValueEntered(password);
• Call checkCombination method to check if username or password have different combination.
Save results in Boolean variable defined above.
isCorrectCombination=checkCombination(username,password);
• IF condition to check if above Boolean variables values are true.
If they are true, process login.
if (isUsernameEntered==true&& isPasswordEntered==true &&
isCorrectCombination==true){
• Compare user entered username and password with dataset password.
If(username==(System username) && password==(System password)){
If username and password matches open FIPPORTAL and display success message.
Window.open(FIPPORTAL);
DisplayMessage("You are logged in successfully.");
} Else{
If username and password does not match, display error message to user.
displayError (“Username or password incorrect. Please try again.”);
}
} //end if
} // end Login.onClick()
6. Following trigger method will if FIPPORTAL windows load after successful login.
FIPPORTAL.onLoad(){
• Following trigger method will start if CheckingAccount button is clicked.
CheckingAccount.onClick{
• Display checking account details by passing values to generic method displayAccountDetails
displayAccountDetails ( username,”Checking”)
}
• Following trigger method will start if SavingAccount button is clicked.
SavingAccount.onClick{
• Display saving account details by passing values to generic method displayAccountDetails
displayAccountDetails ( username,”Saving”)
}
• Following trigger method will start if logout button is clicked.
logout.onClick{
• End user session, close FIPPORTAL, open LOGINPANNEL and displays success message to user
Window.close(FIPPORTAL);
DisplayMessage("Log out successful."); Window.open(LOGINPANNEL);
}
} //close FIPPORTAL.onLoad()
} //close main
7. Method called from main method, to check value of username and password. The method has Boolean return type. If values are empty, method returns false and display error message to user, otherwise it returns true.
Private Boolean checkValueEntered(String value){ If(value.isEmpty) {
DisplayError(“Please enter required value”)
return false;
}
Else return true;
}
8. Method called from main method, to check combination of username and password. The method has
Boolean return type. If username and password have same combination , method returns false and
display error message to user, otherwise it returns true.
Private Boolean checkCombination (String value1, String value2){
If(value1==value2) ;
{
DisplayError(“Please enter correct combination of username and password.”)
return false;
}
Else return true;
}
9. Method called from main method, to calculate and display account details of user.
Private void displayAccountDetails (String username,String accountType){
• Get user account information details by querying from database/dataset
User user= query username and account type to get account details
Int userbalance= user.balance;
String accountTitle= user. accountTitle;
String accountNumber= user. accountNumber;
• Get user account transaction details by querying from database/dataset
ArrayList<User> TransactionHistory= new ArrayList< User >();
String amountDeposited= TransactionHistory. amountDeposited;
String amountTransfered= TransactionHistory.amountTransfered;
String amountWithdraw= TransactionHistory. amountWithdraw;
String transactionDateTime= TransactionHistory. transactionDateTime;
• Get user interest transaction details by calling Interest subsystem.
Interest intObject=new Interest(username, transactionDateTime);
ArrayList< interest > interestDetails= new ArrayList< interest >();
String interestPercentage = interestDetails.percentage; Int interestAmount= interestDetails.interestAmount;
• Output subsystem is called to display account details.
Output outObj=new Output();
outObj.displayAccountHistory(user.getName(),accountType, userbalance, accountTitle,accountNumber, transactionDateTime, amountDeposited, amountTransfered, amountWithdraw, interestPercentage, interestAmount );
} // end displayAccountDetails
} // end class
5. 2 DepositWithdraw Subsystem:
Class DepositWithdraw {
1. Declaration of variables and graphics buttons.
String username;
Public String interestPercentage; Public String interestAmount; Button withdrawAmount;
Button depositAmount;
Button transferAmount; Date currentDate;
String AccountType;
2. Main Method starts here.
Void main {
3. Following trigger method will start itself If withdrawAmount button is pressed.
withdrawAmount.OnClick{
• Open dialog box on button click, set title and retrieve amount as input from user.
Dialog.open();
Dialog.setTitle(“Withdraw Amount”);
int amount= Integer.parse(Dialog.EnteredAmount);
• Following trigger method will start itself If dialog SUBMIT button is pressed.
Dialog.submit{
• If entered amount is empty, display error message to user.
If(amount.isEmpty){
Dialog.setError(“Please enter amount and try again”);} Else{
• Get Current date & time and set transaction type.
Date date= new Date();
String transactionType= “Withdraw”;
String DateTime=date.parse(new DateFormat(“dd/mm/yyy hh:mm”));
• Get user account information
User user= query username and account type (current or saving) to get account details
Int userbalance= user.balance;
int remainingBalance= (userbalance)- Integer.parse (amount);
• Calculate interest (on transaction amount) and get transaction interest details by calling
Interest subsystem.
Interest intObject=new Interest (username, DateTime, Integer.parse(amount)); ArrayList< interest > interestDetails= new ArrayList< interest >();
String interestPercentage = interestDetails.percentage; Int interestAmount= interestDetails.interestAmount; remainingBalance= (remainingBalance)- interestAmount;
String recordNo= call Random Number generator to produce 5 digits recordNo.
• Process transfer amount by saving recordNo, sender account number, receiver account number, Amount transferred, Interest accrued (amount & percentage), Transfer Date/Time and Remaining Amount in Account
• Output subsystem is called to display account withdrawal details.
Output outputObj=new Output();
outputObj.displayDepositWithdrawInfo(DateTime, amount, remainingBalance, interestPercentage, interestAmount, transactionType, AccountType);
}
}
Dialog.Cancel{ Dialog.exit();
}
} //end withdrawAmount.OnClick()
4. Following trigger method will start if depositAmount button is pressed. depositAmount.OnClick{
• Open dialog box on button click, set title and retrieve amount as input from user.
Dialog.open();
Dialog.setTitle(“Deposit Amount”);
Dialog.setMessage(“Please enter mount”);
int amount= Integer.parse(Dialog.EnteredAmount);
• Following trigger method will start if SUBMIT button is pressed.
Dialog.submit{
• If entered amount is empty, display error message to user.
If(amount.isEmpty){
Dialog.setError(“Please enter amount and try again”);
} Else{
• Get Current date & time and set transaction type.
Date date= new Date();
String DateTime=date.parse(new DateFormat(“dd/mm/yyy hh:mm”));
String transactionType= “Deposit”;
• Get user account information details by querying from database/dataset
User user= query username and account type to get account details
Int userbalance= user.balance;
int remainingBalance= (userbalance) + Integer.parse(amount);
• Calculate interest (on transaction amount) and get transaction interest details by calling
Interest subsystem.
Interest intObject=new Interest (username, DateTime, Integer.parse(amount));
ArrayList< interest > interestDetails= new ArrayList< interest >();
String interestPercentage = interestDetails.percentage;
Int interestAmount= interestDetails.interestAmount;
remainingBalance= (remainingBalance)- interestAmount;
String recordNo= call Random Number generator to produce 5 digits recordNo.
• Process Account deposit by saving Amount Deposited, Interest accrued (amount & percentage), depositor account information, DepositDate/Time and Remaining Amount in Account.
• Output subsystem is called to display account desposit details.
Output outputObj=new Output();
outputObj.displayDepositWithdrawInfo(DateTime, amount, remainingBalance,
interestPercentage, interestAmount, transactionType, AccountType);
}
}
Dialog.Cancel{
Dialog.exit();
}
} //end depositAmount.OnClick
5. Following trigger method will if transferAmount button is pressed. transferAmount.OnClick{
• Open dialog box on button click, set title and retrieve amount as input from user. Check limit
before opening.
if(isUserTransactionLimitExeeded(DateTime,user.accountNumber)==true){
Dialog.setError(“You have reached Money Transfer limit of this month.”)
} Else{
Dialog.open();
Dialog.setTitle(“Transfer Amount”);
Dialog.setMessage(“Please enter Amount and Sender’s Account No.”);
int amount= Integer.parse(Dialog.EnteredAmount);
• Following trigger method will start if SUBMIT button is pressed.
Dialog.submit{
String amount= get input of amount;
String receiverAccountNum= get input of receiver’s account no;
• Get Current date & time.
Date date=new Date();
String DateTime=date.parse(new DateFormat(“dd/mm/yyy hh:mm”));
User user= query username and account type to get account details
• If entered amount is empty, display error message to user
If(amount.isEmpty){
Dialog.setError(“Please enter amount and try again”);
}
Else if(isReceiverAccountNumVerified(receiverAccountNum)==false){ Dialog.setError(“Receiver account No. is not verified. Please try again.”);
}
Else{
• Get user account information details by querying from database/dataset
Int userbalance= user.balance;
String accountTitle= user. accountTitle;
String accountNumber= user. accountNumber;
• Calculate interest (on transaction amount) and get transaction interest details by calling
Interest subsystem.
Interest intObject=new Interest (username, DateTime, Integer.parse(amount)); ArrayList< interest > interestDetails= new ArrayList< interest >();
String interestPercentage = interestDetails.percentage;
Int interestAmount= interestDetails.interestAmount;
remainingBalance= (remainingBalance)- interestAmount;
String recordNo= call Random Number generator to produce 5 digits recordNo.
• Process Account transfer by saving record number, Amount transferred, Interest accrued (amount & percentage),transferDate/Time, Remaining Amount in Account and sender & receiver account number.
• Output subsystem is called to display transfer account details.
Output outputObj=new Output();
outputObj.displayTransferInfo(DateTime, amount, remainingBalance, interestPercentage, interestAmount, accountType, senderAccountNo, receiverAccountNo, senderAccountTitle, receiverAccountTitle, senderAccountTitle);
}
}
Dialog.Cancel{
Dialog.exit();
}
}// end main if
} //end transferAmount.OnClick
} // end main
} // end class
5. 3 Interest Subsystem:
Class interest{
1. Declare Variables.
String username;
Date transactionDateTime;
Public String interestPercentage;
Public String interestAmount;
public int originalAmount;
2. Constructor called from AccountAccess subsystem.
public void interest (String uname,Date interestDate){
this.username=uname;
this. transactionDateTime= interestDate;
getInterestDetails();
}
3. Constructor called from DespositWithdraw subsystem.
public void interest (String uname,Date interestDate,int amount){
this.username=uname;
this. transactionDateTime= interestDate;
this.originalAmount=calculateInterest();
}
public void getInterestDetails {
Object interest= query username and transactionDateTime to get interest accrued for transaction
interestPercentage =Interest.percentage;
interestAmount =Interest. interestAmount;
}
public void calculateInterest {
int interestRate= get interest rate
• Calculate interest amount deducted.
interestAmount =String.valueOf(originalAmount* (interestRate/100));
interestPercentage =String.valueOf(interestRate);
• Save InterestAmount, username and transactionDateTime in username so that interest details can be retrieved by AccountAccess subsystem by calling getIntestDetails() Method
}
} // end main
} // end class
5. 3 Output Subsystem:
Class Output{
1. Method called from AccountAccess subsystem to display Account Information.
Public Void
displayAccountHistory (String name, String accountType, int userbalance, String accountTitle, String accountNumber, String transactionDateTime, String amountDeposited, String amountTransfered, String amountWithdraw, String interestPercentage, String interestAmount){
|
1. |
Display(“Account details for ”+ name +” of” +accountType+” Account are as followed:”); |
|
2. |
Display(“**********Account History: Details**********”); |
|
3. |
Display(“Account Balance :” +userbalance); |
|
4. |
Display(“Account Title :” + accountTitle); |
|
5. |
Display (“Account No. :” + accountNumber); |
|
6. |
Display (“Account Type. :” + accountType); |
|
7. |
Display(“**********Account History: Transactions**********”); |
|
8. |
Display(“Transaction Date and Time :” + transactionDateTime); |
|
9. |
Display(“Amount Deposited :” + amountDeposited); |
|
10. |
Display(“Amount Transferred :” + amountTransfered); |
|
11. |
Display(“Amount Withdraw :” + amountWithdraw); |
|
12. |
Display(“Interest Accrued (%) :” + interestPercentage); |
|
13. |
Display(“Interest Accrued (Amount) :” + interestAmount); |
2. Method called from DespositWithdraw subsystem display Account deposit and withdraw
Information.
public void displayDepositWithdrawInfo(String DateTime, int amount, int remainingBalance, String interestPercentage, String interestAmount, String transactionType,String accountType)
{
|
1. |
If(transactionType == “Withdraw”) |
|
2. |
{ |
|
3. |
Display(“Amount Withdrew successfully.”) ; |
|
4. |
Display(“**********Account Withdraw Details**********”); |
|
5. |
Display(“Amount Withdrew :” + amount); |
|
6. |
} |
|
7. |
Else |
|
8. |
{ |
|
9. |
Display(“Amount deposited successfully.”) ; |
|
10. . |
Display(“**********Account Deposit Details**********”); |
|
11. |
Display(“Amount Deposited :” + amount); |
|
12. |
} |
|
13. |
Display(“Account Balance :” + remainingBalance); |
|
14. |
Display(“Account Type :” + AccountType); |
|
15 |
Display(“Amount Deposited: “ +amountDeposited); |
|
16 |
Display(“Interest Accrued (%) :” + interestPercentage); |
|
17 |
Display(“Interest Accrued (Amount) :” + interestAmount); |
|
18 |
Display(“Transaction Date and Time :” + DateTime); |
}
3. Method called from DespositWithdraw subsystem display Account transfer Information.
public void displayTransferInfo(String DateTime, String amount, String remainingBalance, String interestPercentage, String interestAmount, String accountType, String senderAccountNo, String receiverAccountNo, String receiverAccountTitle, String senderAccountNo, String senderAccountTitle)
{
|
1. |
Display(“Amount transferred successfully.”) ; |
|
2. |
Display(“**********Account Transfer Details**********”); |
|
3. |
Display(“Amount Transferred :” + amount); |
|
4. |
Display(“Account Balance :” + remainingBalance); |
|
5. |
Display(“Interest Accrued (%) :” + interestPercentage); |
|
6. |
Display(“Interest Accrued (Amount) :” + interestAmount); |
|
7 |
Display(“Transaction Date and Time :” + DateTime); |
|
8. |
Display(“Receiver Account No. :” + receiverAccountNo); |
|
9. |
Display(“Receiver Account Title :” + receiverAccountTitle); |
|
10. |
Display(“Sender Account No. :” + senderAccountNo); |
|
11. |
Display(“Sender Account Title :” + senderAccountTitle); |
}
} // end class
Group 3 – Project Design Page 32