1

STUDY OF CASE TOOLS

VISUAL MODELLING:

Visual modeling is a way of thinking and analyzing about problems using 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

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

  • Data Modeling
  • Business Modeling
  • Object Modeling
  • Component Modeling

UML Diagrams:

UML defines graphical diagrams such as,

  • Class diagram
  • Use case diagram
  • Behavior diagrams
  • Interaction Diagrams
  • Sequence Diagrams
  • Collaboration Diagrams
  • State Chart Diagrams
  • Activity Diagram
  • Implementation Diagrams
  • Component Diagram
  • 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 outsider’s (actor’s) perspective. A use-case diagram may depict all or some of the use cases of a system.

A use-case diagram can contain:

  • Actor’s (“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 activity’s 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.

State chart diagrams are state centric; statement diagram is used to model the discrete stages of an object’s 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

EMPLOYEE PAYROLL SYSTEM

EX.NO:1

DATE:

1. Problem statement

Software is to be designed for supporting a computerized employee payroll system. All the process involved in a employee payroll is computerized. The salary details have to be recorded and employee must be able to review it. The software which contains all data includes the details such as name, employee department and employee ID.It is access to employee given by the server. The system to be designed such that is automatically checks the data after data stored. The proposal system must satisfy user requirements, designed aesthetic and derive usability and quality assurance

2. Project planning

  1. Algorithm
  2. Start the process
  3. The administrator asks for the employee details.
  4. Then the administrator asks for the salary details
  5. The employee enters the salary details and the pay salary of employee

3. Problem requirement analysis

Basic requirement

  1. Validity of the employee
  2. Enter the salary details of the employee
  3. Ensure the result analysis

Functional requirement

  1. The employee must store the data to database
  2. Each time salary has to be recorded and the employee must be able to review all salary
  3. All data includes the following details: name, employee id, dept etc..
  4. Access to the employee is given by the server
  5. The system to be designed such that it automatically checks the data after stored

Non functional requirement

  1. System should be simple to operate without any formal training
  2. System must be reused and protest from library member and other unauthorized users
  3. Handle network and power failure
  4. Efficient and quick recover from the fault

SYSTEM REQUIREMENTS:

FRONT END : VISUAL BASIC

BACK END: MS ACCESS

USE CASE DIAGRAM

SEQUENTIAL DIAGRAM

COLLOBORATION DIAGRAM

CLASS DIAGRAM

SOURCE CODE AND DESIGN FORM:

FRONT – END (VB 6.0)

START  PROGRAMS  MICROSOFT VISUAL STUDIO 6.0  MICROSOFT VISUAL BASIC 6.0  OPEN STANDARD EXE

FORM 1:

Private Sub ADD_Click()

Data1.Recordset.AddNew

MsgBox "ADD NOW"

Text1.SetFocus

End Sub

Private Sub CALCULATLE_Click()

Text7.Text = Val(Text6.Text) * 0.2

Text8.Text = Val(Text6.Text) * 0.3

Text9.Text = Val(Text6.Text) * 0.1

Text10.Text = Val(Text6.Text) * 0.5

Text11.Text = (Val(Text7.Text) + Val(Text8.Text) + Val(Text9.Text)) - Val(Text10.Text)

Text12.Text = Val(Text6.Text) - Val(Text11.Text)

End Sub

Private Sub DELETE_Click()

Data1.Recordset.DELETE

MsgBox "RECORD DELETED"

End Sub

Private Sub EXIT_Click()

End

End Sub

Private Sub Form_Load()

Me.WindowState = 2

End Sub

Private Sub SAVE_Click()

Data1.Recordset.SAVE

MsgBox "RECORD SAVED"

End Sub

Private Sub UPDATE_Click()

Data1.Recordset.UPDATE

MsgBox "RECORDS UPDATED"

End Sub

BACK – END (MS – ACCESS 7.0)

STEPS:

  1. Goto Add-Ins and click visual data manager.
  2. Goto FileSelect New Select MS-AccessSelect Version 7.0 MDB Give database name and table name save.
  3. Create the database fields.
  4. Insert few records.
  5. Save the file.
  6. Close the database.
  7. Run the VB Program.

OUTPUT SCREEN

Software testing

Test cases

Verification and validation test cases

  1. Faults encounters during entry
  2. System response for irrelevant questions
  3. Mistakes done by user when entering details
  4. Incomplete application submission
  5. Action taken by the system when eligible and unavailability of seats
  6. Time delay in fees remittance
  7. Cancellation registration

User interface test cases

  1. Is it easy to operate?
  2. Understandable
  3. Is it visually pleasing
  4. Is it efficient use
  5. Is there fast recovery from errors

Conclusion

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

EX.NO:2

DATE:

On-Line ShoppingSystem

AIM:

To develop a billing system for shops using visual basic.

Codings:

SOURCE CODE AND DESIGN FORM:

FRONT-END(VB6.0)

START->PROGRAMS->MICROSOFT VISUAL STUDIO 6.0 -> MICROSOFT VISUAL BASIC 6.0 -> OPEN STANDARD EXE.

FRMINDEX:

Private Sub CMDBILL_Click()

FRMBILL.Show

Unload Me

End Sub

Private Sub CMDCDETAILS_Click()

FRMCUS.Show

Unload Me

End Sub

Private Sub CMDEXIT_Click()

X% = MsgBox(" CONFORM EXIT", vbInformation + vbYesNo, "FRIENDS FRUIT SHOP-EXIT CONFORM")

If (X% = vbYes) Then

End

Else

frmindex.Show

End If

End Sub

Private Sub CMDPIZZA_Click()

FRMFRUIT.Show

Unload Me

End Sub

FRMFRUIT

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

Private Sub Command2_Click()

On Error GoTo HAND

X% = MsgBox("CONFORM SAVE", vbInformation + vbYesNo, "CONFORM SAVE")

If (X% = vbYes) Then

Data1.UpdateRecord

MsgBox" RECORD SAVED", vbInformation, "RECORD SAVED"

Else

MsgBox" SAVE ABORTED", vbInformation, "RECORD NOT SAVED"

End If

Exit Sub

HAND:

MsgBoxErr.Description, vbCritical, " EXCUSE ME"

End Sub

Private Sub Command4_Click()

X% = MsgBox("CONFORM DELETE", vbInformation + vbYesNo, "CONFORM SAVE")

If (X% = vbYes) Then

Data1.Recordset.Delete

MsgBox" RECORS DELETED", vbInformation, "EXCUSE ME"

Data1.Recordset.MoveFirst

Else

MsgBox" DELETE ABORTED", vbCritical, "EXSCUSE ME"

End If

End Sub

Private Sub Command5_Click()

Unload Me

End Sub

Private Sub Form_Unload(Cancel As Integer)

frmindex.Show

End Sub

FRMCUSTOMER

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

Private Sub Command2_Click()

On Error GoTo HAND

X% = MsgBox("CONFORM SAVE", vbInformation + vbYesNo, "CONFORM SAVE")

If (X% = vbYes) Then

Data1.UpdateRecord

MsgBox" RECORD SAVED", vbInformation, "RECORD SAVED"

Else

MsgBox" SAVE ABORTED", vbInformation, "RECORD NOT SAVED"

End If

Exit Sub

HAND:

MsgBoxErr.Description, vbCritical, " EXCUSE ME"

End Sub

Private Sub Command4_Click()

X% = MsgBox("CONFORM DELETE", vbInformation + vbYesNo, "CONFORM SAVE")

If (X% = vbYes) Then

Data1.Recordset.Delete

MsgBox" RECORS DELETED", vbInformation, "EXCUSE ME"

Data1.Recordset.MoveFirst

Else

MsgBox" DELETE ABORTED", vbCritical, "EXSCUSE ME"

End If

End Sub

Private Sub Command5_Click()

Unload Me

End Sub

Private Sub Form_Unload(Cancel As Integer)

frmindex.Show

End Sub

FRMBILL

Public KEY As Integer

Private Sub Command1_Click()

If TXTPIZZA.Text = "" Then

MsgBox "enter your type of fruit", vbCritical

Combo1.SetFocus

Else

If TXTQTY.Text = "" Then

MsgBox "enter the quantity", vbInformation

TXTQTY.SetFocus

Else

If (KEY = 0) Then

KEY = 1

Else

KEY = KEY + 1

End If

FG1.Rows = KEY + 1

FG1.TextMatrix(KEY, 1) = TXTPIZZA.Text

FG1.TextMatrix(KEY, 2) = TXTQTY.Text

FG1.TextMatrix(KEY, 3) = TXTUP.Text

FG1.TextMatrix(KEY, 4) = TXTTP.Text

TXTPIZZA.Text = ""

TXTQTY.Text = ""

TXTUP.Text = ""

TXTTP.Text = ""

Combo1.Text = ""

Command2.Enabled = True

End If

End If

End Sub

Private Sub Command2_Click()

Dim TOT As Integer

For i = 1 To KEY

TOT = TOT + Val(FG1.TextMatrix(i, 4))

Next i

TXTNP.Text = TOT

Command3.Enabled = True

End Sub

Private Sub Command3_Click()

On Error GoTo HAND

X% = MsgBox("CONFORM SAVE", vbYesNo + vbInformation, "EXCUSE ME")

If (X% = vbYes) Then

For i = 1 To KEY

Data3.Recordset.AddNew

Data3.Recordset.Fields("BILLNO") = Label4.Caption

Data3.Recordset.Fields("PNAME") = FG1.TextMatrix(i, 1)

Data3.Recordset.Fields("PPRICE") = FG1.TextMatrix(i, 3)

Data3.Recordset.Fields("TOTPRICE") = FG1.TextMatrix(i, 4)

Data3.UpdateRecord

Next i

Data4.Recordset.AddNew

Data4.Recordset.Fields("BILLNO") = Label4.Caption

Data4.Recordset.Fields("BILLDATE") = Label2.Caption

Data4.Recordset.Fields("NP") = TXTNP.Text

Data4.UpdateRecord

Form2.LBNO.Caption = Label4.Caption

Form2.LNP.Caption = Label2.Caption

For i = 1 To KEY

Form2.LFRUIT(Form2.LFRUIT.UBound).Caption = FG1.TextMatrix(i, 1)

Form2.LUP(Form2.LUP.UBound).Caption = FG1.TextMatrix(i, 3)

Form2.LQTY(Form2.LQTY.UBound).Caption = FG1.TextMatrix(i, 2)

Form2.LTOT(Form2.LTOT.UBound).Caption = FG1.TextMatrix(i, 4)

MsgBox ("SUCCESS")

GoTo SA

' FRUIT NAME

Form2.LFRUIT(Form2.LFRUIT.UBound).Left = Form2.LFRUIT(Form2.LFRUIT.UBound - 1).Left

Form2.LFRUIT(Form2.LFRUIT.UBound).Top = Form2.LFRUIT(Form2.LFRUIT.UBound - 1).Top + 250

Form2.LFRUIT(Form2.LFRUIT.UBound).Visible = True

'UNIT PRICE

Form2.LUP(Form2.LUP.UBound).Left = Form2.LUP(Form2.LUP.UBound - 1).Left

Form2.LUP(Form2.LUP.UBound).Top = Form2.LUP(Form2.LUP.UBound - 1).Top + 250

Form2.LUP(Form2.LUP.UBound).Visible = True

'QUANTITY

Form2.LQTY(Form2.LQTY.UBound).Left = Form2.LQTY(Form2.LQTY.UBound - 1).Left

Form2.LQTY(Form2.LQTY.UBound).Top = Form2.LQTY(Form2.LQTY.UBound - 1).Top + 250

Form2.LQTY(Form2.LQTY.UBound).Visible = True

'TOTAL PRICE

Form2.LTOT(Form2.LTOT.UBound).Left = Form2.LTOT(Form2.LTOT.UBound - 1).Left

Form2.LTOT(Form2.LTOT.UBound).Top = Form2.LTOT(Form2.LTOT.UBound - 1).Top + 250

Form2.LTOT(Form2.LTOT.UBound).Visible = True

SA:

Load Form2.LFRUIT(Form2.LFRUIT.UBound + 1)

Load Form2.LUP(Form2.LUP.UBound + 1)

Load Form2.LQTY(Form2.LQTY.UBound + 1)

Load Form2.LTOT(Form2.LTOT.UBound + 1)

Form2.Line3.Y2 = Form2.Line3.Y2 + 500

Form2.Line4.Y2 = Form2.Line4.Y2 + 500

Form2.Line5.Y2 = Form2.Line5.Y2 + 500

Form2.Line6.Y2 = Form2.Line6.Y2 + 500

Form2.Line7.Y2 = Form2.Line7.Y2 + 500

Form2.Frame1.Top = Form2.Frame1.Top + 300

Next i

Form2.Show

MsgBox "RECORDE SAVED", vbInformation, "FRIENDS FRUIT SHOP"

Else

MsgBox "SAVE ABORTED", vbCritical, "FRIENDS FRUIT SHOP"

End If

Command4.Enabled = True

Exit Sub

HAND:

MsgBoxErr.Description, vbCritical, "FRIENDS FRUIT SHOP"

End Sub

Private Sub Command4_Click()

TXTPIZZA.Text = ""

TXTQTY.Text = ""

TXTUP.Text = ""

TXTTP.Text = ""

TXTNP.Text = ""

Data1.Recordset.MoveFirst

Do Until Data1.Recordset.EOF

Combo1.AddItem Data1.Recordset.Fields("PNAME")

Data1.Recordset.MoveNext

Loop

FG1.Clear

If (Data1.Recordset.RecordCount = 0) Then

Label4.Caption = 1

Else

Data3.Recordset.MoveLast

Label4.Caption = Data3.Recordset.Fields("BILLNO") + 1

End If

Command4.Enabled = False

Command1.Enabled = True

Command3.Enabled = False

Combo1.Enabled = True

TXTUP.Enabled = truw

TXTQTY.Enabled = True

TXTTP.Enabled = True

End Sub

Private Sub Command5_Click()

Unload Me

End Sub

Private Sub Form_Load()

KEY = 0

Label2.Caption = Date

Combo1.Enabled = False

TXTUP.Enabled = False

TXTQTY.Enabled = False

TXTTP.Enabled = False

Command3.Enabled = False

End Sub

Private Sub Form_Unload(Cancel As Integer)

frmindex.Show

End Sub

Private Sub Combo1_Click()

TXTPIZZA.Text = Combo1.Text

A = TXTPIZZA.Text

Data2.Recordset.FindFirst ("PNAME='" & A & " ' ")

TXTUP.Text = Data2.Recordset.Fields("PPRICE")

TXTQTY.SetFocus

End Sub

Private Sub TXTQTY_LostFocus()

TXTTP.Text = Val(TXTQTY.Text) * Val(TXTUP.Text)

Command1.Enabled = True

Command1.SetFocus

End Sub

FRMREPORT

Private Sub Command2_Click(Index As Integer)

Command2(1).Visible = False

On Error GoTo HAND

Form2.PrintForm

MsgBox ("Send to Printer")

Unload Me

Exit Sub

HAND:

MsgBox "Printer not connected or switched off", vbCritical, "FRIENDS FRUIT SHOP"

Command2(1).Visible = True

End Sub

USECASE DIAGRAM:

SEQUENTIAL DIAGRAM:

COLLABRATION DIAGRAM:

STATE DIAGRAM

OUTPUT:

FRMINDEX

FRMFRUIT:

FRMCUSTOMER:

FRMBILL

FRMREPORT

OUTPUT:

Thus the billing system for shops are implemented and executed.

EX.NO:3

DATE:

TEXT EDITOR

Objective:

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

System Requirement specification:

  1. The project consist of menu like File, Edit, View, format, Help etc..
  2. Using menu editor we can create the menu and menu options like new,

open ,save, cut, copy, paste, format ,color ,help ,clear ,close ,exit etc..

  1. Using common dialog control we can place the icons for new, open, save etc..
  2. Using rich edit control we can place text box in form window
  3. The coding are written for each menu options

DIAGRAMS

USE CASE DIAGRAM

ACTIVITY DIAGRAM

COLLABORATION DIAGRAM

SEQUENCE DIAGRAM

coding:

Dim str As String

Dim clipfrm As New Form1

Private Sub mnuclear_Click()

Set clipfrm = Screen.ActiveForm

clipfrm.rt.SelText = " "

End Sub

Private Sub mnuclose_Click()

Dim frmclose As New Form1

Set frmclose = Screen.ActiveForm

Unload frmclose

End Sub

Private Sub mnucolor_Click()

Set clipfrm = Screen.ActiveForm

cd.ShowColor

clipfrm.rt.SelColor = cd.Color

End Sub

Private Sub mnucopy_Click()

Set clipfrm = Screen.ActiveForm

str = clipfrm.rt.SelText

End Sub

Private Sub mnucut_Click()

Set clipfrm = Screen.ActiveForm

str = clipfrm.rt.SelText

clipfrm.rt.SelText = ""

End Sub

Private Sub mnuexit_Click()

End

End Sub

Private Sub mnufind_Click()

Dim str As String

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 mnufont_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