0% found this document useful (0 votes)
13 views21 pages

Ooad Lab Expt1

The document outlines various experiments related to the design and implementation of an ATM system using different UML diagrams, including class diagrams, use case diagrams, sequence diagrams, collaboration diagrams, state chart diagrams, activity diagrams, and component diagrams. Each section details the aim, purpose, procedure, and inferences of the respective diagram, emphasizing the modeling of both static and dynamic aspects of the ATM system. The experiments aim to enhance understanding of system functionalities, interactions, and the overall architecture of the ATM system.

Uploaded by

indesk tech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views21 pages

Ooad Lab Expt1

The document outlines various experiments related to the design and implementation of an ATM system using different UML diagrams, including class diagrams, use case diagrams, sequence diagrams, collaboration diagrams, state chart diagrams, activity diagrams, and component diagrams. Each section details the aim, purpose, procedure, and inferences of the respective diagram, emphasizing the modeling of both static and dynamic aspects of the ATM system. The experiments aim to enhance understanding of system functionalities, interactions, and the overall architecture of the ATM system.

Uploaded by

indesk tech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

A) Name of the experiment: Class diagram for ATM System

1. AIM: To design and implement ATM system through Class Diagram

Purpose:

The purpose of the class diagram is to model the static view of an application. The class diagrams are
the only diagrams which can be directly mapped with object oriented languages and thus widely used
at the time of construction. The UML diagrams like activity diagram, sequence diagram can only give
the sequence flow of the application but class diagram is a bit different. So it is the most popular UML
diagram in the coder community. So the purpose of the class diagram can be summarized as:

• Analysis and design of the static view of an application.


• Describe responsibilities of a system.
• Base for component and deployment diagrams.
• Forward and reverse engineering.

Contents:

Class diagrams commonly contain the following things

• Classes
• Interfaces
• Collaborations
• Dependency, generalization and association relationships

Procedure:-
Step1: First Classes are created.
Step2: Named as PinValid, Account Type, Transaction, Update, Server, Customer classes are
created.
Step3: Appropriate relationships are provided between them as association.

1
DIAGRAM:

Inferences:

1. understand the concept of classes


2. identify classes and attributes and operations for a class
3. model the class diagram for the system

Applications:
Online transaction
Online banking

2
B) NAME OF EXPERIMENT: Use case diagram for ATMSystem.

AIM: To design and implement ATM System through Use case Diagram.

Purpose:

The purpose of use case diagram is to capture the dynamic aspect of a system. Because other four
diagrams (activity, sequence, collaboration and State chart) are also having the same purpose. So we
will look into some specific purpose which will distinguish it from other four diagrams. Use case
diagrams are used to gather the requirements of a system including internal and external influences.
These requirements are mostly design requirements. So when a system is analyzed to gather its
functionalities use cases are prepared and actors are identified.

So in brief, the purposes of use case diagrams can be as follows:

• Used to gather requirements of a system.


• Used to get an outside view of a system.
• Identify external and internal factors influencing the system.
• Show the interacting among the requirements are actors.

Procedure:

Step1: First an Actor is Created and named as User/Customer.

Step2: Secondly a system is created for ATM.

Step3: A use case Enter PIN, Withdraw money is created and connected with user as association
relationship.

Step4: Similarly various use cases like Deposit money, Balance Enquiry, Manage Account etc are
created and appropriate relationships are associated with each of them.

3
DIAGRAM:

Enter PIN

Withdraw Money

Balance enquiry

ATM admin
Customer
Deposit

Abort/ Cancel

Print Receipt

Manage Account

Withdrawal UseCase

A withdrawal transaction asks the customer to choose a type of account to withdraw from (e.g.
checking) from a menu of possible accounts, and to choose an amount from a menu of possible
amounts. The system verifies that it has sufficient money on hand to satisfy the request before sending
the transaction to the bank. (If not, the customer is informed and asked to enter a different amount.) If
the transaction is approved by the bank, the appropriate amount of cash is dispensed by the machine
before it issues a receipt. A withdrawal transaction can be cancelled by the customer pressing the
Cancel key any time prior to choosing the amount.

