Sunteți pe pagina 1din 58

1

STUDY OF CASE TOOLS


VISUAL MODELLING:
Visual modeling is a way of thinking and analyzing about problems models around real world ideas. A modeling language must include, Model elements Notations Guidelines Visual modeling approach is used since a system cannot be comprehended to its entirety. Benefits of visual modeling includes, Clarity Familiarity Maintenance simplification using

UML:
Unified modeling language(UML)is a communication standard of visual modeling. The UML provides a smooth transition between the business domain and the computer domain. UML is an object oriented language for specifying, constructing, visualizing and documenting the software system and its components. UML is a graphical language with a set of rules and semantics. UML is a combination of UML Data Modeling Business Modeling Object Modeling Component Modeling

UML DIAGRAMS:
defines graphical diagrams such as, Class diagram Use case diagram Behavior diagrams Interaction Diagrams o Sequence Diagrams o Collaboration Diagrams State Chart Diagrams Activity Diagram Implementation Diagrams o Component Diagram o Deployment Diagrams

USE-CASE DIAGRAMS:
Use-case diagrams graphically depict system behavior (use cases).These diagrams present a high level view of how the system is used as viewed from an outsiders (actors) perspective. A use-case diagram may depict all or some of the use cases of a system. A use-case diagram can contain: Actors (things outside the system) Use cases(system boundaries identifying what the system should do) Interactions or relationships between actors and use cases in the system including the associations, dependencies and generalizations.

USE CASE:
Use case is scenario for understanding system requirements. Every single use case must describe one main flow of events. ACTOR Actors represent system users, who provide input to and receive information from the system. An actor is a stereotype of a class and is depicted as a stickman on a use-case diagram. The name of the actor is displayed below the icon. Additional information about the actor can be viewed in the use-case specification. RELATIONSHIPS You can add relationships to the diagram to show interactions between actors and use cases. Association relationships can be drawn from an actor to a use case. The generalize relationship can be drawn between actors. Relationships between use case diagrams include Communication Uses Extend FLOW OF EVENTS A flow of events is a sequence of transaction (or events) performed by the system. They typically contain very detailed information, written in terms of what the system should do, not how accomplish the task. A flow of events should include: When and how the use case starts and ends Use case/actor interactions Data needed by the use case Normal sequence of events for the use case Alternate or exception flows USE-CASE REALIZATIONS (SCENARIOS) A use case realization is a graphic sequence of events, also referred to as a scenario or an instance of a use case. these realization or scenarios are depicted in either a sequence or collaboration diagram. The two most common scenarios are the typical(or primary)scenario, where all is well and the exception(secondary)scenario, which address the deviations. The exception scenario address the what if ? elements of the use case.

ACTIVITY DIAGRAM:
An activity represents the performance of task or duty in a workflow. it may also represent the execution of a statement in a procedure. An activity diagram is activity centric. Transitions connect activities with other model elements and object flows connect activities with objects. The activity icon appears as a rectangle with rounded ends with name (take order and process order) and a compartment for actions. The name of an activity must be unique and should declare the activitys purpose. All activity icons with the name on an activity diagram represent the same activity. You must add actions through the action specification. Action on activities can occur of four times: On entry On exit Do On event

SEQUENCE DIAGRAMS:
Sequence diagram is a graphical view of a scenario that shows object interaction in a time-based sequence. Sequence diagrams establish the roles objects. Sequence diagrams are normally associated with use cases. Sequence diagrams are closely related to collaboration diagrams and both are alternate representation of an interaction. A sequence diagram has two dimensions: typically, vertical placement represents time and horizontal placement represents different objects.

COLLABORATION DIAGRAMS:
A collaboration diagram is an interaction diagram that shows the order of messages that implement an operation or a transaction. Collaboration diagrams show objects, their links, and their messages. They can also contain simple class instances and class utility instances. Each collaboration diagram provides a view of the interactions or structural relationships that occur between objects and object-like entities in the current model.

SCENARIOS:
Scenarios show the different sequence of interaction between actors and system. A Scenario is an instance of a use case; it is an outline of events that occur during system execution. A scenario can be expressed in text or sequence of steps.

STATE CHART DIAGRAMS:


State chart diagrams model the dynamic behavior of individual classes or any other kind of objects. They show the sequence of states that an object goes through, the events that cause a transition from one state to another, and the actions that result from a state change.

