Likes

Software engineering Lab@home 4 ans 1



The design team at Janes Technologies has been assigned a task to create a state chart diagram for the InfoSuper bank ATM system. For this, the team needs to perform the following tasks:
. Identify the states of the ATM.
. Identify events responsible for state changes.
. Model the flow of control between the states of the ATM.

Solution


To create the state chart diagram for the InfoSuper bank ATM system, you need to perform the following tasks:
1. Identify states.
2. Identify events and transitions.
3. Model the flow of control between the states.
Identifying States
The following states can be attained by an ATM system:
• Reading ATM Card
• Authenticating Customer
o Reading PIN
o Sending to Bank System for Validation
• Accepting Transaction Type
• Accepting Transaction Details
• Sending to Bank System for Approval
• Processing Transaction
• Prompting for Another Transaction
• Handling Invalid PIN
• Dispensing Cash
• Printing Slip
• Ejecting Card
Identifying Events and Transitions
The following events and transitions take place in the state machine diagram:
• When a customer inserts a card into the ATM machine, the state of the machine changes from initial state to Reading ATM Card.
• When a customer inserts a PIN. the state of the machine changes from Reading ATM Card to Reading PIN. which is the sub state of the Authenticating Customer state.
• To authenticate the PIN. the state changes from Reading PIN to Sending to Bank System for Validation. If the customer enters a valid PIN. the state changes to Accepting Transaction Type. Otherwise, it changes to Handling Invalid PIN.
• If the customer enters the PIN maximum number of times, the state changes to Ejecting Card. Otherwise, it changes to Authenticating Customer state.
• After successful authentication of a PIN. the state changes to Accepting Transaction Type.
• When the customer selects the transaction type, such as Cash Withdrawal or PIN change, the state changes to Accepting Transaction Details.
• When the customer enters the transaction details, the state changes to Sending to Bank System for Approval. If the transaction is approved by the Bank System, the state changes to Processing Transaction. Otherwise.it changes to Prompting for Another Transaction.
• Similarly, if the customer selects cash withdrawal as the type of the transaction.the state changes from Processing Transaction to Dispensing Cash. However, if the customer selects to get the transaction summary, the state changes to Printing Slip.
• When the transaction is complete, the state changes to Prompting for Another Transaction.
• If the customer does not wish to continue for another transaction, the state changes from Prompting for Another Transaction to Ejecting Card. However, if the customer wishes to continue, the state changes to Accepting Transaction Type.


No comments: