CRIME FILE SYSTEM CONTENTS DETAIL PAGE 1. INTRODUCTION 2 2. SYSTEM ANALYSIS 6 2.1 Introduction to system analysis 2.2 Existing System 2.3 Proposed System 2.3.1. Feasibility Study 2.4 Data Flow Diagram 3.SYSTEM DESIGN 16 3.1 Input design 3.2 Output design 3.3 Form design 3.4 Database design 4. SYSTEM IMPLEMENTATION 31 4.1 About Language 4.2 System Configuration 5. APPENDIX 43 5.1 Source Code 6. IMPLEMENTATION AND TESTING 50 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
The function of the List Box is to present a list of items where the user can click and
select the items from the list. In order to add items to the list, we can use the
AddItem method. For example, if you wish to add a number of items to list box 1,
you can key in the following statements
Example
Private Sub Form_Load ( )
List1.AddItem “Lesson1”
List1.AddItem “Lesson2”
List1.AddItem “Lesson3”
List1.AddItem “Lesson4”
End Sub
The items in the list box can be identified by the ListIndex property, the value of the
ListIndex for the first item is 0, the second item has a ListIndex 1, and the second
item has a ListIndex 2 and so on
36
CRIME FILE SYSTEM
The Combo Box
The function of the Combo Box is also to present a list of items where the user can
click and select the items from the list. However, the user needs to click on the small
arrowhead on the right of the combo box to see the items which are presented in a
drop-down list. In order to add items to the list, you can also use the AddItem
method. For example, if you wish to add a number of items to Combo box 1, you can
key in the following statements
Example
Private Sub Form_Load ( )
Combo1.AddItem “Item1”
Combo1.AddItem “Item2”
Combo1.AddItem “Item3”
Combo1.AddItem “Item4”
End Sub
The Check Box
The Check Box control lets the user selects or unselects an option. When the Check
Box is checked, its value is set to 1 and when it is unchecked, the value is set to 0.
You can include the statements Check1.Value=1 to mark the Check Box and
Check1.Value=0 to unmark the Check Box, as well as use them to initiate certain
actions. For example, the program will change the background color of the form to
red when the check box is unchecked and it will change to blue when the check box
is checked. You will learn about the conditional statement if….Then….Elesif in later
37
CRIME FILE SYSTEM
lesson. VbRed and vbBlue are color constants and Back Color is the background color
property of the form.
The Option Box
The Option Box control also lets the user selects one of the choices. However, two or
more Option Boxes must work together because as one of the Option Boxes is
selected, the other Option Boxes will be unselected. In fact, only one Option Box can
be selected at one time. When an option box is selected, its value is set to “True” and
when it is unselected; its value is set to “False”. In the following example, the shape
control is placed in the form together with six Option Boxes. When the user clicks on
different option boxes, different shapes will appear. The values of the shape control
are 0, 1, and 2,3,4,5 which will make it appear as a rectangle, a square, an oval
shape, a rounded rectangle and a rounded square respectively.
Example
Private Sub Option1_Click ( )
Shape1.Shape = 0
End Sub
Private Sub Option2_Click()
Shape1.Shape = 1
End Sub
Private Sub Option3_Click()
38
CRIME FILE SYSTEM
Shape1.Shape = 2
End Sub
Private Sub Option4_Click()
Shape1.Shape = 3
End Sub
Private Sub Option5_Click()
Shape1.Shape = 4
End Sub
Private Sub Option6_Click()
Shape1.Shape = 5
End Sub
The Drive List Box
The Drive ListBox is for displaying a list of drives available in your computer. When
you place this control into the form and run the program, you will be able to select
different drives from your computer as shown in Figure 3.3
The Directory List Box
The Directory List Box is for displaying the list of directories or folders in a selected
drive. When you place this control into the form and run the program, you will be
able to select different directories from a selected drive in your computer as shown
in Figure 3.4
The File List Box
39
CRIME FILE SYSTEM
The File List Box is for displaying the list of files in a selected directory or folder.
When you place this control into the form and run the program, you will be able to
shown the list of files in a selected directory as shown in Figure
You can coordinate the Drive List Box, the Directory List Box and the File List Box to
search for the files you want. The procedure will be discussed in later lessons.
MS ACCESS 2003
Microsoft Access is a powerful program to create and manage your databases. It has many
built in features to assist you in constructing and viewing your information. Access is much
more involved and is a more genuine database application than other programs such as
Microsoft Works. The keywords involved in the process are: Database File, Table, Record,
Field, and Data-type. Here is the Hierarchy that Microsoft Access uses in breaking down a
database.
Database File: This is your main file that encompasses the entire database and that is saved
to your hard-drive or floppy disk.
Example: StudentDatabase.mdb
40
CRIME FILE SYSTEM
Table:A table is a collection of data about a specific topic. There can be multiple tables in a
database.
Field: Fields are the different categories within a Table. Tables usually contain multiple
fields.
Datatypes: Datatypes are the properties of each field. A field only has 1 datatype.
FieldName) Student LastName
Datatype) Text
Starting Microsoft Access
Two Ways
1. Double click on the Microsoft Access icon on the desktop.
2. Click on Start --> Programs --> Microsoft Access
41
CRIME FILE SYSTEM
Creating New, and Opening Existing Databases
The above picture gives you the option to:
Create a New Database from scratch
Use the wizard to create a New Database
Open an existing database
42
CRIME FILE SYSTEM
o The white box gives you the most recent databases you have used. If
you do not see the one you had created, choose the More Files option
and hit OK. Otherwise choose the database you had previously used
and click OK.
4.2 System Configuration
HARDWARE REQUIREMENTS
Processor : X86 Compatible processor
With 1.7 GHz Clock speed
RAM : 512 MB or more
Hard disk : 20 GB or more
Monitor : VGA/SVGA
Keyboard : 104 Keys
Mouse : 2 buttons/ 3 buttons
43
CRIME FILE SYSTEM
SOFTWARE REQUIREMENTS
Operating System : Windows 2000/XP
Front end : Visual Basic 6.0
Back end : MS ACCESS
5. APPENDIX
44
CRIME FILE SYSTEM
5.1 Source Code
Add Complaint
Private Sub cmdAdd_Click()If (cmbComplntNo.Text = "" Or txtStatus.Text = "") Then MsgBox "Missing Fields", vbInformation, "CFS"Elsecon.Execute ("insert into ComplntStatus values(" + cmbComplntNo.Text + ",'" + txtStatus.Text + "')")MsgBox "Status Added Successfully", vbInformation, "Crime File System"txtDetails.Text = ""txtStatus.Text = ""cmbComplntNo.SetFocusEnd IfEnd Sub
Private Sub cmdCancel_Click()Unload MeEnd Sub
Private Sub cmdDetails_Click()Set rs = con.Execute("select Details from ComplaintReg where ComplntNo=" + cmbComplntNo.Text + "")
45
CRIME FILE SYSTEM
If (Not rs.EOF) Then txtDetails.Text = rs(0) txtStatus.SetFocusEnd If
End Sub
Private Sub Form_Load()connectdbSet rs = con.Execute("select ComplntNo from ComplaintReg")While (Not rs.EOF) cmbComplntNo.AddItem rs(0) rs.MoveNextWendrs.CloseEnd Sub
Add user
Private Sub Form_Load()connectdbEnd SubPrivate Sub cmdAdd_Click()Set rs = con.Execute("select * from UserLogin where Username='" + txtUsername.Text + "' and Password='" + txtPassword.Text + "'")If (Not rs.EOF) Then MsgBox "Sorry!! User already exists. Try another username", vbCritical, "Crime File System" txtPassword.Text = "" txtUsername.Text = "" txtUsername.SetFocusElse con.Execute ("insert into UserLogin values('" + txtUsername.Text + "','" + txtPassword.Text + "')") MsgBox "User added sucessfully", vbInformation, "Crime File System" txtPassword.Text = "" txtUsername.Text = "" txtUsername.SetFocusEnd IfEnd Sub
46
CRIME FILE SYSTEM
Private Sub cmdCancel_Click()Unload Me
FIR Report
Dim x As IntegerPrivate Sub cmdShRpt_Click()x = cmbMno.Text If (DataEnvironment1.rsCommand4.State = 1) Then DataEnvironment1.rsCommand4.Close Else DataEnvironment1.Command4 (x) Load DataReportFIR DataReportFIR.Show End IfEnd Sub
Private Sub Form_Load()connectdbSet rs = con.Execute("select Firno from FIR")While (Not rs.EOF) cmbMno.AddItem rs(0) rs.MoveNextWendEnd Sub
Login
Private Sub cmdAdminLog_Click()Set rs = con.Execute("Select * from AdminLogin where Username='" + txtUname.Text + "' and Password='" + txtPass.Text + "'")If (Not rs.EOF) Then MsgBox "Login Success", vbInformation, "Crime File System" frmMDI.mnuLogoff.Enabled = True frmMDI.mnuAdminAddU.Enabled = True frmMDI.mnuAdminDelU.Enabled = True frmMDI.mnuActiv.Enabled = True
Dim x As IntegerPrivate Sub cmdShRpt_Click() x = cmbMno.Text If (DataEnvironment1.rsCommand3.State = 1) Then DataEnvironment1.rsCommand3.Close Else DataEnvironment1.Command3 (x) Load DataReportmortem DataReportmortem.Show End If End Sub
Private Sub Form_Load()connectdbSet rs = con.Execute("select PMortemNo from Postmortem")While (Not rs.EOF) cmbMno.AddItem rs(0) rs.MoveNextWendEnd Sub
Splash
Dim i As IntegerDim x As IntegerOption Explicit
Private Sub Form_Load()File1.FileName = App.Pathx = File1.ListCountEnd Sub
49
CRIME FILE SYSTEM
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)Unload MeEnd Sub
Private Sub Form_Unload(Cancel As Integer)Load frmMDIfrmMDI.Show
End Sub
Private Sub Frame1_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)Unload MeEnd Sub
Private Sub Timer1_Timer()If (Image1.Left <= 6480) Then Image1.Left = Image1.Left + 100Else Image1.Left = 0End IfIf (i <= x) ThenLabel2.Caption = File1.List(i)i = i + 1ElseLoad frmMDIfrmMDI.ShowUnload MeEnd IfEnd Sub
50
CRIME FILE SYSTEM
9. IMPLEMENTATION AND TESTING
51
CRIME FILE SYSTEM
Testing is a process of executing a program with the interest of finding an error. A good test is one that has high probability of finding the yet undiscovered error. Testing should systematically uncover different classes of errors in a minimum amount of time with a minimum amount of efforts. Two classes of inputs are provided to test the process
1. A software configuration that includes a software requirement
specification, a design specification and source code.
2. A software configuration that includes a test plan and procedure, any
testing tool and test cases and their expected results.
Testing is divided into several distinct operations:
1. Unit Testing
Unit test comprises of a set tests performed by an individual program prior to
the integration of the unit into large system. A program unit is usually the smallest
free functioning part of the whole system. Module unit testing should be as
52
CRIME FILE SYSTEM
exhaustive as possible to ensure that each representation handled by each module
has been tested. All the units that makeup the system must be tested independently
to ensure that they work as required. During unit testing some errors were raised and
all of them were rectified and handled well. The result was quiet satisfactory and it
worked well.
2. Integration Testing
Integration testing is a system technique for constructing the program
structure while at the same time conducting tests to uncover errors associated with
interfacing. The objective is to take unit tested modules and build a program
structure that has been dictated by design. Bottom-up integration is the traditional
strategy used to integrate the components of a software system into functioning
whole. Bottom-up integration consists of unit test followed by testing of the entire
system. A sub-system consists of several modules that communicated with other
defined interface.
The system was done the integration testing. All the modules were tested for
their compatibility with other modules .They test was almost successful. All the
modules coexisted very well, with almost no bugs. All the modules were
encapsulated very well so as to not hamper the execution of other modules.
3. Validation Testing
After validation testing, software is completely assembled as a package,
interfacing errors that have been uncovered and corrected and the final series of
software test; the validation test begins. Steps taken during software design and
53
CRIME FILE SYSTEM
testing can greatly improve the probability of successful integration in the larger
system. System testing is actually a series of different tests whose primary purpose is
to fully exercise the compute –based system.
4. Recovery Testing
It is a system that forces the software to fail in a variety of ways and verifies
that the recovery is properly performed.
5. Security Testing
It attempts to verify that protection mechanisms built into a system will in fact
protect it from improper penetration. The system’s security must of course be tested
from in vulnerability form frontal attack.
6. Stress Testing
Stress tools are designed to confront programs with abnormal situations.
Stress testing executes a system in a manner that demands resources in abnormal
quantity and volume.
7. Black Box Testing
Black box testing is done to find out the following information as shown
in below:
1. Incorrect or missing functions.
2. Interface errors.
3. Errors or database access.
4. Performance error.
5. Termination error.
54
CRIME FILE SYSTEM
The mentioned testing is carried out successfully for this
application according to the user’s requirement specification.
8. Test Data Output
After preparing test data, the system under study is tested using the test data.
While testing the system using test data, errors are again uncovered and corrected by
using above testing and corrections are also noted for future use.
7. FUTURE ENHANCEMENT
We can update this system as online application
The main advantage of online application is that, a person can report
the crime anytime from anywhere.
Users can view the progress of their complaint online.
By the future technology user can view the case details and progress of
the complaints on their mobile phones
Face recognition technology can apply. User or witness of the crime can
give the physical information of the thief.
55
CRIME FILE SYSTEM
8. CONCLUSION
CRIME FILE MANAGEMENT SYSTEM initiates the objective of providing the user
with customized and powerful complaint registration and process management
system side software. The software is built with all options such as complaint
registration, prisoner’s registration, and postmortem report generation etc…All the
requirements specified during the analysis and design phase are fully met, thus
resulting in the formation of good software. The interface provided is very user
friendly and flexible for all times.
56
CRIME FILE SYSTEM
9. BIBLIOGRAPHY
Books
A Complete Guide to Programming in Visual Basic .Net
A Complete Visual Basic 6 Training Course: How to Programme:
Package
Advanced Programming Using Visual Basic: Version 6.0