Sei sulla pagina 1di 19

LABORATORY-1

USE CASE AND CLASS DIAGRAMS

Draw the following diagrams using Argo UML Case tool for an ATM Case Study;
Use Case Diagram
Class Diagram

USE CASE DIAGRAM

FIGURE 1. USE CASE DIAGRAM FOR ARM CASE STUDY


DESCRIPTION
Actors: Operator, Customer, Bank
Use Cases: System start up, System Shutdown, Session, Transaction, Withdrawal, Deposit,
Transfer, Inquiry, Invalid PIN.
The actor 'operator' is associated with the use cases 'system start up' and 'system
shutdown'.
The actor 'customer' is associated with the use case 'session'.
The actor 'Bank' is associated with use case 'transaction'.
The use case 'session' includes the use case 'transaction'.
The use cases 'withdrawal', 'deposit', 'transfer' and 'inquiry' are generalized into the
use case 'transaction'.
The use case 'invalid PIN' extends the use case 'transaction'.
The actor 'Operator' is associated with administrator, who starts up and shuts down the system.
When we enter into an ATM as a Customer, we have following tasks to perform that includes
We need to enter our card and the pin. If the pin entered is invalid, it throws an error.
If the customer logged in successfully, the customer chooses one of the following
tasks from the transaction options, i.e., withdrawal, inquiry, transfer or deposit.
The selected transaction is handled by the bank
CLASS DIAGRAM

FIGURE 2. CLASS DIAGRAM FOR ATM CASE STUDY

DESCRIPTION
ATM Case Study has following classes:

Money, Message, Balances, Log, Status, Receipt, Cash Dispenser, Envelope Acceptor, Network
to bank, Customer Console, ATM, Card Reader, Operator Panel, Receipt Printer, Session, Card,
Transaction, Withdrawal, Deposit, Transfer, Inquiry, Account Information.
The classes Withdrawal, Deposit, Transfer, Inquiry are generalized into transaction.
The classes Cash Dispenser, Envelope Acceptor, Network to Bank are generalized into
Log.
The classes Card Reader, Customer Console, Cash Dispenser, Operator Panel, Network to
bank, Envelope Acceptor are aggregated into ATM class.
Withdrawal, Deposit, Transfer, Inquiry are dependent on Account Information.
Customer Console uses Receipt, Money, Balances, Receipt Printer.
Card Reader, Transaction, Session is dependent on card.
Transaction is aggregated into session and associated with ATM class.
Network to Bank uses status, Message, Balances.
Log class uses status, Message, Balnaces.

LABORATORY-2

INTERACTION AND ACTIVITY DIAGRAMS

Draw the following diagrams using Argo UML Case tool for an ATM Case Study;
Sequence Diagrams
Collaboration/Communication Diagram Activity diagram
Swim Lane Diagram
SEQUENCE DIAGRAM FOR STARTUP

FIGURE 3. SEQUENCE DIAGRAM FOR STARTUP


DESCRIPTION
This sequence diagram gives an idea about the start-up of a ATM machine. It shows how the
connections are performed to set the ATM up.
The main lifelines of the diagram are:
Operation Panel: The operation panel is the hardware which switches the ATM on.
ATM: The machine which is to be started
Cash Dispenser: A program which dispenses the cash and sets the initial amount
Network to bank: To establish a connection with the bank
The operation panel is switched on and the ATM sends a request asking for initial cash. This
initial cash data will be sent to the cash dispenser and a connection is requested to the bank.
COMMUNICATION/COLLABORATION DIAGRAM

FIGURE 4. COLLABORATION/COMMUNICATION DIAGRAM


DESCRIPTION
Objects: Deposit , Message, NetworkToBank , Receipt, CustomerConsole, EnvelopeAcceptor .
Sequence: 1.Message
2.createMessage()
3.acceptEnvelope()
4.createReceipt()
5.send (message, balances)
6.receipt

Here first call is message which is equal to get specifies from customer method when
deposit is made.
There is another method of receipt as well associated with the first object
When the first method is invoked and done then the create message method is invoked