Deposit UseCase

A deposit transaction asks the customer to choose a type of account to deposit to (e.g. checking) from
a menu of possible accounts, and to type in amount on the keyboard. The transaction is initially sent to
the bank to verify that the ATM can accept a deposit from this customer to this account. If the

4
transaction is approved, the machine accepts an envelope from the customer containing cash and/or
checks before it issues a receipt. Once the envelope has been received, a second message is sent to the
bank, to confirm that the bank can credit the customer‟s account – contingent on manual verification
of the deposit envelope contents by an operator later.

A deposit transaction can be cancelled by the customer pressing the Cancel key any time prior to
inserting the envelope containing the deposit. The transaction is automatically cancelled if the
customer fails to insert the envelope containing the deposit within a reasonable period of time after
being asked to do so.

InquiryUseCase

An inquiry transaction asks the customer to choose a type of account to inquire about from a menu of
possible accounts. No further action is required once the transaction is approved by the bank before
printing the receipt. An inquiry transaction can be cancelled by the customer pressing the Cancel key
any time prior to choosing the account to inquire about.

Validate User Usecase:

This use case is for validate the user i.e. check the pin number, when the bank reports that the
customer‟s transaction is disapproved due to an invalid PIN. The customer is required to re-enter the
PIN and the original request is sent to the bank again. If the bank now approves the transaction, or
disapproves it for some other reason, the original use case is continued; otherwise the process of re-
entering the PIN is repeated. Once the PIN is successfully re-entered

If the customer fails three times to enter the correct PIN, the card is permanently retained, a screen is
displayed informing the customer of this and suggesting he/she contact the bank, and the entire
customer session is aborted.

Print Bill usecase

This usecase is for printing corresponding bill after transactions (withdraw or deposit, or balance
enquiry, transfer) are completed.

Manage Account

This use case is for updating corresponding user accounts after transactions (withdraw or deposit or
transfer) are completed.

5
RESULT:

Inferences:
1. Identification of use cases.
2. Identification of actors.

INTERACTIONDIAGRAMS

We have two types of interaction diagrams in UML. One is sequence diagram and the other is
a collaboration diagram. The sequence diagram captures the time sequence of message flow from one
object to another and the collaboration diagram describes the organization of objects in a system
taking part in the message flow.

So the following things are to be identified clearly before drawing the interaction diagram:

1. Objects taking part in the interaction.


2. Message flows among the objects.
3. The sequence in which the messages are flowing.
4. Object organization.

Purpose:

1. To capture dynamic behavior of a system.


2. To describe the message flow in the system.
3. To describe structural organization of the objects.
4. To describe interaction among objects.

Contents of a Sequence Diagram

Objects
Focus of control
Messages
Life line

Contents of a Collaboration Diagram

Objects
Links
Messages

C) NAME OF EXPERIMENT: Sequence diagram for ATMSystem.

AIM: To design and implement ATM System through Sequence Diagram.

6
Procedure:-

Step1: First An actor is created and named as user.

Step2: Secondly an object is created for Atm.

Step3: Timelines and lifelines are created automatically for them.

Step4: In sequence diagram interaction is done through time ordering of messages. So appropriate
messages are passed between user and ATM is as shown in the figure.

DIAGRAM:

ATM ADMIN

check pin no

pin valid/invalid

check account

display status

check amount

display status

Update account

7
D) NAME OF EXPERIMENT: collaboration for ATMSystem.

AIM: To design and implement ATM System through Collaboration diagram.

Procedure:-

Step1: First an actor is created and named as user.

Step2: Secondly an object is created for ATM.

Step3: In collaboration diagram interaction is done through organization.

Step4: So appropriate messages are passed between user and ATM as shown in the figure.

DIAGRAM:

1: check pin no
3: check account
5: check amount
7: update account
AT ADMIN
M

2: pin valid/invalid
4: display status
6: display status

8
WITHDRAWUseCase:

SEQUENCE DIAGRAM

customer :ATM :Bank


machine server
1: Insert
Card

2: Validate Pin

3: Validate

4: Choose Transaction

5: Withdraw
6: Check Balance

7: Sufficiant Balance

8: Creadit cash

9: Insufficiant Balance

10: Low balance

COLLABORATION DIAGRAM

custome 1: Insert Card


r 4: Choose Transaction

5: Withdraw
8: Creadit cash : ATM
10: Low balance machine

3: Validate
7: Sufficiant Balance
9: Insufficiant Balance

2: Validate Pin
6: Check Balance

: Bank
server

9
ENQUIRYUseCase:
SEQUENCE DIAGRAM:

customer
:session :Bank
server
1: Insert
Card

2: Obtain Pin

3: Enter Pin

4: Send Pin

5: Request

6: Obtain types ofenquiry

7: Type

8: Get a/c no's

9: seif

10: Bal enquiry

11: Current bal

12: Transaction history

13: Previous trans

14: Viewa/c details

15: Display(a/c no,bal,names)

10
COLLABARATION DIAGRAM:

custome
r
1: Insert Card
7: Type

9: seif
3: Enter Pin
5: Request
6: Obtain types of enquiry

:session
11: Current bal
13: Previous trans
15: Display(a/c no,bal,names)

2: Obtain Pin
4: Send Pin
8: Get a/cno's
: Bank
10: Bal enquiry
server
12: Transactionhistory
14: View a/c details

DEPOSITUseCase:

SEQUENCE DIAGRAM:

customer :ATM :Bank server


machine
1: Insert card

2: Obtain Pin

3: Enter Pin

4: Validate Pin

5: Valid Pin

6: Enter deposit amt

7: Deposit Amt 8: Open deposit slot

9: Insert Envelop amt slot

10: Enveloprecived

11
COLLABARATION DIAGRAM:

1: Insert card
3: Enter Pin
custome 7: Deposit Amt
r

2: Obtain Pin : ATM


6: Enter deposit amt machine
8: Open deposit slot
9: Insert Envelop amt
slot 10: Envelop recived

5: Valid Pin
4: Validate Pin

: Bank
server

STATECHARTDiagram
State Chart diagram is used to model dynamic nature of a system. They define different states of an
object during its lifetime. And these states are changed by events. State chart diagram describes the
flow of control from one state to another state.
States are defined as a condition in which an object exists and it changes when some event is
triggered. But the main purpose is to model reactive system.

Contents
• Simply state and composite states
• Transitions, including events and actions

E) NAME OF EXPERIMENT: State chart diagram for ATMSystem.

AIM: To design and implement ATM System through State Chart diagram.

Purpose:

Following are the main purposes of using State chart diagrams:

1. To model dynamic aspect of a system.


2. To model life time of a reactive system.

12
3. To describe different states of an object during its life time.
4. Defines a state machine to model states of an object.

Procedure:-

Step1: First after initial state control undergoes transition to ATM screen.

Step2: After inserting card it goes to the state wait for pin.

Step3: After entering pin it goes to the state account verification.

Step4:. In this way it undergoes transitions to various states and finally reaches the ATM screen state
as shown in the fig.

DIAGRAM:

13
STATE CHART FOR ATM

idle enter/pressed ready

press [first digit>0]

next
enter/pressed validate invalid
number

valid

transactions cancel pressed cancel

complete cancelled

F) NAME OF EXPERIMENT: Activity diagram for ATM System.

AIM: To design and implement ATM System through Activity Diagram.

THEORY: An activity diagram shows the flow from activity to activity .An activity is an ongoing non
atomic execution within a state machine .Activities ultimately results in some action, which is made up
of executable atomic computations. We can use these diagrams to model the dynamic aspects of a
system.

Activity diagram is basically a flow chart to represent the flow form one activity to another . The
activity can be described as an operation of the system. So the control flow is drawn from one
operation to another. This flow can be sequential, branched or concurrent. Activity diagrams deals
with all type of flow by using elements like fork, join etc.

Contents

Initial/Final State, Activity, Fork & Join, Branch, Swim lanes

14
Fork
A fork represents the splitting of a single flow of control into two or more concurrent Flow of control.
A fork may have one incoming transition and two or more outgoing transitions, each of which
represents an independent flow of control. Below fork the activities associated with each of these path
continues in parallel.

Join
A join represents the synchronization of two or more concurrent flows of control. A join may have
two or more incoming transition and one outgoing transition. Above the join the activities associated
with each of these paths continues in parallel.

Branching
A branch specifies alternate paths takes based on some Boolean expression Branch is represented by
diamond Branch may have one incoming transition and two or more outgoing one on each outgoing
transition, you place a Boolean expression shouldn‟t overlap but they should cover all possibilities.

Swimlane:
Swimlanes are useful when we model workflows of business processes to partition the activity states
on an activity diagram into groups. Each group representing the business organization responsible for
those activities, these groups are called Swimlanes .

Procedure:-

Step1: First initial state is created.

Step2: After that it goes to the action state insert card.

Step3: Next it undergoes transition to the state enter pin

Step4: In this way it undergoes transitions to the various states.

Step5: Use forking and joining wherever necessary.

DIAGRAM:

15
Activity diagram for Transactions:

Activity diagram for Withdraw:

16
customer ATM bank serv er

insert card

enter PIN validate PIN

start transaction :validation


select [success]
transaction

:transaction
withdraw
receive cash

close
:receipt transaction
print

Inferences:

1. Identify the action states of the objects .


2. Understand the transitions and events for various objects.

17
G) NAME OF EXPERIMENT: Component diagram for ATMSystem.

AIM: To design and implement Component diagram for ATM System.

THEORY:

Component diagrams are used to model physical aspects of a system. Physical aspects are the
elements like executables, libraries, files, documents etc which resides in a node. So component
diagrams are used to visualize the organization and relationships among components in a system.
These diagrams are also used to make executable systems.

Purpose:

Component diagrams can be described as a static implementation view of a system. Static


implementation represents the organization of the components at a particular moment. A single
component diagram cannot represent the entire system but a collection of diagrams are used to
represent the whole.

Before drawing a component diagram the following artifacts are to be identified clearly:

• Files used in the system.


• Libraries and other artifacts relevant to the application.
• Relationships among the artifacts.
• Now after identifying the artifacts the following points needs to be followed:

• Use a meaningful name to identify the component for which the diagram is to be drawn.
• Prepare a mental layout before producing using tools.
• Use notes for clarifying important points.

Contents

Components, Interfaces, Relationships

Procedure:-

Step1: First user component is created.

Step2: ATM system package is created.

Step3: In it various components such as withdraw money, deposit money, check balance, transfer
money etc. are created.

18
Step4: Association relationship is established between user and other components.

DIAGRAM:

customer ATM
account Machine

bank
balance
withdraw enquiry

checking
account saving
account

H) NAME OF EXPERIMENT: Deployment diagram for ATMSystem.

AIM: To design and implement ATM System through Deployment diagram.

Purpose:

Deployment diagrams are used to visualize the topology of the physical components of a system
where the software components are deployed. So deployment diagrams are used to describe the static
deployment view of a system. Deployment diagrams are used for describing the hardware
components where software components are deployed. Component diagrams and deployment
diagrams are closely related. Component diagrams are used to describe the components and
deployment diagrams shows how they are deployed in hardware.

Contents: Nodes, Dependency & Association relationships

Procedure:-
Step1: First user node is created

19
Step2: various nodes withdraw money, deposit money, and check balance, transfer money etc. are
created.
Step4: Association relationship is established between user and other nodes.
Step5: Dependency is established between deposit money and check balance.

Atm machine console


location -A

bank
Atm machine server
location b

20
21

You might also like