Sei sulla pagina 1di 13

CLASS DIAGRAM:

USECASE DIAGRAM:

purchase cust

bank

transaction

update

COMPONENT DIAGRAM:

customer

card

<<Standard EXE>> bank

SEQUENCE DIAGRAM:
customer swipes card verification verification success message display purchase amount verification displays message updated message shown card bank

COLLABORATION DIAGRAM:

customer

1: swipes 5: purchase

4: message display 8: updated message shown

card

3: verification success 7: displays message

2: card verification 6: amount verification bank

DATABASE:

SCREEN SHOTS:

CODING:
FORM1: Private Sub Command1_Click() Form1.Hide Form2.show End Sub Private Sub Command2_Click() End End Sub FORM2: Private Sub Label1_Click() Form3.show Form3.Text3.Text = "vegetables / fruits" Form2.Hide End Sub Private Sub Label2_Click() Form3.show Form3.Text3.Text = "chocolates" Form2.Hide End Sub Private Sub Label3_Click() Form3.show Form3.Text3.Text = "furnitures"

Form2.Hide End Sub Private Sub Label4_Click() Form3.show Form3.Text3.Text = "cooking vessels" Form2.Hide End Sub Private Sub Label5_Click() Form3.show Form3.Text3.Text = "clothing" Form2.Hide End Sub Private Sub Label6_Click() Form3.show Form3.Text3.Text = "gold/silver jwellery" Form2.Hide End Sub Private Sub Picture1_Click() Form3.show Form3.Text3.Text = "vegetables/fruits" Form2.Hide End Sub Private Sub Picture2_Click() Form3.show Form3.Text3.Text = "chocolates" Form2.Hide End Sub Private Sub Picture3_Click() Form3.show Form3.Text3.Text = "cooking vessels" Form2.Hide End Sub Private Sub Picture4_Click() Form3.show Form3.Text3.Text = "furnitures" Form2.Hide End Sub Private Sub Picture5_Click() Form3.show Form3.Text3.Text = "clothing" Form2.Hide End Sub Private Sub Picture6_Click() Form3.show Form3.Text3.Text = "gold/silver jwellery" Form2.Hide

End Sub FORM3: Private Sub Form_Load() Frame2.Visible = False Combo1.AddItem "5 kgs", 0 Combo1.AddItem "10 kgs", 1 Combo1.AddItem "10 items", 2 Combo1.AddItem "5 soverign", 3 Combo1.AddItem "10 soverign", 4 End Sub Private Sub Option1_Click() Frame2.Visible = True End Sub Private Sub Option3_Click() Dim msg As String msg = MsgBox("YOUR MAXIMUM LIMIT IS RS.25000", vbOKCancel) If (msg = 1) Then Form4.show Form4.Text4.Text = 25000 End If Form3.Hide End Sub Private Sub Option4_Click() Dim msg As String msg = MsgBox("YOUR MAXIMUM LIMIT IS RS.50000", vbOKCancel) If (msg = 1) Then Form4.show Form4.Text4.Text = 50000 End If Form3.Hide End Sub Private Sub Option5_Click() Dim msg As String msg = MsgBox("YOUR MAXIMUM LIMIT IS RS.75000", vbOKCancel) If (msg = 1) Then Form4.show Form4.Text4.Text = 75000 End If Form3.Hide End Sub Private Sub Option6_Click() Dim msg As String msg = MsgBox("YOUR MAXIMUM LIMIT IS RS.100000", vbOKCancel) If (msg = 1) Then

Form4.show Form4.Text4.Text = 100000 End If Form3.Hide End Sub FORM4: Private Sub Command1_Click() Dim ver As New credit_card ver.verify End Sub Private Sub Command2_Click() Form1.show Form4.Hide End Sub Private Sub Command3_Click() Dim dis As New credit_card dis.display End Sub Private Sub Text3_Change() Text3.PasswordChar = "*" Text3.MaxLength = 6 End Sub

