Upload
devish-wakde
View
191
Download
2
Tags:
Embed Size (px)
DESCRIPTION
Project
Citation preview
1Offline Examiner
CONTENTS
1. INTRODUCTION 2 About Project
About Offline Examiner
2. SYSTEM ANALYSIS 6
Introduction
Existing System
Proposed System Data Flow Diagram
3. SYSTEM DESIGN 15
Input design Output design Form design Database design
23 4. APPENDIX
Source Code DFD Screen Shots
5. Normalization 38 Table design
6. SYSTEM IMPLEMENTATION 43
System configuration
7. CONCLUSION 45
8. BIBLIOGRAPHY 46
2Offline Examiner
INTRODUCTION
Offline examiner is a real time project. The project will be
implemented using VB. The aim of the project is to allow teachers to
conduct examinations to the students. There are many unique features in
the project. The students are not allowed to go back to the previous
question once they click the next question. This option is up to the
teachers to decide the teachers can either enable such an option or disable
the option. The teachers are also given option to set the time limit of the
exam. When the students start their exam, after the allotted time, the exam
automatically ends and a grade sheet is printed to the students. The exams
can be of single choice or multiple choices and this also the teachers can
make the decision.
Another important feature of the project is that the students
are not allowed to take the screen shot of the questions as a matter of
security, if students try for such a malpractice an alarm is raised in the
examination hall. Various types of reports can be generated both for the
teachers as well as the administrators.
The software will be used by three different types of users namely1. Students2. Staffs
3. Administrators
3Offline Examiner
The examination can be conducted in any number of
systems in the same lab, so that students of the same batch can do the
examinations at the same time. The questions will be issued to the
students as per the order of the computer i.e. questions will be randomly
displayed to the students.
Some of the modules that will be used in the project are:
Teachers can add new questions to the exam paper
In this software the teachers can add questions to the question set. The
questions are stored in the database. The data base is resides on the server
and the terminals can access the database and conduct the exam using the
stored questions. Teachers of each subject add the respected question
papers with the question set number and the question number. The mark
and time for each question is also set by the teachers. Teachers have to
manually enter the questions.
Teachers can set the duration of the exam
The examination duration is also set by the teachers. After the specific
time the answers are submitted to the database via the network and we
cannot answer any questions after the submission. The duration for each
exam is varied depends on the type of the examination and the type of the
subject. There are timers also for control the time duration of the
examination.
Students attend the exam
Students can attend the examination with the login username and the
password. The username and password is given by the administrator. The
authentication of the software is done using the username and password.
4Offline Examiner
The username and password is passing through the network to the server
system and the authorization is done on that system. Each student can
attend the exam for 3 time with the given user name and password. After
that they have to re-register to attend the exam.
Administrators can generate various types of reports
In this software administrator has the power to conduct the examination
and he can view the various reports like the result and the list of the passed
students, the list of students apply for the examination and the list of
student who attend the examination etc. He can get the report of the whole
examination and the percentage of mark obtained by each student. And
also he can calculate number of students passed for a particular exam in a
class.
Administrators can enable security settings.
Administrator has the control over the software and the entire system.
Administrator can add new user (teachers) and can give user name and
password. Administrator gives the username and password to the
registered students and the student can login to the system only giving the
username and password. The administrator give security like students
cannot take the screenshots of the examination screen, cannot write exam
after the specific time, cannot answer for a previous question and cannot
change the already answered question. After the specified time the
answers are submitted to the server automatically.
Print out of the grade sheet is issued when the student completes the
exam, or when the duration is finished
5Offline Examiner
After the completion of the examination the answers are submitted for
further process. The answers are compared with the database and the grade
for the students is calculated after result comparison. The students can
view and take printouts as mark sheet or score sheets using the software. If
any printer is connected with the system using software we can take the
printouts and this is the official score sheets for the students.
Students can view their past exam history
Students have the advantage that they can view the history of the
examination they wrote. They can then analyze the answers and thus find
the errors they done. The history of the examinations are stored on the
server so the administrator or the students can take the reports as hardcopy
any time.
6Offline Examiner
SYSTEM ANALYSIS
Introduction to System Analysis
System analysis is a process of gathering and interpreting facts,
diagnosing problems and the information to recommend improvements on
the system. It is a problem solving activity that requires intensive
communication between the system users and system developers. System
analysis or study is an important phase of any system development
process. The system is studied to the minutest detail and analyzed. The
system analyst plays the role of the interrogator and dwells deep into the
working of the present system. The system is viewed as a whole and the
input to the system are identified. The outputs from the organizations are
traced to the various processes. System analysis is concerned with
becoming aware of the problem, identifying the relevant and decisional
variables, analyzing and synthesizing the various factors and determining
an optimal or at least a satisfactory solution or program of action.
A detailed study of the process must be made by various techniques
like interviews, questionnaires etc. The data collected by these sources
must be scrutinized to arrive to a conclusion. The conclusion is an
understanding of how the system functions. This system is called the
existing system. Now the existing system is subjected to close study and
problem areas are identified. The designer now functions as a problem
solver and tries to sort out the difficulties that the enterprise faces. The
solutions are given as proposals. The proposal is then weighed with the
existing system analytically and the best one is selected. The proposal is
7Offline Examiner
presented to the user for an endorsement by the user. The proposal is
reviewed on user request and suitable changes are made. This is loop that
ends as soon as the user is satisfied with proposal.
Preliminary study is the process of gathering and interpreting facts,
using the information for further studies on the system. Preliminary study
is problem solving activity that requires intensive communication between
the system users and system developers. It does various feasibility studies.
In these studies a rough figure of the system activities can be obtained,
from which the decision about the strategies to be followed for effective
system study and analysis can be taken.
Existing System
In the existing system the exams are done only manually but in
proposed system we have to computerize all the exams using this
software.
Lack of security of data.
More man power.
Time consuming.
Consumes large volume of pare work.
Needs manual calculations.
No direct role for the higher officials.
Proposed System
The aim of proposed system is to develop a system of improved
facilities. The proposed system can overcome all the limitations of the
existing system. The system provides proper security and reduces the
manual work.
Security of data.
Ensure data accuracy’s.
8Offline Examiner
Proper control of the higher officials.
Minimize manual data entry.
Minimum time needed for the various processing.
Greater efficiency.
Better service.
User friendliness and interactive.
Minimum time required.
2.3. FEASIBILITY STUDY
Feasibility study is made to see if the project on completion will serve
the purpose of the organization for the amount of work, effort and the time
that spend on it. Feasibility study lets the developer foresee the future of
the project and the usefulness. A feasibility study of a system proposal is
according to its workability, which is the impact on the organization,
ability to meet their user needs and effective use of resources. Thus when
a new application is proposed it normally goes through a feasibility study
before it is approved for development.
The document provide the feasibility of the project that is being
designed and lists various areas that were considered very carefully during
the feasibility study of this project such as Technical, Economic and
Operational feasibilities. The following are its features:
2.3.1. TECHNICAL FEASIBILITY
The system must be evaluated from the technical point of view first.
The assessment of this feasibility must be based on an outline design of
the system requirement in the terms of input, output, programs and
procedures. Having identified an outline system, the investigation must go
9Offline Examiner
on to suggest the type of equipment, required method developing the
system, of running the system once it has been designed.
Technical issues raised during the investigation are:
Does the existing technology sufficient for the
suggested one?
Can the system expand if developed?
The project should be developed such that the necessary functions and
performance are achieved within the constraints. The project is developed
within latest technology. Through the technology may become obsolete
after some period of time, due to the fact that never version of same
software supports older versions, the system may still be used. So there are
minimal constraints involved with this project. The system has been
developed using Java the project is technically feasible for development.
2.3.2. ECONOMIC FEASIBILITY
The developing system must be justified by cost and benefit. Criteria
to ensure that effort is concentrated on project, which will give best, return
at the earliest. One of the factors, which affect the development of a new
system, is the cost it would require.
The following are some of the important financial questions asked
during preliminary investigation:
The costs conduct a full system investigation.
The cost of the hardware and software.
10Offline Examiner
The benefits in the form of reduced costs or fewer costly
errors.
Since the system is developed as part of project work, there is no
manual cost to spend for the proposed system. Also all the resources are
already available, it give an indication of the system is economically
possible for development.
2.3.3. BEHAVIORAL FEASIBILITY
This includes the following questions:
Is there sufficient support for the users?
Will the proposed system cause harm?
The project would be beneficial because it satisfies the objectives when
developed and installed. All behavioral aspects are considered carefully
and conclude that the project is behaviorally feasible.
DATA FLOW DIAGRAM
A Data Flow Diagram (DFD) is a diagram that describes the flow of data and
the processes that change or transform data throughout a system. It’s a structured analysis
and design tool that can be used for flowcharting in place of, or in association with,
information oriented and process oriented system flowcharts. When analysts prepare the
Data Flow Diagram, they specify the user needs at a level of detail that virtually
determines the information flow into and out of the system and the required data
resources. This network is constructed by using a set of symbols that do not imply a
11Offline Examiner
physical implementation. The Data Flow Diagram reviews the current physical system,
prepares input and output specification, specifies the implementation plan etc.
Four basic symbols are used to construct data flow diagrams. They are symbols that
represent data source, data flows, and data transformations and data storage. The points at
which data are transformed are represented by enclosed figures, usually circles, which are
called nodes.
Data Flow Diagram Symbols:-
_ Source or Destination of data
_ Data Flow
_ Process
_ Storage
Level 0 DFD
Offline ExaminerAdministrator
Admin details
Teachers
Teacher Details
StudentsStudent Details
12Offline Examiner
Level 1 DFD Administrator
Level 1 DFD Teacher
Administrator
Login
Login
Offline Examiner
Student details
results
Login
Admin id, password
validate
verify
StudentAdd login details
View results
Add Details
Validate
Verify
Login
login id, password
login
Questions
Add QuestionsTeacher
Add Questions and set time
Questions
13Offline Examiner
Level 1 DFD Student
Level 2 DFD Administrator
validate
login id, password
Student OfflineExaminer
login
Store results
results
Select exam
Login
verify
User Details
details
Administrator
View reports
Add User
User details
Login
reports
Delete User
View reportsView reports
Delete
Login id, password
User details
Select User
14Offline Examiner
Level 2 DFD Student
QuestionWrite exam
Student
View history
View grade
Results
Select exam
Get details
Get grade
View history
Questions
Store results
grade
15Offline Examiner
SYSTEM DESIGN
Introduction to System Design
Design is the first step into the development phase for any engineered
product or system. Design is a creative process. A good design is the key
to effective system. The term “design” is defined as “the process of
applying various techniques and principles for the purpose of defining a
process or a system in sufficient detail to permit its physical realization”.
It may be defined as a process of applying various techniques and
principles for the purpose of defining a device, a process or a system in
sufficient detail to permit its physical realization. Software design sits at
the technical kernel of the software engineering process and is applied
regardless of the development paradigm that is used. The system design
develops the architectural detail required to build a system or product. As
in the case of any systematic approach, this software too has undergone
the best possible design phase fine tuning all efficiency, performance and
accuracy levels. The design phase is a transition from a user oriented
document to a document to the programmers or database personnel.
System design goes through two phases of development: Logical and
Physical Design.
Input design
The design of input focuses on controlling the amount of input
required, controlling the errors, avoiding delay, avoiding extra steps and
keeping the process simple. The input is designed in such a way so that it
16Offline Examiner
provides security and ease of use with retaining the privacy. Input Design
considered the following things:
o What data should be given as input?
o How the data should be arranged or coded?
o The dialog to guide the operating personnel in providing input.
o Methods for preparing input validations and steps to follow when error
occur.
OUTPUT DESIGN
A quality output is one, which meets the requirements of the end user
and presents the information clearly. In output design it is determined how
the information is to be displaced for immediate need and also the hard
copy output. It is the most important and direct source information to the
user. Efficient and intelligent output design improves the system’s
relationship to help user decision-making.
Designing computer output should proceed in an organized, well
thought out manner; the right output must be developed while ensuring
that each output element is designed so that people will find the system
can use easily and effectively. When analysis design computer output,
they should :
Identify the specific output that is needed to meet the requirements.
Select methods for presenting information.
Create document, report, or other formats that contain information
produced by the system.
17Offline Examiner
Form design- Sample Screen Shots
18Offline Examiner
19Offline Examiner
20Offline Examiner
21Offline Examiner
22Offline Examiner
23Offline Examiner
Sample Coding
Login
Private Sub cmdAdminLog_Click()Set rs = con.Execute("select * from Adminlogin where Username='" + txtUsername.Text + "' and Password='" + txtPassword.Text + "'")If (Not rs.EOF) Then MsgBox "Login Success", vbInformation, "Offline Examiner" Unload MeEnd Ifrs.CloseEnd Sub
Private Sub cmdCancel_Click()Unload MeEnd SubPrivate Sub cmdTchLog_Click()Set rs = con.Execute("select * from Userlogin where Username='" + txtUsername.Text + "' and Password='" + txtPassword.Text + "'")If (Not rs.EOF) Then MsgBox "Login Success", vbInformation, "Offline Examiner"
24Offline Examiner
Unload MeEnd IfEnd Sub
Private Sub Form_Load()connectdbEnd Sub
Add Branch
Private Sub cmdAdd_Click()If (txtbrname.Text = "" Or txtbrcode.Text = "" Or txtsem.Text = "") Then MsgBox "Missing Fields", vbInformation, "Offline Examiner"Else con.Execute ("insert into Branch values('" + txtbrname.Text + "','" + txtbrcode.Text + "'," + txtsem.Text + ")") MsgBox "Record added successfully", vbInformation, "Offline Examiner" txtbrname.Text = "" txtbrcode.Text = "" txtsem.Text = "" txtbrname.SetFocusEnd IfEnd Sub
Private Sub cmdCancel_Click()Unload MeEnd Sub
Private Sub Form_Load()connectdbEnd Sub
Add Subject
Dim x As IntegerDim i As Integer
Private Sub cmbBranch_Click() cmbSem.Clear Set rs = con.Execute("select Sem from Branch where Branchcode='" + cmbBranch.Text + "'") If (Not rs.EOF) Then
25Offline Examiner
x = rs(0) For i = 1 To x cmbSem.AddItem i Next End If End Sub
Private Sub cmdAdd_Click()If (cmbBranch.Text = "" Or cmbSem.Text = "" Or txtSubname.Text = "" Or txtSubCode.Text = "") Then MsgBox "Missing Fields", vbInformation, "Offline Examiner"Else con.Execute ("insert into Subjects values('" + cmbBranch.Text + "'," + cmbSem.Text + ",'" + txtSubname.Text + "','" + txtSubCode.Text + "')") MsgBox "Record added sucessfully", vbInformation, "Offline Examiner" txtSubname.Text = "" txtSubCode.Text = "" txtSubname.SetFocusEnd IfEnd Sub
Private Sub cmdCancel_Click()Unload MeEnd Sub
Private Sub Form_Load()connectdbSet rs = con.Execute("select * from Branch")While (Not rs.EOF) cmbBranch.AddItem rs(1) rs.MoveNextWendrs.CloseEnd Sub
Add Questions
Dim x, i As IntegerDim exid As StringDim eID As StringDim Qno As Integer
Private Sub cmbBranch_Click()cmbSem.Clear
26Offline Examiner
Set rs = con.Execute("select Sem from Branch where Branchcode='" + cmbBranch.Text + "'") If (Not rs.EOF) Then x = rs(0) For i = 1 To x cmbSem.AddItem i Next End If rs.CloseEnd Sub
Private Sub cmbSem_Click() cmbSubjects.Clear Set rs = con.Execute("select Subjectname from Subjects where Branchcode='" + cmbBranch.Text + "' and Sem=" + cmbSem.Text + "") While (Not rs.EOF) cmbSubjects.AddItem rs(0) rs.MoveNext Wend rs.CloseEnd SubPrivate Sub cmbSubjects_Click() Set rs = con.Execute("select Subjectcode from Subjects where Subjectname='" + cmbSubjects.Text + "' and BranchCode='" + cmbBranch.Text + "'") If (Not rs.EOF) Then txtSubCode.Text = rs(0) End If rs.CloseEnd Sub
Private Sub cmdAdd_Click()If (txtAns.Text = "" Or txtOpt1.Text = "" Or txtOpt2.Text = "" Or txtOpt3.Text = "" Or txtOpt4.Text = "" Or txtQst.Text = "") Then MsgBox "Missing Fields", vbInformation, "Offline Examiner"Else If (txtOpt1.Text <> txtAns.Text And txtOpt2.Text <> txtAns.Text And txtOpt3.Text <> txtAns.Text And txtOpt4.Text <> txtAns.Text) Then MsgBox "Answer key does not match any one of 4 options", vbCritical, "Offline Examiner" txtAns.Text = "" txtAns.SetFocus Else exid = cmbBranch.Text + txtDate.Text + txtSubCode.Text
27Offline Examiner
con.Execute ("insert into Questions values('" + cmbBranch.Text + "'," + cmbSem.Text + _ ",'" + txtSubCode.Text + "','" + exid + "','" + lblQno.Caption + _ "','" + txtQst.Text + "','" + txtOpt1.Text + "', '" + txtOpt2.Text + _ "','" + txtOpt3.Text + "','" + txtOpt4.Text + "','" + txtAns.Text + "')") con.Execute ("insert into ExamDetails values('" + cmbBranch.Text + "'," + cmbSem.Text + _ ",'" + txtSubCode.Text + "','" + exid + "','" + txtDate.Text + "','" + txtTime.Text + "')") MsgBox "Question Added Successfully", vbInformation, "Offline Examiner" txtAns.Text = "" txtOpt1.Text = "" txtOpt2.Text = "" txtOpt3.Text = "" txtOpt4.Text = "" txtQst.Text = "" txtQst.SetFocus lblQno.Caption = lblQno.Caption + 1 End IfEnd IfEnd Sub
Private Sub cmdCancel_Click()Unload MeEnd Sub
Private Sub cmdNext_Click()If (txtSubCode.Text = "" Or txtDate.Text = "" Or txtTime.Text = "") Then MsgBox "Please Select and fill all the fields" Frame1.Visible = True Frame2.Visible = FalseElse lblSubName.Caption = cmbSubjects.Text lblSubCode.Caption = txtSubCode.Text eID = cmbBranch.Text + txtDate.Text + txtSubCode.Text Set rs = con.Execute("select count(*) from Questions where BranchCode='" + cmbBranch.Text + _ "' and Sem=" + cmbSem.Text + " and SubjectCode='" + txtSubCode.Text + _ "' and ExamID='" + eID + "'") If (Not rs.EOF) Then Qno = rs(0)
28Offline Examiner
Qno = Qno + 1 Else Qno = 1 End If lblQno.Caption = Qno Frame1.Visible = False Frame2.Visible = TrueEnd IfEnd Sub
Private Sub Form_Load()Frame1.Visible = TrueFrame2.Visible = FalseconnectdbSet rs = con.Execute("select * from Branch")While (Not rs.EOF) cmbBranch.AddItem rs(1) rs.MoveNextWendrs.CloseEnd Sub
Add User
Private 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, "Offline Examiner" txtPassword.Text = "" txtUsername.Text = "" txtUsername.SetFocusElse con.Execute ("insert into Userlogin values('" + txtUsername.Text + "','" + txtPassword.Text + "')") MsgBox "User added sucessfully", vbInformation, "Offline Examiner" txtPassword.Text = "" txtUsername.Text = "" txtUsername.SetFocusEnd If
29Offline Examiner
End Sub
Private Sub cmdCancel_Click()Unload MeEnd Sub
Private Sub Form_Load()connectdbEnd Sub
Change Password
Private Sub cmdCancel_Click()Unload MeEnd Sub
Private Sub cmdChange_Click()If (txtConfrmpass.Text = txtNewpass.Text) Then Set rs = con.Execute("select * from Userlogin where Username='" + cmbUsername.Text + "' and password='" + txtcurpassword.Text + "'") If (Not rs.EOF) Then con.Execute ("update Userlogin set Password='" + txtNewpass.Text + "' where Username='" + cmbUsername.Text + "'") MsgBox "Password successfully updated!!", vbInformation, "Offline Examiner" Else MsgBox "Invalid Password", vbCritical, "Offline Examiner" txtcurpassword.Text = "" txtcurpassword.SetFocus End IfElse MsgBox "Password Mismatch!!", vbInformation, "Offline examiner" txtConfrmpass.Text = "" txtNewpass.Text = "" txtNewpass.SetFocusEnd IfEnd Sub
Private Sub Form_Load()connectdbSet rs = con.Execute("select * from Userlogin")While (Not rs.EOF) cmbUsername.AddItem rs(0) rs.MoveNextWendrs.Close
30Offline Examiner
End Sub
Delete User
Private Sub cmdCancel_Click()Unload MeEnd Sub
Private Sub cmdDelete_Click()con.Execute ("delete from Userlogin where Username='" + cmbUsername.Text + "'")MsgBox "User deleted sucessfully!!", vbInformation, "Offline Examiner"cmbUsername.Text = ""End Sub
Private Sub Form_Load()connectdbSet rs = con.Execute("select * from Userlogin")While (Not rs.EOF) cmbUsername.AddItem rs(0) rs.MoveNextWendEnd Sub
Select Exam
Dim dt As Date
Private Sub cmbBranch_Click()cmbSem.ClearSet rs = con.Execute("select Sem from Branch where BranchCode='" + cmbBranch.Text + "'") If (Not rs.EOF) Then x = rs(0) For i = 1 To x cmbSem.AddItem i Next End If rs.CloseEnd Sub
Private Sub cmbExID_Click()Set rs = con.Execute("select Time from ExamDetails where ExamId='" + cmbExID.Text + "'")
31Offline Examiner
If (Not rs.EOF) Then txtTime.Text = rs(0)End Ifrs.CloseEnd Sub
Private Sub cmbSem_Click() cmbSub.Clear Set rs = con.Execute("select Subjectname from Subjects where Branchcode='" + cmbBranch.Text + "' and Sem=" + cmbSem.Text + "") While (Not rs.EOF) cmbSub.AddItem rs(0) rs.MoveNext Wend rs.CloseEnd Sub
Private Sub cmbSub_Click()
Set rs = con.Execute("select Subjectcode from Subjects where Subjectname='" + cmbSub.Text + "'") If (Not rs.EOF) Then txtSubCode.Text = rs(0) End If rs.CloseSet rs = con.Execute("select distinct(ExamID) from ExamDetails where BranchCode='" + cmbBranch.Text + _ "' and Sem=" + cmbSem.Text + " and SubjectCode='" + txtSubCode.Text + "' and ExDate=#" & Date & "#") While (Not rs.EOF) cmbExID.AddItem rs(0) rs.MoveNext Wend rs.CloseEnd Sub
Private Sub cmdStart_Click()If (cmbBranch.Text = "" Or cmbExID.Text = "" Or cmbSem.Text = "" Or cmbSub.Text = "") Then MsgBox "Missing fields, Please fill up all", vbInformation, "Offline Examner"Else bcode = cmbBranch.Text sem = cmbSem.Text
32Offline Examiner
subcode = txtSubCode.Text exid = cmbExID.Text Load frmExam frmExam.Show Unload MeEnd IfEnd Sub
Private Sub Command1_Click()Unload MeEnd Sub
Private Sub Form_Load()connectdbSet rs = con.Execute("select * from Branch")While (Not rs.EOF) cmbBranch.AddItem rs(1) rs.MoveNextWendrs.CloseEnd Sub
Start Exam
Private Sub cmdCancel_Click()Unload MeEnd Sub
Private Sub cmdEnter_Click()Set rs = con.Execute("select * from Student where Username='" + txtUname.Text + "' and Password='" + txtPass.Text + "'")If (Not rs.EOF) Then MsgBox "Login Success", vbInformation, "Offline Examiner" uname = txtUname.Text Load frmSelectExam frmSelectExam.Show Unload MeElse MsgBox "Invalid Username or Password", vbCritical, "Offline Examiner"
33Offline Examiner
End If
End Sub
Private Sub Form_Load()connectdbEnd Sub
Exam
Dim x As IntegerDim ar(5) As IntegerDim y, i As IntegerDim Qcnt As IntegerDim z As IntegerDim ans As StringDim selected As StringDim mark As IntegerDim rslt As String
Private Sub cmdFinish_Click()If (mark >= 3) Then rslt = "Passed"Else rslt = "Failed"End Ifcon.Execute ("insert into Result values('" & uname & "','" & bcode & "'," & sem & ",'" & subcode & "','" & exid & "'," & mark & ",'" & rslt & "')")MsgBox markUnload MeEnd Sub
Private Sub cmdNext_Click()Qcnt = Qcnt + 1If (Qcnt <= 5) ThenSet rs = con.Execute("select * from Questions where BranchCode='" & bcode & "' and Sem=" & sem & " and SubjectCode='" & subcode & "' and ExamID='" & exid & "' and Qno=" & ar(Qcnt - 1) & " ")If (Not rs.EOF) Then lblQno.Caption = Qcnt lblQst.Caption = rs(5) Option1.Caption = rs(6) Option2.Caption = rs(7) Option3.Caption = rs(8) Option4.Caption = rs(9) ans = rs(10)
34Offline Examiner
If (Option1.Value = True) Then selected = Option1.Caption ElseIf (Option2.Value = True) Then selected = Option2.Caption ElseIf (Option3.Value = True) Then selected = Option3.Caption ElseIf (Option4.Value = True) Then selected = Option4.Caption End If End IfElse MsgBox "Exam Completed", vbInformation, "Offline Examiner" cmdNext.Enabled = False cmdFinish.Enabled = TrueEnd IfIf (ans = selected) Then mark = mark + 1End IfEnd Sub
Private Sub Form_Load()connectdbQcnt = 1Set rs = con.Execute("select count(*) from Questions where BranchCode='" + bcode + "' and Sem=" & sem & " and SubjectCode='" + subcode + "' and ExamID='" + exid + "' ")If (Not rs.EOF) Then x = rs(0)End Ifrs.Closey = RandomNumbers(x, 2, 5)For i = LBound(y) To UBound(y)ar(i) = y(i)NextFor i = 0 To 4' If (ar(i) = 0) Then' ar(i) = 1' End If 'MsgBox ar(i)
NextSet rs = con.Execute("select * from Questions where BranchCode='" & bcode & "' and Sem=" & sem & " and SubjectCode='" & subcode & "' and ExamID='" & exid & "' and Qno=" & ar(0) & " ")If (Not rs.EOF) Then
35Offline Examiner
lblQno.Caption = Qcnt lblQst.Caption = rs(5) Option1.Caption = rs(6) Option2.Caption = rs(7) Option3.Caption = rs(8) Option4.Caption = rs(9)End Ifrs.ClosecmdFinish.Enabled = FalseEnd SubPublic Function RandomNumbers(Upper As Integer, _ Optional Lower As Integer = 1, _ Optional HowMany As Integer = 1, _ Optional Unique As Boolean = True) As Variant
On Error GoTo LocalError If HowMany > ((Upper + 1) - (Lower - 1)) Then Exit Function Dim x As Integer Dim n As Integer Dim arrNums() As Variant Dim colNumbers As New Collection ReDim arrNums(HowMany - 1) With colNumbers 'First populate the collection For x = Lower To Upper .Add x Next x For x = 0 To HowMany - 1 n = RandomNumber(0, colNumbers.Count + 1) arrNums(x) = colNumbers(n) If Unique Then colNumbers.Remove n End If Next x End With Set colNumbers = Nothing RandomNumbers = arrNumsExit FunctionLocalError: 'Justin (just in case) RandomNumbers = ""End Function
Public Function RandomNumber(Upper As Integer, _
36Offline Examiner
Lower As Integer) As Integer 'Generates a Random Number BETWEEN the LOWER and UPPER values Randomize RandomNumber = Int((Upper - Lower + 1) * Rnd + Lower) End Function
DATABASE DESIGN
A database is an organized mechanism that has the capability of storing
information through which a user can retrieve stored information in an
effective and efficient manner. The data is the purpose of any database and
must be protected.
The database design is a two level process. In the first step, user
requirements are gathered together and a database is designed which will
meet these requirements as clearly as possible. This step is called
Information Level Design and it is taken independent of any individual
DBMS.
In the second step, this Information level design is transferred into a
design for the specific DBMS that will be used to implement the system in
question. This step is called Physical Level Design, concerned with the
characteristics of the specific DBMS that will be used. A database design
runs parallel with the system design. The organization of the data in the
database is aimed to achieve the following two major objectives.
Data Integrity
Data independence
Normalization is the process of decomposing the attributes in an
application, which results in a set of tables with very simple structure. The
37Offline Examiner
purpose of normalization is to make tables as simple as possible.
Normalization is carried out in this system for the following reasons.
To structure the data so that there is no repetition of data , this helps in
saving.
To permit simple retrieval of data in response to query and report request.
To simplify the maintenance of the data through updates, insertions,
deletions.
To reduce the need to restructure or reorganize data which new application
requirements arise.
RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS):
A relational model represents the database as a collection of relations.
Each relation resembles a table of values or file of records. In formal
relational model terminology, a row is called a tuple, a column header is
called an attribute and the table is called a relation. A relational database
consists of a collection of tables, each of which is assigned a unique name.
A row in a tale represents a set of related values.
RELATIONS, DOMAINS & ATTRIBUTES:
A table is a relation. The rows in a table are called tuples. A tuple is an
ordered set of n elements. Columns are referred to as attributes.
Relationships have been set between every table in the database. This
ensures both Referential and Entity Relationship Integrity. A domain D is
a set of atomic values. A common method of specifying a domain is to
specify a data type from which the data values forming the domain are
drawn. It is also useful to specify a name for the domain to help in
interpreting its values. Every value in a relation is atomic, that is not
decomposable.
38Offline Examiner
RELATIONSHIPS:
Table relationships are established using Key. The two main keys of
prime importance are Primary Key & Foreign Key. Entity Integrity and
Referential Integrity Relationships can be established with these
keys.Entity Integrity enforces that no Primary Key can have null
values.Referential Integrity enforces that no Primary Key can have null
values.
Referential Integrity for each distinct Foreign Key value, there must exist
a matching Primary Key value in the same domain. Other key are Super
Key and Candidate Keys.
Relationships have been set between every table in the database. This
ensures both Referential and Entity Relationship Integrity.
NORMALIZATION:
As the name implies, it denoted putting things in the normal form. The
application developer via normalization tries to achieve a sensible
organization of data into proper tables and columns and where names can
be easily correlated to the data by the user. Normalization eliminates
repeating groups at data and thereby avoids data redundancy which proves
to be a great burden on the computer resources. These includes:
Normalize the data.
Choose proper names for the tables and columns.
Choose the proper name for the data.
First Normal Form:
39Offline Examiner
The First Normal Form states that the domain of an attribute must
include only atomic values and that the value of any attribute in a tuple
must be a single value from the domain of that attribute. In other words
1NF disallows “relations within relations” or “relations as attribute values
within tuples”. The only attribute values permitted by 1NF are single
atomic or indivisible values.
The first step is to put the data into First Normal Form. This can be
donor by moving data into separate tables where the data is of similar type
in each table. Each table is given a Primary Key or Foreign Key as per
requirement of the project. In this we form new relations for each
nonatomic attribute or nested relation. This eliminated repeating groups of
data.
A relation is said to be in first normal form if only if it satisfies the
constraints that contain the primary key only.
Second Normal Form:
According to Second Normal Form, For relations where primary key
contains multiple attributes, no nonkey attribute should be functionally
dependent on a part of the primary key.
In this we decompose and setup a new relation for each partial key with
its dependent attributes. Make sure to keep a relation with the original
primary key and any attributes that are fully functionally dependent on it.
This step helps in taking out data that is only dependant on apart of the
key.
40Offline Examiner
A relation is said to be in second normal form if and only if it satisfies
all the first normal form conditions for the primary key and every non-
primary key attributes of the relation is fully dependent on its primary key
alone.
Third Normal Form:
According to Third Normal Form, Relation should not have a nonkey
attribute functionally determined by another nonkey attribute or by a set of
nonkey attributes. That is, there should be no transitive dependency on the
primary key.
In this we decompose and set up relation that includes the nonkey
attributes that functionally determines other nonkey attributes. This step is
taken to get rid of anything that does not depend entirely on the Primary
Key.
A relation is said to be in third normal form if only if it is in second
normal form and more over the non key attributes of the relation should
not be depend on other non key attribute.
Table Design
Table: Admin Login
Primary: Username
Field Name Data Type Constrains Description
41Offline Examiner
Username Text Not Null Primary KeyPassword Text Not Null
Table: Branch
Primary: BranchCode
Field Name Data Type Constrains Description
BranchName Text Not Null
BranchCode Text Not Null Primary Key
Sem Number Not Null
Table: ExamDetails
Primary: ExamID
Field Name Data Type Constrains Description
BranchName Text Not Null
BranchCode Text Not Null
Sem Number Not Null
SubjectCode Text Not Null
ExamId Text Not Null Primary Key
ExamDate Date/Time Not Null
Time Date/Time Not Null
Table: Questions
Primary: ExamID
42Offline Examiner
Field Name Data Type Constrains Description
BranchName Text Not Null
BranchCode Text Not Null
Sem Number Not Null
SubjectCode Text Not Null
ExamId Text Not Null Primary Key
Qst Text Not Null
Choice 1 Text Not Null
Choice 2 Text Not Null
Choice 3 Text Not Null
Choice 4 Text Not Null
Answer Text Not Null
Table: Results
Primary: ExamID
Field Name Data Type Constrains Description
Username Text Not Null
BranchName Text Not Null
BranchCode Text Not Null
Sem Number Not Null
SubjectCode Text Not Null
ExamId Text Not Null Primary Key
Mark Number Not Null
Result Text Not Null
43Offline Examiner
Table: Student
Primary: Username
Field Name Data Type Constrains DescriptionUsername Text Not Null Primary KeyPassword Text Not Null
Table: Subjects
Primary: SubjectCode
Field Name Data Type Constrains Description
BranchCode Text Not Null
Sem Number Not Null
SubjectCode Text Not Null Primary Key
SubjectName Text Not Null
SYSTEM IMPLEMENTATION
About Language
Microsoft Visual Basic 6.0
Visual Basic 6.0 is Microsoft’s latest version of the Visual Basic Programming
language. Although writing programs can be a tedious chore at time. Visual Basic
reduces the effort required on your part, and makes programming enjoyable. Visual
Basic makes many aspects of programming as simple as dragging graphics objects on to
screen with your mouse.
Visual Basic 6.0 is more than just a programming language; the secret to Visual
Basic is in its name” Visual”. With to days Windows Operating System, a program must
be able to interact with the screen. Keyboard, mouse and printer graphically.
44Offline Examiner
The environment provided by Visual Basic is suitable for any type of application.
Using this environment, the user can visually design the objects that your application
uses. Visual Basic is not just a languages, it’s an integrated development environment in
which you can develop, run, test and debug your applications. The impressive array of
programming resources provided by Visual Basic enables to create the objects
extemporaneously which can range from pop-up menu to a message box.
A form is a major part of Visual Basic application, which allows the user to enter
the data as well as view the result. A control is an object that we draw on a form to
enable or enhance user interaction with an application. Hence a Visual Basic application
is a combination of object like forms and controls, procedures that can respond to Events
and other general-purpose procedures.
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
45Offline Examiner
Mouse : 2 buttons/ 3 buttons
SOFTWARE REQUIREMENTS
Operating System : Windows 2000/XP
Front end : Visual Basic 6.0
Back end : MsAccess
Conclusion
Advantages
1. Exam can be conducted easily.
2. Exam time management i.e., Exam starts and end at the right time.
3. Valuation is easy and result can be published with in time.
46Offline Examiner
4. Only manual work needed is entering questions and corresponding right
answer key.
5. No mishap is possible because the system is password protected.
Disadvantages
1. Exam won’t be conducted if there is power failure.
2. Exam can’t be conducted without Hub.
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
Access 2003 Power Programming with VBA
Advanced MS Visual Basic
Site Address
www.associatedcontent.com
www.members.tripod.com
www.vbcodesource.com
47Offline Examiner