The envelope acceptor method is associated with the object envelope acceptor and it is
the third method in the sequence
Then the create receipt method is invoked and it is related to network to bank object and
receipt object
Later send method with message and balances as parameters is invoked which is the fifth
method and associated with message object
At last the receipt call is done with complete transaction method which is linked to
customer console object
When the money is deposited in a bank the following tasks are carried out
A message is generated by firstly taking the specifics from the customer, Envelope is
accepted from the envelope acceptor and a receipt is created by using network from the bank and
details like balances are obtained which are later sent in the message to the customer.
ACTIVITY DIAGRAM FOR A TRANSACTION

FIGURE 5. ACTIVITY DIAGRAM FOR TRANSACTION


DESCRIPTION
The activity diagram shows a basic ATM transaction. The main components of the diagram are
the actions which which will be performed during the tranasaction. It also gives the flow of how
these actions will be performed.
The process goes like this:
The customer inserts the card into the ATM
The, password is given by the customer.

If the password is correct the transaction type will be asked else, a password not accepted
message will be shown and the password is asked again
Once the transaction type is taken then, the transaction is performed
If there are no more transactions the card is taken back by the customer

SWIMLANE DIAGRAM FOR WITHDRAWAL

FIGURE 6. SWIMLANE DIAGRAM FOR WITHDRAWAL

DESCRIPTION
The Swim Lane Diagram for withdrawal includes the participation of 3 objects: Customer,
ATM Machine and Bank.
This diagram shows the actions performed by each object and the flow of these actions.
The object Customer performs the following actions or makes use of the following Use cases:
Inserting/Taking the card
Enter PIN,
Enter Amount
Take Money.
The object ATM Machine makes use of the following Use cases:
Validate ATM Card, Show Balance, Eject Card.
The object Bank makes use of the following Use cases:
Authorize PIN, Check Balance, Debit Account.
The ATM Card is first inserted by the Customer, which the ATM validates. If invalid, the card is
ejected. If valid, the customer enters the PIN, which is authorised by the Bank. If the PIN is
valid, the Customer enters the Amount. The Bank checks the Balance in the Account and debits
the money accordingly. Transaction is completed and the card is ejected. Decision boxes after
each check-point continues the transaction or cancels it.

LABORATORY-3
STATE CHART DIAGRAMS

Demonstrate modelling the behaviour of the ATM system and sub systems by constructing state
chart diagram and construct the model using Argo UML case tool
STATE CHART DIAGRAM OF ATM

FIGURE 7: STATE CHART DIAGRAM OF ATM


DESCRIPTION
This State Chart Diagram shows the various states of an ATM machine in its lifetime.
The three states the machine can be in are: IDLE, MAINTENANCE and ACTIVE
IDLE: When the machine is in this state, it's not being used by any user.

MAINTENANCE: If the machine is in this state, it means it's undergoing


maintenance/servicing, which is a periodic process.
ACTIVE: ATM in this state means that it's being used by a user and the following are the actions
performed by it in this state:
Validating : Validations of the cards and PIN are checked.
Selecting: Transaction options are selected.
Processing: Transaction is processed.
Printing: Receipt is printed.

Demonstrate modelling the behaviour of an object (life cycle) using a state chart diagram and
construct the model using Argo UML case tool
STATE CHART DIAGRAM FOR MAINTENANCE OF ATM

FIGURE 8: MAINTENANCE OF ATM-CONCURRENCY


DESCRIPTION
This state chart diagram shows various states of ATM during maintenance.
The two states machine can be in are: Idle and Maintenance .
IDLE: When the machine is in this state, it's not being used by any user.
MAINTENANCE: If the machine is in this state, it means its undergoing
maintenance/servicing, which is a periodic process.
Again in the maintenance in testing,
Testing: Testing of the process and working is done.
Self diagnosis: If there are any errors self diagnosis is done.
While commanding,
Waiting: The system waits until it gets a command and gets a command by key press.

Command: commands are passed to the machine to continue.


STATE CHART DIAGRAM OF ATM- TRANSACTION

FIGURE 9: STATE CHART DIAGRAM FOR A TRANSACTION