4 State chart diagrams are state centric; statement diagram is used to model the discrete stages of an objects lifetime. Each state represents a named condition during the life of an object during which it satisfies some condition or waits for some events. A state chart diagram typically contains one start state and multiple end states. Transitions connect the various states on the diagram. Decisions, synchronizations, and activities may also appear on state chart diagrams.

STEREOTYPES:
Stereotype represents built-in extensibility mechanism for UML. Stereotype is new class of modeling element introduced during modeling. General presentation of stereotype is string with guillemots. Various form of stereotype is Class stereotypes Association stereotypes Dependency stereotypes Component stereotypes

RATIONAL ROSE:
Rational rose is a tool for understanding, analyze and designing of software intensive system. Model in rational rose is constructed using views and diagrams The views used are, Use case view Logical view Component view Development view Implementation view Process view Rational Rose is a GUI environment containing, Browser window Diagram window Diagram window Documentation window Log window Options window

EX.NO: DATE: AIM:

EMPLOYEE PAYROLL SYSTEM

To create a Employee Payroll System for manipulating payroll management by using VB SYSTEM REQUIREMENTS: FRONT END: VISUAL BASIC BACK END: MS ACCESS

CLASS DIAGRAM:

e m p d e t a ils nam e b a s ic p a y s ta ff n o dept ug a d d re s s pg 1 1 1 doj 1 pf c a lc b p ( ) c h e c k in g ()


USE CASE DIAGRAM:

to ta l p a y b a s ic p a y da rs ia 1 n a m1e 2 c a lt p ()

lo p g ro s s s a l net sal cl b a s ic p a y lo p g ro s s p a y da tp pf 1 1 1 rs ia 1 c a lg r s a l() c a ln e t p a y ( ) c a llo p ( )

e p ye d ta m lo e e ils

b sic p y ca la n a a lcu tio S yste m E p ye m lo e

lo ca la n p lcu tio

g ss sa ry ca la n ro la lcu tio

n t p y ca la n e a lcu tio

COLLOBORATION DIAGRAM:

1 : re t rie ve e m p d e t a ils e m p d e ta ils e m p lo y e e

2 : b a s ic p a y c a lc b a s e d o n u g p g b a s ic pay

g ro s s s a l 3 : a d d b a s ic , D A ,R S IA 1 0 : in t im a t e t h e e m p lo y e e 4 : if lo p n o t a va ila b le g s = t p 7 : n e ts a l c a lc b y d e d u c t in g p f if a n y 8 : n e ts a l= g ro s s s a l if n o p f t o t a lp a y 6 : g ro s s s a l= t p -lo p s y s te m 9 : u p d a te d e t a ils n e ts a l 5 : c a lc u la t io n o f lo p if lo p a va ila b le

lo p

SEQUENTIAL DIAGRAM

e m p lo y e e e m p d e t a ils b a s ic p a y r e t rie ve e m p d e t a ils

t o t a lp a y

lo p

g ro s s s a l

n e ts a l

s y s te m

b a s ic p a y c a lc b a s e d o n u g p g a d d b a s ic , D A , R S IA if l o p n o t a v a i la b le g s = t p

c a lc u la t io n o f l o p if lo p a va i la b le g ro s s s a l= t p -lo p n e t s a l c a lc b y d e d u c t in g p f if a n y

n e ts a l= g r o s s s a l if n o p f

u p d a t e d e t a ils

in t im a t e t h e e m p l o y e e

FORM DESIGN:

SOURCE CODE:
FRONT END (VB 6.0) START PROGRAMS MICROSOFT VISUAL STUDIO 6.0
MICROSOFT VISUAL BASIC 6.0 OPEN STANDARD EXE

FORM 1: Private Sub Command1_Click() If Text1.Text = "admin" And Text2.Text = "admin" Then Form2.Show ElseIf Text1.Text = "employee" And Text2.Text = "employee" Then Form3.Show Else MsgBox "sorry try please" End If End Sub
Private Sub Command2_Click() End End Sub Private Sub Command3_Click() Text1.Text = "" Text2.Text = "" End Sub

FORM 2:

10

Dim db As Database Dim rs As Recordset Dim a1 As New admin Private Sub Combo1_click() rs.MoveFirst While Not rs.EOF If Combo1.Text = rs.Fields(0) Then Text1.Text = rs(1) Text2.Text = rs(2) Text3.Text = rs(3) Text4.Text = rs(4) End If rs.MoveNext Wend End Sub Private Sub Command1_Click() Call a1.payrolldetails End Sub Private Sub Command2_Click() Combo1.Text = "" Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = ""

11 Text9.Text = "" Text10.Text = "" Text11.Text = "" Text12.Text = "" End Sub Private Sub Command3_Click() End End Sub Private Sub Command4_Click() Form1.Show End Sub Private Sub Form_Load() Set db = DBEngine.OpenDatabase("C:\Users\Manikandan.P\Desktop\pay\PAYROLL.MDB") Set rs = db.OpenRecordset("PAYROLL") rs.MoveFirst While Not rs.EOF Combo1.AddItem (rs(0)) rs.MoveNext Wend End Sub

FORM 3:

Dim db As Database Dim rs As Recordset

12 Dim p As New employee1 Private Sub Combo1_click() Call p.view_details End Sub Private Sub Command1_Click() Form1.Show End Sub Private Sub Command2_Click() End End Sub Private Sub Command3_Click() rs.AddNew rs.Fields(0) = Combo1.Text rs.Fields(1) = Text1.Text rs.Fields(2) = Text2.Text rs.Fields(3) = Text3.Text rs.Fields(4) = Text4.Text rs.Update MsgBox "record added" End Sub Private Sub Form_Load() Set db = DBEngine.OpenDatabase("C:\Users\Manikandan.P\Desktop\pay\PAYROLL.MDB") Set rs = db.OpenRecordset("PAYROLL") rs.MoveFirst While Not rs.EOF Combo1.AddItem (rs(0)) rs.MoveNext Wend End Sub Admin.cls Dim db As Database Dim rs As Recordset Dim a As Double Dim llp, llp1 As Double Dim it As Double Dim da As Double Option Explicit Public Sub payrolldetails() Set db = DBEngine.OpenDatabase("C:\Users\Manikandan.P\Desktop\pay\PAYROLL.MDB") Set rs = db.OpenRecordset("PAYROLL") rs.MoveFirst While Not rs.EOF If Form2.Text4.Text = rs.Fields(4) Then llp = Val(Form2.Text4.Text) / 30 llp1 = Val(Form2.Text13.Text) * llp Form2.Text10.Text = llp1

13 Else Form2.Text4.Text = Val(Form2.Text4.Text) End If Form2.Text6.Text = Val(Form2.Text4.Text) * (18 / 100) Form2.Text7.Text = Val(Form2.Text4.Text) * (31 / 100) a = Val(Form2.Text4.Text) * (50 / 100) da = a + Val(Form2.Text4.Text) Form2.Text5.Text = da * (35 / 100) Form2.Text8.Text = Val(Form2.Text4.Text) * (12 / 100) Form2.Text11.Text = Val(Form2.Text4.Text) + Val(Form2.Text5.Text) + Val(Form2.Text6.Text) + Val(Form2.Text7.Text) it = Val(Form2.Text4.Text) * 12 If it > 150000 Then Form2.Text9.Text = Val(it) * (0.83 / 100) Else Form2.Text9.Text = 0 End If Form2.Text12.Text = Val(Form2.Text11.Text) - (Val(Form2.Text8.Text) + Val(Form2.Text9.Text) + llp1) rs.MoveNext Wend End Sub Employee1.cls Dim db As Database Dim rs As Recordset Option Explicit Public Sub view_details() Set db = DBEngine.OpenDatabase("C:\Users\Manikandan.P\Desktop\pay\PAYROLL.MDB") Set rs = db.OpenRecordset("PAYROLL") rs.MoveFirst While Not rs.EOF If Form3.Combo1.Text = rs.Fields(0) Then Form3.Text1.Text = rs(1) Form3.Text2.Text = rs(2) Form3.Text3.Text = rs(3) Form3.Text4.Text = rs(4) End If rs.MoveNext Wend End Sub

OUTPUT SCREEN:

14

15

CONCLUSION
Thus the system is developed using object oriented programming approach with the help of CASE tools. EX.NO: DATE: TEXT EDITOR

16

AIM:
To create a text editor for manipulating text operation like WordPad, by using VB.

SYSTEM REQUIREMENTS:
FRONT END: VISUAL BASIC BACK END: MS ACCESS

USE CASE DIAGRAM:

COLLABORATION DIAGRAM:

17

SEQUENCE DIAGRAM:

FORM DESIGN:

18

SOURCE CODE:
FRONT END (VB 6.0) START PROGRAMS MICROSOFT VISUAL STUDIO 6.0
MICROSOFT VISUAL BASIC 6.0 OPEN STANDARD EXE Dim i As Integer Dim str As String Dim clipfrm As New Form1 Dim flag As Integer FILE MENU EDIT MENU Private Sub COPY_Click() Set clipfrm = Screen.ActiveForm str = clipfrm.rt.SelText End Sub Private Sub CUT_Click() Set clipfrm = Screen.ActiveForm str = clipfrm.rt.SelText clipfrm.rt.SelText = "" End Sub FORMAT MENU Private Sub COLOUR_Click() Set clipfrm = Screen.ActiveForm cd.ShowColor clipfrm.rt.SelColor = cd.Color End Sub Private Sub EXIT_Click() End End Sub Private Sub FIND_Click() Dim str As String

19 str = InputBox("enter the text") Set clipfrm = Screen.ActiveForm clipfrm.rt.FIND (str) clipfrm.rt.SelStart = clipfrm.rt.SelStart clipfrm.rt.SelLength = Len(str) End Sub Private Sub FONT_Click() Set clipfrm = Screen.ActiveForm cd.Flags = cdlCFScreenFonts cd.ShowFont clipfrm.rt.SelFontName = cd.FontName clipfrm.rt.SelBold = cd.FontBold clipfrm.rt.SelFontSize = cd.FontSize clipfrm.rt.SelItalic = cd.FontItalic clipfrm.rt.SelUnderline = cd.FontUnderline End Sub Private Sub NEW1_Click() flag = 1 Form1.rt.Text = "" End Sub Private Sub OPEN1_Click() Dim frmopen As New Form1 Set frmopen = Screen.ActiveForm cd.ShowOpen frmopen.rt.LoadFile (cd.FileName) End Sub Private Sub PASTE_Click() Set clipfrm = Screen.ActiveForm clipfrm.rt.SelText = str End Sub Private Sub REDO_Click() rt.SelText = Clipboard.GetText End Sub Private Sub SAVE1_Click() Dim frmsave As New Form1 Set frmsave = Screen.ActiveForm cd.ShowSave frmsave.rt.SaveFile (cd.FileName) End Sub Private Sub SAVEAS1_Click() cd.ShowSave cd.Filter = "textdocument(*.txt)|*.text|allfiles(*.*)|*.* " rt.SaveFile (cd.FileName)

20 End Sub Private Sub SELECTALL_Click() rt.SelStart = 0 rt.SelLength = Len(rt.Text) End Sub Private Sub UNDO_Click() i = i - Len(typestring) rt.SelStart = i rt.SelLength = Len(typestring) + 2 Clipboard.SetText (rt.SelRTF) rt.SelText = vbNullString End Sub

OUTPUT SCREEN:

CONCLUSION
Thus the system is developed using object oriented programming approach with the help of CASE tools. EX.NO: DATE:

LIBRARY INFORMATION SYSTEM

21

AIM:
To create a Library Management System for maintain the Library by using VB.

SYSTEM REQUIREMENTS:
FRONT END: VISUAL BASIC BACK END: MS ACCESS

CLASS DIAGRAM:
DataBase Book issu e Book R rn etu U in ser form ation Book In form ation M () ain Validate u ser()

Book Search Book n e am Au or th Av ailable books R o egn Book Search ()

U ser nam e R o egn Available books fin e N u ew ser() Existin U g ser()

USECASE DIAGRAM:

22

ENTER INTO SY STEM

DATA BASE ADMIN USER NEWUSER

EXISTING USER

ISSUE

STORE

RETURN

ACTIVITY DIAGRAM:
sr t t a Lg o in

N o

Ys e

Nw s r e ue Rg ta n eis t r io

Eis g xt in ue sr

Bo ok sa h er c

Rt r e n u Bo ok

Aaal vil b e Bos ok

Fe in

I se o k su b o

Ed n

SEQUENCE DUAGRAM:

23

u ser 1: n u ew ser

sy stem

