Likes

Software engineering Lab@home 3 ans 2


The design team at Janes Technologies has identified the various classes involved in the ATM withdrawal process. The team now wants to depict the interaction between various objects using a sequence diagram. Help the team to create the sequence diagram.


Solution


To create the activity diagram of the cash withdrawal process, you need to perform the following tasks:
1. Identify activities and decisions.
2. Identify partitions.
3. Create an activity diagram.
Identifying Activities and Decisions
A process consists of various activities that you need to identify before you can establish control flow among them. The sequential activities for the cash withdrawal process are:
• Insert Card: Signifies the activity to insert the ATM card in the ATM.
• Enter PIN: Signifies the activity of the bank customer to enter the PIN.
• Accept PIN: Signifies the activity of ATM machine to accept the PIN.
• Validate PIN: Signifies the activity of ATM card to validate the PIN.
• Display Invalid Card Message: Signifies the activity of ATM to display an invalid message, if the PIN entered by the user is incorrect.
• Prompt User Input: Signifies the activity of ATM to prompt the user to initiate a transaction.
• Initiate Withdrawal: Signifies the activity for the bank customer to initiate the cash transaction.
• Prompt User for Withdrawal Amount: Signifies the activity of ATM to prompt the user to enter the amount in the system.
• Enter Amount: Indicates the activity to enter the amount in the system.
• Check Available Balance: Signifies the activity of bank account to check the available balance in the user's account.
• Display Insufficient Balance Message: Signifies the activity of ATM to display a message for insufficient balance to the user.
• Prompt User to Continue: Signifies the activity of ATM to ask the user to continue.
• Collect Cash: Indicates the activity of the bank customer to take the money from the ATM machine.
• Supply Cash: Signifies the activity of ATM to supply cash to the customer.
• Eject Card: Indicates the activity of the bank customer to take the card back from the ATM machine.
The following decisions are made in the process of withdrawing money:
• Validate PIN: Confirms the validation of the PIN entered by the user. If it is invalid, the system prompts the customer to enter another PIN.
• Check Available Balance: Checks the available balance in the account. If the amount withdrawn by the user is greater than the available balance, the system prompts the user to enter an amount less than the available balance.
Identifying Partitions
Partitioning is done to logically group the activity states so that each group represents the responsibility of a particular class. To partition the activity states, you need to create swim lanes for the following classes:
• Bank Customer
• ATM
• ATM Card
• Account


No comments: