0% found this document useful (0 votes)
93 views

Insert Card & Enter Pin No.: Use Case Diagram

The document contains diagrams and code that model an ATM system. The use case diagram shows a user inserting their card, entering their PIN, selecting an account type, choosing to check their balance or withdraw funds, entering an amount, receiving a receipt, and ending the transaction. The sequence diagram outlines the steps in order. The class diagram shows the classes for user and system and their attributes and methods. The component diagram shows the user interacting with the system. The collaboration diagram shows the participants and their interactions. The code provided implements the system using classes for the system and user and forms to represent the user interface.

Uploaded by

vicky3924
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views

Insert Card & Enter Pin No.: Use Case Diagram

The document contains diagrams and code that model an ATM system. The use case diagram shows a user inserting their card, entering their PIN, selecting an account type, choosing to check their balance or withdraw funds, entering an amount, receiving a receipt, and ending the transaction. The sequence diagram outlines the steps in order. The class diagram shows the classes for user and system and their attributes and methods. The component diagram shows the user interacting with the system. The collaboration diagram shows the participants and their interactions. The code provided implements the system using classes for the system and user and forms to represent the user interface.

Uploaded by

vicky3924
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 11

USE CASE DIAGRAM

INSERT CARD & ENTER PIN NO.

VERIFY PIN NO.

ENTER ACOUNT TYPE

B CHECK BALANCE/WITHDRAWAL

ENTER AMOUNT

USER COMPUTE BALANCE system

PRINT RECEIPT

END TRANSACTION
SEQUENCE DIAGRAM

User System

1. INSERT CARD AND ENTER PIN NO

2.VERIFY PIN NO

3.ENTER ACCONT TYPE

4. SELECT CHECK BALANCE/WITHDRAW

5. ENTER AMOUNT

6.COMPUTE BALANCE

R 7. PRINT RECEIPT

8. END TRANSACTION

CLASS DIAGRAM

USER SYSTEM
* 1 11
PINNO PINNO

ACCTYPE BALANCE

AMOUNT
VERIFY()
SELECTOPERATION()
RESULT()
ENTERAMOUNT()
COMPONENT DIAGRAM

USER SYSTEM

COLLABORATION DIAGRAM

1.ENTER PIN NO

3.ENTER ACCOUNT TYPE

4. SELECT CHECK BALANCE/WITHDRAW

5. ENTER AMOUNT

8. END TRANSACTION

PARTICIPANT SYSTEM

2.VERIFY PIN NO

6. COMPUTE BALANCE

R 7. PRINT RECEIPT
ATM SYSTEM
Ex. No. 8 Name: R Shiva

Date: Reg. No. : 30707104090

System.cls

Option Explicit

'##ModelId=422B175F0167
Private pinno As Variant

'##ModelId=422B176602DE
Private balance As Variant

'##ModelId=422B177A03A9
Public Sub verify()
Form1.Adodc1.Recordset.MoveFirst
q: If Not Form1.Adodc1.Recordset.EOF Then
If Form1.Adodc1.Recordset.Fields("pinno").Value = Form1.Text1.Text
And Form1.Adodc1.Recordset.Fields("cardno").Value = Form1.Text2.Text
Then
Form3.Show
Else
Form1.Adodc1.Recordset.MoveNext
GoTo q
End If
Else
MsgBox ("sorry wrong card number or pin number")
Unload Form1
End If
End Sub

'##ModelId=422B17960186
Public Sub result()
Form4.Adodc1.Recordset.MoveFirst
a: If Not Form4.Adodc1.Recordset.EOF Then
If Form4.Adodc1.Recordset.Fields("pinno").Value = Form1.Text1.Text
Then
Form4.Label1.Caption = "Card No:" +
Str(Form4.Adodc1.Recordset.Fields("cardno").Value)
Form4.Label2.Caption = "Name:" +
Form4.Adodc1.Recordset.Fields("name").Value
Form4.Label3.Caption = "Account no: " +
Str(Form4.Adodc1.Recordset.Fields("Account no").Value)
Form4.Label4.Caption = "Account type:" +
Form4.Adodc1.Recordset.Fields("accounttype").Value
Form4.Label5.Caption = "Balance: " +
Str(Form4.Adodc1.Recordset.Fields("balance").Value)
Else
Form4.Adodc1.Recordset.MoveNext
GoTo a
End If
End If
End Sub

User.cls

Option Explicit

'##ModelId=422B16DA004E
Private pinno As Variant

'##ModelId=422B16DE000F
Private acctype As Variant

'##ModelId=422B16E702DE
Private amount As Variant

'##ModelId=422B173001B5
Public Sub selectoperation()
If Form3.Option1 = True Then
Form4.Show
Else
If Form3.Option2 = True Then
Form5.Show
End If
End If
End Sub

'##ModelId=423594ED0280
Public Sub enteramount()
Form5.Adodc1.Recordset.MoveFirst
a: If Not Form5.Adodc1.Recordset.EOF Then
If Form5.Adodc1.Recordset.Fields("pinno").Value = Form1.Text1.Text
Then
Form5.Adodc1.Recordset.Fields("balance").Value =
Form5.Adodc1.Recordset.Fields("balance").Value -
Val(Form5.Text1.Text)
Form5.Adodc1.Recordset.Update
Unload Form5
Form4.Show

Else
Form5.Adodc1.Recordset.MoveNext
GoTo a
End If
End If
End Sub

Form1.frm

Private Sub Command1_Click()


Dim a As New Sys
a.verify
End Sub

Form2.frm

Private Sub Command1_Click()


Form3.Show
End Sub

Code for Form3

Private Sub Command1_Click()


Dim s As New use
s.selectoperation
End Sub

Form4.frm

Private Sub Command1_Click()


Unload Me
Unload Form1
Unload Form3
Unload Form5
End Sub

Private Sub Form_Load()


Dim a As New Sys
a.result
End Sub

Form5.frm

Private Sub Command1_Click()


Dim s As New use
s.enteramount
End Sub
OUTPUT

You might also like