data base

2: sav e

3: ex istin u g ser 4: retriev e

5: displayin form ation

6: issu e 7: u pdate 8: close 9: sav e 10: retu rn 11: u pdate 12: close 13: sav e

COLLABRATION DIAGRAM
1: new user 3: existing user 6: issue 8: close 10: return 12: close user system

5: display information data base

2: save 4: retrieve 7: update 9: save 11: update 13: save

FORM DESIGN: SOURCE CODE:

24

FRONT END (VB 6.0) START PROGRAMS MICROSOFT VISUAL STUDIO 6.0
MICROSOFT VISUAL BASIC 6.0 OPEN STANDARD EXE

FORM 1:

Private Sub Command1_Click() Dim a As Boolean a = False If (Text1.Text = "admin" And Text2.Text = "admin") Then a = True Form2.Show Unload Me End If If (a = False) Then MsgBox ("Enter Correct Username and Password") End If End Sub

FORM 2:

25

Private Sub Command1_Click() Form3.Show Unload Me End Sub Private Sub Command2_Click() Form4.Show Unload Me End Sub Private Sub Command3_Click() Form5.Show Unload Me End Sub Private Sub Command4_Click() Form6.Show Unload Me End Sub Private Sub Command5_Click() Unload Me End Sub

FORM 3:

26

Dim db As Database Dim rs As Recordset Private Sub Command1_Click() rs.AddNew rs(0) = Val(Text1.Text) rs(1) = Text2.Text rs.Update a = MsgBox("stunet added") Text1.Text = "" End Sub Private Sub Command2_Click() Form2.Show Unload Me End Sub Private Sub Form_Load() Set db = DBEngine.OpenDatabase("F:\MY PROJECT\PAYROLL PROCESS\LIBRARY1.MDB") Set rs = db.OpenRecordset("student") End Sub FORM4:

27

Dim db As Database Dim rs As Recordset Private Sub Command1_Click() With rs .AddNew .Fields(0) = Val(Text1.Text) .Fields(1) = Text2.Text .Fields(2) = Val(Text3.Text) .Update End With a = MsgBox("books updated") Text1.Text = "" Text2.Text = "" Text3.Text = "" End Sub Private Sub Command2_Click() Form2.Show Unload Me End Sub Private Sub Form_Load() Set db = DBEngine.OpenDatabase("F:\MY PROJECT\PAYROLL PROCESS\LIBRARY1.MDB") Set rs = db.OpenRecordset("books") End Sub

FORM5:

28

Dim a As Boolean Dim b As Boolean Dim db As Database Dim rs1 As Recordset Dim rs2 As Recordset Private Sub Command1_Click() rs1.MoveFirst While Not rs1.EOF If (Val(Text1.Text) = rs1(0)) Then a = True rs2.MoveFirst While Not rs2.EOF If (Val(Text2.Text) = rs2(0)) Then b = True rs2.Edit If (rs2(2) > 0) Then rs2.Edit rs2(2) = rs2(2) - 1 rs2.Update MsgBox "Book is Issued" Else MsgBox "No copies of books is avilable" End If End If rs2.MoveNext Wend End If rs1.MoveNext Wend Text1.Text = "" Text2.Text = "" If (a = False) Then MsgBox ("Enter correct Student ID")

29 End If If (a = True And b = False) Then MsgBox ("Enter correct Book ID") End If End Sub Private Sub Command2_Click() rs1.MoveFirst While Not rs1.EOF If (Val(Text1.Text) = rs1(0)) Then a = True rs2.MoveFirst While Not rs2.EOF If (Val(Text2.Text) = rs2(0)) Then b = True If (rs2(2) > 1) Then MsgBox "Book is Renewed" Else MsgBox "Please return the Book." End If End If rs2.MoveNext Wend End If rs1.MoveNext Wend Text1.Text = "" Text2.Text = "" If (a = False) Then MsgBox ("Enter correct Student ID") End If If (a = True And b = False) Then MsgBox ("Enter correct Book ID") End If End Sub Private Sub Command3_Click() Form2.Show Unload Me End Sub Private Sub Form_Load() Set db = DBEngine.OpenDatabase("F:\MY PROJECT\PAYROLL PROCESS\LIBRARY1.MDB") Set rs1 = db.OpenRecordset("student") Set rs2 = db.OpenRecordset("books") End Sub