FORM5: Private Sub Command1_Click() Form6.show Form5.Hide End Sub Private Sub Command2_Click() Dim up As New bank_system up.update End Sub Private Sub Command3_Click() Dim sh As New customer sh.show End Sub Private Sub Form_Load() Text7.Text = MonthView1.Value Combo1.AddItem "Chennai", 0 Combo1.AddItem "Ooty", 1 Combo1.AddItem "Madurai", 2 Combo1.AddItem "Hydrabad", 3

Combo1.AddItem "Banglore", 4 Combo1.AddItem "Mysore", 5 End Sub Private Sub MonthView1_DateClick(ByVal DateClicked As Date) Text7.Text = MonthView1.Value End Sub Private Sub Text3_Change() Text3.PasswordChar = "*" Text3.MaxLength = 6 End Sub CLASS MODULES: BANK SYSTEM: Public Sub update() Form5.Adodc1.Recordset.AddNew Form5.Adodc1.Recordset.Fields("name").Value = Form5.Text1.Text Form5.Adodc1.Recordset.Fields("cardno").Value = Form5.Text2.Text Form5.Adodc1.Recordset.Fields("cvvino").Value = Form5.Text3.Text Form5.Adodc1.Recordset.Fields("amount").Value = Form5.Text4.Text Form5.Adodc1.Recordset.Fields("place").Value = Form5.Combo1.Text Form5.Adodc1.Recordset.Fields("date").Value = Form5.Text7.Text If (Form4.Text4.Text = 25000) Then Form5.Adodc1.Recordset.Fields("cardtype").Value = "silver" ElseIf (Form4.Text4.Text = 50000) Then Form5.Adodc1.Recordset.Fields("cardtype").Value = "gold" ElseIf (Form4.Text4.Text = 75000) Then Form5.Adodc1.Recordset.Fields("cardtype").Value = "diamond" ElseIf (Form4.Text4.Text = 100000) Then Form5.Adodc1.Recordset.Fields("cardtype").Value = "platinum" End If Form5.Adodc1.Recordset.update MsgBox ("UPDATION SUCCESSFUL"), vbExclamation, "Credit Card System" End Sub CREDIT CARD: Public NewProperty As bank_system Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset Public Sub verify() Dim sql As String Dim a As Integer cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Gowtham ooad\Credit\Database1.mdb;Persist Security Info=False"

rs.Open "customer", cn, adOpenDynamic, adLockOptimistic Set rs = New ADODB.Recordset sql = "" sql = sql + "select sum(amount) from customer where cardno=val('" + Form4.Text2.Text + "')" Set rs = cn.Execute(sql) a = Val(rs(0)) + Val(Form3.Text2.Text) If (Val(a) < Val(Form4.Text4.Text)) Then Form5.show Form4.Hide Else MsgBox ("YOU HAVE EXCEEDED YOUR MAXIMUM LIMIT OF PURCHASE"), vbOKCancel End If rs.Close cn.Close End Sub Public Sub display() While (Form4.Adodc1.Recordset.EOF = False) If (Form4.Text2.Text = Form4.Adodc1.Recordset.Fields("cardno").Value) Then Form4.Text1.Text = Form4.Adodc1.Recordset.Fields("name") End If Form4.Adodc1.Recordset.MoveNext Wend End Sub CUSTOMER: Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset Public Sub accinfo() End Sub Public Sub show() Dim sql As String Dim a As Integer Dim b As Double cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Gowtham ooad\Credit\Database1.mdb;Persist Security Info=False" rs.Open "customer", cn, adOpenDynamic, adLockOptimistic Set rs = New ADODB.Recordset sql = "" sql = sql + "select sum(amount) from customer where cardno=val('" + Form4.Text2.Text + "')" Set rs = cn.Execute(sql) a = Val(rs(0)) + Val(Form3.Text2.Text) b = Val(Form4.Text4.Text) - Val(a)

Form5.Text1.Text = Form4.Text1.Text Form5.Text2.Text = Form4.Text2.Text Form5.Text3.Text = Form4.Text3.Text Form5.Text4.Text = Form3.Text2.Text Form5.Text5.Text = Val(b) End Sub

Potrebbero piacerti anche