Sunday 21 May 2017

Software Eng Lab@home 3 ~ NIIT POST

1.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. 
Ans  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


2. The design team at Janes Technologies has created the sequence diagram for representing the order of the messages in a time sequence. Now, the design team wants to create a UML diagram focusing more on the collaborations of objects than the time sequence. Help team to perform this task.


Ans To create the communication diagram for the cash withdrawal process, you need to perform the following tasks:
1. Identify the collaboration and interactions.
2. Create the communication diagram.
Identifying the Collaboration and Interactions

Class/Actor Responsibilities
Bank Customer Inserts the card. Provides PIN. States the amount to be withdrawn.
ATM Accepts and reads the card information. Prompts the user for input. Accepts PIN from the user. Initiates the validation of PIN. Accepts inputs from the user. Checks the account balance of a customer. Supplies cash to a customer. Initiates the action of balance update. Generates the receipt of any transaction. Ejects the card after the transaction is complete.
ATM Card Validates PIN.
Account Retrieves the balance in the user's account. Updates the balance in the account after a transaction.

No comments:

Post a Comment