Form 6

30

Dim a As Boolean Dim b As Boolean Dim db As Database Dim rs1 As Recordset Dim rs2 As Recordset Private Sub Command1_Click() rs1.MoveFirst While Not rs1.EOF If (Val(Text1.Text) = rs1(0)) Then a = True rs2.MoveFirst While Not rs2.EOF If (Val(Text2.Text) = rs2(0)) Then b = True rs2.Edit rs2(2) = rs2(2) + 1 rs2.Update MsgBox ("Book is Returned") End If rs2.MoveNext Wend End If rs1.MoveNext Text1.Text = "" Text2.Text = "" Wend If (a = False) Then MsgBox ("Enter correct Student ID") End If If (a = True And b = False) Then MsgBox ("Enter correct Book ID") End If End Sub Private Sub Command2_Click()

31 Form2.Show Unload Me End Sub Private Sub Form_Load() Set db = DBEngine.OpenDatabase("F:\MY PROJECT\PAYROLL PROCESS\LIBRARY1.MDB") Set rs1 = db.OpenRecordset("student") Set rs2 = db.OpenRecordset("books") End Sub

OUTPUT SCREEN:

32

CONCLUSION
Thus the system is developed using object oriented programming approach with the help of CASE tools.

EX.NO:

BANKING SYSTEM

33 DATE:

AIM:
To create Banking System for manipulating bank operation by using VB.

SYSTEM REQUIREMENTS:
FRONT END: VISUAL BASIC BACK END: MS ACCESS

USECASE DIAGRAM:

Approval process

Select type of transactoin

Bank client Deposit saving

withdraw amount

CLASS DIAGRAM

34
login
name password checkdetails() selectchoice()

ministatement deposit
accountno amount depositamount()

withdraw
accountno amount updateaccount()

accountno name transaction date amount getdetails()

balance check
accountnumber name amount checkbalance()

Activity diagram
start

check user details

select transaction to be done

get amount from user and add it with balance

get amount from user and do proper withdraw activity

produce the last transaction details

get the balance amount from the account

stop

COLLABORATION DIAGRAM:

35

2: check details 1: enter user name and password login user

account

5: get the amount from the user 7: return the details to the user 4: get the transactions

3: give permission

control databas e 6: perform the updations

SEQUENCE DIAGRAM:
user login account control database

1: enter user name and password 2: check details 3: give permission 4: get the transactions 5: get the amount from the user 6: perform the updations 7: return the details to the user

FORM DESIGN:

36

SOURCE CODE:
FRONT END (VB 6.0) START PROGRAMS MICROSOFT VISUAL STUDIO 6.0
MICROSOFT VISUAL BASIC 6.0 OPEN STANDARD EXE

FORM 1:

Private Sub Command1_Click() Form2.Show Me.Hide End Sub FORM 2:

Dim db As Database Dim rs As Recordset

37 Private Sub Command1_Click() Do While Not Data1.Recordset.EOF If (Text1.Text = Data1.Recordset(0) And Text2.Text = Data1.Recordset(1)) Then MsgBox ("you can login") Me.Hide Form3.Show GoTo x Else Data1.Recordset.MoveNext End If Loop MsgBox "Wrong user name or password" Text1.Text = "" Text2.Text = "" x: End Sub Private Sub Command2_Click() Me.Hide Form1.Show End Sub Private Sub Form_Load() Set db = DBEngine.OpenDatabase("F:\MY PROJECT\bank project\bank.mdb") Set rs = db.OpenRecordset("atm1") End Sub FORM 3:

Private Sub Command1_Click() Form4.Show Me.Hide End Sub Private Sub Command2_Click() Form5.Show Me.Hide

38 End Sub Private Sub Command3_Click() Form6.Show Me.Hide End Sub Private Sub Command4_Click() Me.Hide Form7.Show End Sub Private Sub Command5_Click() End End Sub FORM 4:

Private Sub Command1_Click() Do While Not Data1.Recordset.EOF If Form2.Text2.Text = Data1.Recordset(1) Then Data1.Recordset.Edit Data1.Recordset(2) = Data1.Recordset(2) + Val(Text1.Text) Data1.Recordset(4) = Data1.Recordset(2) Data1.Recordset(5) = Format(Now, "dd-mm-yyyy") Data1.Recordset(6) = "deposit" Data1.Recordset.Update MsgBox ("ur account be succesfully added...") Me.Hide Form3.Show End If Data1.Recordset.MoveNext Loop End Sub Private Sub Command2_Click() Me.Hide Form3.Show End Sub Private Sub Form_Load()

