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. Help the team at Janes Technologies to perform this task.
Ans 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.
2. The design team at Janes Technologies has been assigned a task to model the flow of activities required to be performed for withdrawing cash from an ATM. For this, the team needs to create an Activity diagram. Help the team at Janes Technologies to create the Activity 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
Identify the states of the ATM.
Identify events responsible for state changes.
Model the flow of control between the states of the ATM. Help the team at Janes Technologies to perform this task.
Ans 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.
2. The design team at Janes Technologies has been assigned a task to model the flow of activities required to be performed for withdrawing cash from an ATM. For this, the team needs to create an Activity diagram. Help the team at Janes Technologies to create the Activity 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
DATA STRUCTURE, CORE JAVA, JAVA TUTORIAL, JAVA STUDY, JAVA TECH, JAVA PROJECTS, JAVA ASSIGNMENTS, NIIT PROJECTS, NIIT ASSIGNMENMENTS, NIIT CYCLE TESTS, NIIT LAB@HOME, NIIT EXAMS MT, NIIT PMR, NIIT NOTES AND MUCH MORE GO TO https://solutionrk.blogspot.in/
ReplyDelete