State Diagram for Online Banking System
State Diagrams are used to model and present the dynamic nature of a system. State Diagrams consists of different states which represent an activity or an action corresponding to an event. An event causes the transitions from a state to another state in the state diagram. Hence a state diagram is a pictorial representation of the flow of control with respect to either internal or external events.
The State Diagram of an Online Banking System is as follows –
The State Diagram for Online Banking System is described as below –
- The user can access services by logging in the system using valid login credentials which are unique for every registered customer at the bank. As the first state in the diagram represents the action to enter login credentials to verify and validate the user. However, if the login credentials are incorrect there occurs a transition to the next state to display the error message. Also, the user can now retry to log in the system. After several attempts, if the user fails to enter the correct OTP(One Time Password) the user can not try again and the process encounters a final state.
- If the user credentials are verified the user is allowed to either check balance or get details of a cheque under processing or avail other services offered by the bank.If the action is to check balance, the system retrieves the data for the user from the database and the balance in the account of the user is displayed in the next state. The process to check balance terminates and the process encounters the final stage.
- However if the user chooses to initiate a transaction, the user selects to initiate a transaction represented as a specific state in the diagram. Also, an after the transaction is successfully initiated the user has to select the account type in the next state. The user selects the account, which acts as an internal event to trigger the next state which allows the user to enter the amount to be transacted over. After the transaction is executed the flow of control again shifts to check balance where the user can check the balance in the account after the transaction. The process again terminates as described above at the final stage.
- The user can also enlist cheques, approve cheques and get cheque details in favour of the user at the bank which is also represented as actions with directed associations in the diagram.
- The user can avail other E-Banking Services where the user can get smart cards. The initiation of the process leads to the next state where the user can submit the details to initiate the registration to get a smart card.
- At the end the user can update the account details and exit from the system which is the final state as represented in the diagram.
Hence a State Diagram is able to show the response or behaviour of all the classes in the system to external or internal stimuli.