39 Set db = DBEngine.OpenDatabase("F:\MY PROJECT\bank project\bank.mdb") Set rs = db.OpenRecordset("atm1") End Sub

Form 5

Dim db As Database Dim rs As Recordset Private Sub Command1_Click() Data1.Recordset.MoveFirst Do While Not Data1.Recordset.EOF If Form2.Text2.Text = Data1.Recordset(1) Then Data1.Recordset.Edit Data1.Recordset(2) = Data1.Recordset(2) - Text1.Text Data1.Recordset(4) = Data1.Recordset(2) Data1.Recordset(5) = Format(Now, "dd-mm-yyyy") Data1.Recordset(6) = "withdraw" Data1.Recordset.Update MsgBox ("ur account should be updated") Text1.Text = " " Me.Hide Form3.Show End If Data1.Recordset.MoveNext Loop End Sub Private Sub Command2_Click() Form3.Show Me.Hide End Sub Private Sub Form_Load() Set db = DBEngine.OpenDatabase("F:\MY PROJECT\bank project\bank.mdb")

40 Set rs = db.OpenRecordset("atm1") End Sub

Form 6

Dim db As Database Dim rs As Recordset Private Sub Command1_Click() Data1.Recordset.MoveFirst Do While Not Data1.Recordset.EOF If (Form2.Text1.Text = Data1.Recordset(0) And Form2.Text2.Text = Data1.Recordset(1)) Then Text1.Text = Data1.Recordset(3) Text2.Text = Data1.Recordset(0) Text3.Text = Data1.Recordset(4) Command1.Value = False End If Data1.Recordset.MoveNext Loop End Sub Private Sub Command2_Click() Me.Hide Form3.Show End Sub Private Sub Form_Load() Set db = DBEngine.OpenDatabase("F:\MY PROJECT\bank project\bank.mdb") Set rs = db.OpenRecordset("atm1") End Sub

41

Form 7

Dim db As Database Dim rs As Recordset Dim a As Date Private Sub Command1_Click() rs.MoveFirst Do While Not rs.EOF If Form2.Text2.Text = rs(1) Then a = rs("date") Text1.Text = " the account " + rs(3) + " of the account holder Mr/Mrs/Ms." + rs(0) + " have the balance in their account the sum of rupees " + rs(4) Text1.Text = Form2.Text1.Text + "S the last transaction was " + rs("operation") + " done on " + Format(a, "dd-mm-yyyy") Text1.Locked = True GoTo x Else rs.MoveNext End If Loop x: End Sub Private Sub Command2_Click() End End Sub Private Sub Form_Load() Set db = DBEngine.OpenDatabase("F:\MY PROJECT\bank project\bank.mdb") Set rs = db.OpenRecordset("atm1") End Sub

42

BACK END DESIGN:

OUTPUT SCREEN:

43

CONCLUSION
Thus the system is developed using object oriented programming approach with the help of CASE tools. EX.NO: DATE:

ONLINE SHOPPING SYSTEM

44

AIM:
To create Online Shopping System for manipulation of shopping operation by using VB.

SYSTEM REQUIREMENTS:
FRONT END: VISUAL BASIC BACK END: MS ACCESS

CLASS DIAGRAM

USECASE DIAGRAM

COLLABORATION DIAGRAM SEQUENCE DIAGRAM

45

FORM DESIGN:

SOURCE CODE:
FRONT END (VB 6.0) START PROGRAMS MICROSOFT VISUAL STUDIO 6.0
MICROSOFT VISUAL BASIC 6.0 OPEN STANDARD EXE

FORM 1:

OUTPUT SCREEN:

46

CONCLUSION
Thus the system is developed using object oriented programming approach with the help of CASE tools.

EX.NO: DATE:

ONLINE VOTING SYSTEM

47

AIM:
To create Online Voting System for manipulation of polling operation by using VB.

SYSTEM REQUIREMENTS:
FRONT END: VISUAL BASIC BACK END: MS ACCESS

CLASS DIAGRAM