DESCRIPTION
This is a State Chart Diagram for a transaction shows the steps that take place in order to
withdraw the cash from an ATM. The main actions performed in one withdrawal session are:
Reading Card: This checks if the card is placed/inserted in the correct fashion.
Reading PIN: This action checks if the PIN entered by the customer is correct and
proceeds further.
Choosing Transaction: This action helps us in choosing the required transaction from
the available options.
Performing Transaction: The desired transaction is performed and the customer is
served.
Ejecting Card: The card is ejected once the transaction is completed or due to any
errors/cancellations occurring midway in a transaction.
The ATM card inserted is read first and if the correct PIN is entered, proceeds further to
start a transaction, after completing which, the card is ejected.

LABORATORY-4
COMPONENT AND DEPLOYMENT DIAGRAMS

Draw the following diagrams using Argo UML Case tool for an ATM Case Study:
Component Diagram
Deployment Diagram
COMPONENT DIAGRAM-ATM

FIGURE 10: COMPONENT DIAGRAM OF ATM


DESCRIPTION
There are six components in component Diagram of ATM. They are
Bank Database
ATM
ATM Client
Cash Dispenser
Card Scanner
Printer
Here we use a technique called elision where we hide the details.
When Client inserts ATM Card in ATM, details are read using Card Scanner.
The details of the client is verified using bank database.
After the verification, client can choose any one of the following tasks. They are: printer, Cash
Dispenser
DEPLOYMENT DIAGRAM OF ATM

FIGURE 11: DEPLOYMENT DIAGRAM OF ATM


DESCRIPTION
Deployment diagram consists of four nodes and 6 components:
The Node Regional ATM Server consists of ATM as component.
The Node Bank Database Server consists of Bank Database as component.
The Node Bank ATM consists of Printer, Card Scanner, ATM Client and Cash Dispenser
as components.
Regional ATM Server is connected to Bank Database Server and Bank ATM using Wide Area
Network.
When ATM card is inserted, details are read by Card Scanner and details of card owner are
given by bank database server and depends on the client, he can print the statement or
withdraws money using cash dispenser component.

LABORATORY-5
TEST DESIGN

Design test cases for the use cases shown in Figure 12. by creating a test case sheet. Design at
least two test cases, one for normal flow of control and one for any exception that may occur.

FIGURE 12. USE CASE DIAGRAM FOR ATM CASE STUDY

Use Case

Test Case

Precondition

Input Conditions

Expected Output

System start up System is started when switch


is turned ON

System is OFF

Activate ON
switch

System shut
down
Session

System is shut down when


switch is turned OFF
System reads customers ATM
Card
System reads customers ATM
Card

System is OFF
System is ON

Activate OFF
switch
Insert ATM card

System is ON

Insert ATM card

Session

System accepts customer PIN

System asks for


entry of PIN

Enter the PIN

Session

System allows customer to


perform a transaction

System displays
transaction types

Perform a
transaction

Session

Session ends when customer


chooses not to do another
transaction

System is asking
whether customer
wants another
transaction

NO

System allows customer to


withdraw
System allows customer to
withdraw

Customer chooses
withdraw
Customer chooses
withdraw

Customer enters an
amount to withdraw
Customer enters an
amount to withdraw

System allows customer to


deposit amount
System allows customer to
deposit amount

Customer chooses
deposit
Customer chooses
deposit

Customer enters an
amount to deposit
Customer enters an
amount to deposit

Transfer

System allows the customer


to transfer the amount

Customer chooses
transfer.

Transfer

System allows the customer


to transfer the amount

Customer chooses
transfer

Inquiry

System allows the customer


Customer chooses
to check the details of account inquiry

Customer enter the


details of account
number of other
person
Customer enter the
details of account
number of other
person
Customer enter the
details of account.

Session

Transaction
Transaction
Withdraw
Withdraw
Deposit
Deposit

System is in
working
Condition
System is off
Card is accepted.
Enter the PIN
Card is
unaccepted.
Reject the card
System displays
menu of
transaction types
System asks
whether need
another type of
transaction
System ejects a
card and can start
a new session

Cash Dispenser
dispenses cash
Error
No sufficient
Balance
Amount is
deposited
Amount selected
is below the
deposit limit
Successful
transaction
Account Number
is Incorrect
Statement is
displayed

Potrebbero piacerti anche