UML DIAGRAMS
83
USECASE DIAGRAM
AIM
To design Usecase diagram for Credit Card Processing System.
PROCEDURE:
STEP 1: Usecase diagram contains actors and relationship between actors and usecase in the system
including association, dependencies and generalization.
STEP 2: Usecase diagram is used during analysis to capture the system requirement.
STEP 3: Click browser -> Usecase diagram.
STEP4: On the toolbar double click the Usecase diagram icon and place it over the screen.
STEP 5: Actor represent the system user.
STEP 6: Type the diagram title for each and click OK.
STEP 7: Finally Usecase diagram is saved.
84
login
Allot
Due
User Admin
Pay
Signup
Fig 3.1 Usecase diagram for Credit Card Processing System
85
CLASS DIAGRAM
AIM:
To design a class diagram for Credit Card Processing System.
PROCEDURE:
STEP 1: Click on browser->class diagram.
STEP 2: In resulting dialogue box. Select a view from the list.
STEP 3: Click on new diagram on the left to create a new class diagram.
STEP 4: Type the class name, methods and attributes.
STEP 5: Create as many as class as possible and dependencies like association, eneralization
can be used.
STEP 6: Finally save the class diagram.
86
Fig 3.2 Class diagram for Credit Card Processing System
87
SEQUENCE DIAGRAM
AIM:
To design a sequence diagram for Credit Card Processing System.
PROCEDURE:
STEP 1: Right click on logical view on the left and select new option and click on sequence
diagram.
STEP 2: When sequence diagram is clicked the box with different style will be displayed.
STEP 3: Using rectangle symbol, represent the object.
STEP 4: Using arrows, represent the object message.
STEP 5: Finally save the sequence diagram.
88
User Database Admin
admin login
verify authentication
Allot card
User login
Verify authenticate
Get card
Check due
check due
pay due
user logout
Admin logout
Fig 3.3 Sequence diagram for Credit Card Processing System
89
COLLABORATION DIAGRAM
AIM:
To design a collaboration diagram for Credit Card Processing System.
PROCEDURE:
STEP 1: Open rational rose enterprise edition and right click on logical view.
STEP 2: Select New->collaboration diagram.
STEP 3: Collaboration diagram represents the sequence of interaction among objects.
STEP 4: Objects are represented using rectangle and object messages uses line symbol.
STEP 5: After the sequence diagram is designed, the F5 key is pressed to obtain the
collaboration diagram.
STEP 6: Finally save the diagram.
90
2: verify authentication
5: verify authentication
4: user login
8: check due
9: pay due
10: user logout
User Database
6: get card
1: admin login
3: allot card
7: check due
11: admin logout
Admin
Fig 3.4 Collaboration diagram for Credit Card Processing System
91
STATE CHART DIAGRAM
AIM:
To design a state chart diagram for Credit Card Processing System.
PROCEDURE:
STEP 1: Open rational rose enterprise edition.
STEP 2: Right click the logical view to open a new state chart diagram.
STEP 3: A new window with local tool boxes containing different styles appear for
Creating state chart diagram.
STEP 4: The state is a set of value that describe an object at a specific point and is
Represented by state symbol.
STEP 5: Transition are represented by arrows connecting state symbol.
STEP 6: This diagram shows sequence of state during lifetime in response to
Message.
STEP 7: Save and terminate it finally.
92
login Allot check due Pay
Fig 3.5 State chart diagram for Credit Card Processing System
93
ACTIVITY DIAGRAM
AIM:
To design the activity diagram for Credit Card Processing System.
PROCCEDURE:
STEP 1: Open rational rose enterprise edition.
STEP 2: Right click on logical view and select the activity diagram.
STEP 3: A new window with different tools is opened to create a activity diagram.
STEP 4: Rounded rectangle represents state of project and diamond represents decision.
STEP 5: Finally after creating activity diagram save it and transmit.
94
Login
Allot card
Check due
Make
payment
update
balance
Logout
Fig 3.6 Activity diagram for Credit Card Processing System
95
COMPONENT DIAGRAM
AIM:
To design the component diagram for Credit Card Processing System.
PROCEDURE:
STEP 1: Open the rational rose enterprise edition component diagram are used to model
physical aspects of system.
STEP 2: They are used to visualize the physical component of component.
STEP 3: They describe the organizational and relationship of component.
STEP 4: They describe the modeling component and source code of system.
96
Custome NewCom
r ponent2
Bank
Fig 3.7 Component diagram for Credit Card Processing System
97
DEPLOYMENT DIAGRAM
AIM:
To draw the deployment diagram Credit Card Processing System.
PROCEDURE:
STEP 1: This diagram is used to visualize the topology of physical component of
System.
STEP 2: It is used to describe the static view of system.
STEP 3: They are used to describe the hardware topology of system and hardware
Components.
STEP 4: They are used to deploy software components and run time processing nodes.
STEP 5: This diagram is identified by nodes and relationship among nodes.
98
Credit Card
processing system
Custom Bank
er
Fig 3.8 Deployment diagram for Credit Card Processing System
99
DEPARTMENT OF INFORMATION TECHNOLOGY
CBE-22
Nomenclature Max. Mark Marks
Obtained
Preparation 05
Output 05
Viva 05
Record 05
Total 20
Staff Sign
100
IMPLEMENTATION
101
Coding
Credit Card Processing System Public Class Form1
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button3.Click
Form2.Show()End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
Form3.Show()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Form4.Show()
End Sub
End Class
Credit Card Processing System
102
Signup form
Public Class Form2
Dim drAsOdbc.OdbcDataReader
Dim sql As String
Dim sql1 As String
Dim count As Integer
Dim bs As Integer
Dim conn As Odbc.OdbcConnection
Dim comm As Odbc.OdbcCommand
Dim ConnectionStringAs String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
sql1 = "insert into SIGNUP2 values ('" & TextBox1.Text & "','" & TextBox2.Text & "','" &
TextBox3.Text & "')"
MsgBox(sql1)
ConnectionString = "DSN=ADHARSH; UID=SCOTT; PWD=TIGER"
conn = New Odbc.OdbcConnection(ConnectionString)
conn.Open()
comm = New Odbc.OdbcCommand(sql1, conn)
Try
dr = comm.ExecuteReader()
Catch ex As Exception
End Try
MsgBox("INSERTED SUCCESSFULLY")
conn.Close()
103
dr.Close()
comm.Dispose()
conn.Dispose()
End Sub
End Class
Signup form
ADMIN LOGIN FORM
Public Class Form3
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
If TextBox1.Text = "a" And TextBox2.Text = "a" Then
Form5.Show()
End If
104
End Sub
End Class
ADMIN LOGIN FORM
User login
Public Class Form4
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Dim drAsOdbc.OdbcDataReader
Dim sql As String
Dim count As Integer
Dim aid As Integer
Dim conn As Odbc.OdbcConnection
Dim comm As Odbc.OdbcCommand
Dim ConnectionStringAs String
105
sql = "select*from signup2 where USERNAME='" & TextBox1.Text & "'and
PASSWORD='" & TextBox2.Text & "' "
ConnectionString = "DSN=ADHARSH; UID=SCOTT; PWD=TIGER"
conn = New Odbc.OdbcConnection(ConnectionString)
conn.Open()
comm = New Odbc.OdbcCommand(sql, conn)
dr = comm.ExecuteReader()
count = 0
aid = aid + 1
If aid = 3 Then
Me.Hide()
End If
While dr.Read()
count = count + 1
End While
If count = 1 Then
Me.Hide()
Form6.Show()
ElseIf count = 1 Then
Me.Hide()
Form3.Show()
Else
MessageBox.Show("invalid credentials")
End If
conn.Close()
106
dr.Close()
comm.Dispose()
conn.Dispose()
End Sub
End Class
User login
Admin form
Public Class Form5
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
FORM7.SHOW()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
form8.show()
107
End Sub
End Class
Admin form
User form
Public Class Form6
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
form9.show()
End Sub
End Class
108
User form
Allot form
Public Class Form7
Dim drAsOdbc.OdbcDataReader
Dim sql As String
Dim sql1 As String
Dim count As Integer
Dim bs As Integer
Dim conn As Odbc.OdbcConnection
Dim comm As Odbc.OdbcCommand
Dim ConnectionStringAs String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
sql1 = "insert into card values ('" & TextBox1.Text & "','" & TextBox2.Text & "','" &
TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text &
"','" & TextBox7.Text & "')"
MsgBox(sql1)
109
ConnectionString = "DSN=ADHARSH; UID=SCOTT; PWD=TIGER"
conn = New Odbc.OdbcConnection(ConnectionString)
conn.Open()
comm = New Odbc.OdbcCommand(sql1, conn)
Try
dr = comm.ExecuteReader()
Catch ex As Exception
End Try
MsgBox("INSERTED SUCCESSFULLY")
conn.Close()
dr.Close()
comm.Dispose()
conn.Dispose()
End Sub
End Class
110
Allot form
Due form
Public Class Form8
Dim drAsOdbc.OdbcDataReader
Dim sql As String
Dim sql1 As String
Dim count As Integer
Dim bs As Integer
Dim conn As Odbc.OdbcConnection
Dim comm As Odbc.OdbcCommand
Dim ConnectionStringAs String
111
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
sql1 = "select due from card where CAR='" & TextBox1.Text & "' "
MsgBox(sql1)
ConnectionString = "DSN=ADHARSH; UID=SCOTT; PWD=TIGER"
conn = New Odbc.OdbcConnection(ConnectionString)
conn.Open()
comm = New Odbc.OdbcCommand(sql1, conn)
Try
dr = comm.ExecuteReader()
bs = dr.GetValue(0)
TextBox2.Text = bs
Catch ex As Exception
End Try
MsgBox("INSERTED SUCCESSFULLY")
conn.Close()
dr.Close()
comm.Dispose()
conn.Dispose()
End Sub
End Class
Due form
112
Pay form
Public Class Form9
Dim drAsOdbc.OdbcDataReader
Dim sql As String
Dim sql1 As String
Dim count As Integer
Dim bs As Integer
Dim conn As Odbc.OdbcConnection
Dim comm As Odbc.OdbcCommand
Dim ConnectionStringAs String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
sql1 = "select due from card where CAR='" & TextBox1.Text & "' "
MsgBox(sql1)
113
ConnectionString = "DSN=ADHARSH; UID=SCOTT; PWD=TIGER"
conn = New Odbc.OdbcConnection(ConnectionString)
conn.Open()
comm = New Odbc.OdbcCommand(sql1, conn)
Try
dr = comm.ExecuteReader()
bs = dr.GetValue(0)
TextBox2.Text = bs
Catch ex As Exception
End Try
MsgBox("INSERTED SUCCESSFULLY")
conn.Close()
dr.Close()
comm.Dispose()
conn.Dispose()
Me.Visible = False
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
FORM10.SHOW()
End Sub
End Class
114
Pay form
115
DEPARTMENT OF INFORMATION TECHNOLOGY
CBE-22
Nomenclature Max. Mark Marks
Obtained
Preparation 05
Output 05
Viva 05
Record 05
Total 20
Staff Sign
116