USECASE DIAGRAM

48

COLLABORATION DIAGRAM

49

50

SEQUENCE DIAGRAM

51

FORM DESIGN: SOURCE CODE:


FRONT END (VB 6.0)
START PROGRAMS MICROSOFT VISUAL STUDIO 6.0 MICROSOFT VISUAL BASIC 6.0 OPEN STANDARD EXE

MAIN FORM Dim db As Database Dim rs As Recordset Private Sub Command1_Click() If Text1.Text = rs(0) And Text2.Text = rs(1) Then Form2.Show Else a = MsgBox("PLEASE FILL ALL THE REQDETAILS", vbExclamation, "WARNING") End If End Sub Private Sub Command2_Click() End End Sub Private Sub Command3_Click() Form3.Show End Sub Private Sub Command4_Click() Form4.Show End Sub

52 Private Sub Form_Load() Set db = DBEngine.OpenDatabase("F:\MY PROJECT\ONLINE VOTING\cricket.mdb") Set rs = db.OpenRecordset("entry") End Sub

FORM 2

Dim db As Database Dim rs As Recordset Private Sub Command1_Click() Dim f As Integer If Option1.Value Then f=1 ElseIf Option2.Value Then f=2 ElseIf Option3.Value Then f=3 ElseIf Option4.Value Then f=4 End If Select Case (f) Case 1: rs.Edit rs("sachin") = Val(rs("sachin")) + 1

53 rs.Update Case 2: rs.Edit rs("dhoni") = Val(rs("dhoni")) + 1 rs.Update Case 3: rs.Edit rs("shewag") = Val(rs("shewag")) + 1 rs.Update Case 4: rs.Edit rs("dravid") = Val(rs("dravid")) + 1 rs.Update End Select MsgBox ("THANX 4 VOTING!") Me.Hide Form1.Show End Sub Private Sub Command2_Click() Me.Hide Form1.Show End Sub Private Sub Form_Load() Set db = DBEngine.OpenDatabase("F:\MY PROJECT\ONLINE VOTING\cricket.mdb") Set rs = db.OpenRecordset("voting") End Sub

FORM 3

Dim db As Database

54 Dim rs As Recordset Private Sub Command1_Click() End End Sub Private Sub Form_Load() Set db = DBEngine.OpenDatabase("F:\MY PROJECT\ONLINE VOTING\cricket.mdb") Set rs = db.OpenRecordset("voting") sachin.Text = Val(rs("sachin")) dhoni.Text = Val(rs("dhoni")) shewag.Text = Val(rs("shewag")) dravid.Text = Val(rs("dravid")) If (Val(rs("sachin")) > Val(rs("dhoni")) And Val(rs("sachin")) > Val(rs("shewag")) And Val(rs("sachin")) > Val(rs("dravid"))) Then Text5.Text = Val(rs("sachin")) Label6.Caption = sachin.Name ElseIf (Val(rs("sachin")) < Val(rs("dhoni")) And Val(rs("dhoni")) > Val(rs("shewag")) And Val(rs("dhoni")) > Val(rs("dravid"))) Then Text5.Text = Val(rs("dhoni")) Label6.Caption = dhoni.Name ElseIf (Val(rs("dravid")) > Val(rs("dhoni")) And Val(rs("dravid")) > Val(rs("shewag")) And Val(rs("sachin")) < Val(rs("dravid"))) Then Text5.Text = Val(rs("dravid")) Label6.Caption = dravid.Name Else Text5.Text = Val(rs("shewag")) Label6.Caption = shewag.Name End If End Sub

FORM 4

55

Dim db As Database Dim rs As Recordset Private Sub Command1_Click() If Val(Text3.Text) < 18 Then a = MsgBox("not enough age") Form1.Show Else rs.AddNew rs(0) = Text1.Text rs(1) = Text2.Text rs(2) = Val(Text3.Text) rs.Update a = MsgBox("table updated") End If End Sub Private Sub Form_Load() Set db = DBEngine.OpenDatabase("F:\MY PROJECT\ONLINE VOTING\cricket.mdb") Set rs = db.OpenRecordset("entry") End Sub

BACK END DESIGN:

56

OUTPUT SCREEN:

57

58

CONCLUSION
Thus the system is developed using object oriented programming approach with the help of CASE tools.

S-ar putea să vă placă și