Online Examination System in .NET & DB2

20,934 views

Published on

Online Examination System in .NET & DB2

Published in: Technology
4 Comments
17 Likes
Statistics
Notes
No Downloads
Views
Total views
20,934
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
1,292
Comments
4
Likes
17
Embeds 0
No embeds

No notes for slide

Online Examination System in .NET & DB2

  1. 1. PROJECT REPORT ON ONLINEEXAMINATION ABHAY ANANDA SHUKLA UNIVERSITY INSTITUTE OF TECHNOLOGY
  2. 2. 4 INDEXy Purpose.y Technologies used.y Hardware Interface.y Software Interface.y Constraints.y Feasibility Study.y Specification Report.y Communication Interface.y Bottlenecks Identified in existing system.y Need for the new system.y Software system attributes.y DBMS.y E-R Diagram.y DFD.y Programming codes.y Database codes.y Input & Output forms.y Conclusion.y Bibliography.
  3. 3. 5 1. Purpose: > This Web Application provides facility to conduct online examination worldwide. > It saves time as it allows number of students to give the exam at a time and displays the results as the test gets over, so no need to wait for the result. It is automatically generated by the server. > Administrator has a privilege to create, modify and delete the test papers and its particular questions. > User can register, login and give the test with his specific id, and can see the results as well.2. Technologies used: This project is a web application that is developed in ASP.NET having DB2 as back end. 1. Database Design (DB2) 2. Input Design (ASP.NET) 3. Coding (VB.NET)3. Hardware Interface: Client Side: Internet Explorer: 6.0 Processor : Pentium IV 2.0 and above. RAM : 256 MB
  4. 4. 6 Processor : Pentium IV 2.0 and above. RAM : 1 GB Disk space : 4GB4. Software Interface:Client Side: .NET Framework, Web Browser, Windows XP/2000/VistaWeb Server: .NET Framework, Windows XP/2000/Vista Data BaseServer: DB25. Constraints: > User interface is only in English i.e. no other language option is available. > User can login only with his assigned username and password i.e. no guest facility is available. > Limited to HTTP/HTTPS.
  5. 5. 7 Feasibility StudyWhat are the user¶s demonstrable needs?User needs a web-based system, which will remove all the above -mentionedProblems that, the user is facing. The user wants a web -based system, whichwill reduce the bulk of paperwork, provide ease of work, flexibility, fastrecord finding, modifying, adding, removing and generating the reports.How can the problem be redefined?We proposed our perception of the system, in accordance with the problemsof existing system by making a full layout of th e system on paper. We talliedthe problems and needs by existing system and requirements. We werefurtherupdating in the layout in the basis of redefined the problems. In feasibilitystudy phase we had undergone through various steps, which are described asunder:How feasible is the system proposed? This was analyzed by comparing thefollowing factors with both the existing system and proposed system.CostThe cost required in the proposed system is comparatively less to theexisting system.EffortCompared to the existing system the proposed system will provide a betterworking environment in which there will be ease of work and the effortrequired will be comparatively less than the existing system.TimeAlso the time required generating a report or for doing any other work will becomparatively very less than in the existing system. Record finding andupdating will take less time than the existing system.LaborIn the existing system the number of staff r equired for completing the workismore while the new system will require quite less number of staff.
  6. 6. 8 Specification ReportSystem InterfaceApplication would be a self -contained system. It will not access data of anyother application nor will other application have access to its data.User InterfaceApplication will be accessed through a Browser Interface. The interfacewould be viewed best using 1024 x 768 and 800 x 600 pixels resolutionsetting. The software would be fully compatib le with Microsoft InternetExplorer for version 6 and above. No user would be able to access any partof the application without logging on to the system.Hardware InterfaceFor Server ‡ Intel Pentium III or above with ‡ 512 MB RAM ‡ 4 GB hard disk ‡ Network InterfaceFor Client ‡ PC With ‡ 256 MB RAM ‡ Network InterfaceSoftware Interface For Server For Client ‡ Windows 2000 Enterprise ‡ Windows 95/98/2000/NT Edition ‡ Microsoft Internet Explorer 6 ‡ WAS Server & above ‡ DB2 Server
  7. 7. 9 Communication InterfaceThe system should be accessed over LAN or WAN. For Clients to accessapplication server the network should be running TCP/IP protocol.OperationsClient SideInteractive operations using options provided in the application, ExampleData Entry generation and viewing of reports.Server SideDatabase backup should be taken every day. In case of data base crash, lastbackup should be restored.User CharacteristicsThe end user of the software can be divided into two categoriesAdministrator : Access to master forms for the purpose of data entry andgeneration of reports.Operator : Access to his corresponding records and giving examinationonly.
  8. 8. 10 Bottlenecks Identified in Existing SystemThe first problem is that there are loads of hard copied documents beinggenerated. This brings us to the age -old discussion of keeping information inthe form databases versus keeping the same on sheets of paper. Keeping theinformation in the form of hard-copied documents leads to the followingproblems:I. Lack of space ± It becomes a problem in itself to find space to keep thesheets of paper being generated as a result of the ongoing discussion. Thedocuments being generated are too important to be ill -treated.ii. Filing poses a problem ± Filing the documents categorically is a timeconsuming and tedious exercise.iii. Filtering is not easy ± It becomes hard to filter relevant documents forthe irrelevant ones if the count of the same crosses a certain manageablenumber.iv. Reviewing becomes time-consuming ±All the process done manually at the centers and all the records aremaintained on the papers. So the maintenance of the record is very difficultin the departments and as well as it¶s very difficult for the workers to checkthe record. The Existing system is paper based, time consuming,monotonous, less flexible and provides a very hectic working schedule. Thechance of loss of records is high and also record searching is difficult.Maintenance of the system is also very difficult and takes lot of time.v. Result Processing is slow due to paper work and requirement of staff.
  9. 9. 11 Need for the New SystemTo solve these problems they required a computerized system to handle allthe works. They required a web based application that will provide aworking environment that will be flexible and will provide ease of work andwill reduce the time for report generation and other paper works.Aims and ObjectiveThe main purpose behind the proposed system is to pro vide a comprehensivecomputerized system, which can capture, collate and analyze the data fromthese wards and evaluate the impact of the program.Constraints, Assumptions, DependenciesConstraintsAs this system is based on client server technology, so fo r normal operationminimum of 64 MB RAM will be required on all clients.AssumptionsIn general it has been assumed that the user has complete knowledge of thesystem that means user is not a naïve user. Any data entered by him/her willbe valid. To make the software as user friendly as possible but at the sametime keeping in minds user requirements. ‡ Server OS should be Windows NT/2000/XP. ‡ Client PC should be Windows 9X/NT/WorkStation or Windows 2000 with latest service pack.DependenciesIt depends that the one should follow the international standards for thegenerating the User ID & should fill the related information in the properformat.
  10. 10. 12 Software System AttributesƑ Usability: The links are provided for each form. The user is facilitated toview and make entries in the forms. Validations are provided in each field toavoid inconsistent or invalid entry in the databases. Some forms consistsHyper Links, which provides further details. Reports screen contains textboxes and drop down lists, so that reports can be produced.Ƒ Security: Application will allow only valid users to access the system.Access to any application resource will depend upon user¶s designation.There are two types of users namely Administrator and Student. Security isbased upon the individual user ID and Password.Ƒ Maintainability: The installation and operation manual of examinationmanagement system will be provided to the user.Ƒ Availability: System will be available around the clock except for thetime required for the backup of data.Ƒ Portability: The application is developed in ASP.NET. It would beportable to other operating system provided .NET Framework is availableforthe OS. As the database is made in DB2, porting the database to anotherdatabase server would require some development effort.Acceptance CriteriaThe software should meet the functional requirement and perform thefunctionality effectively and efficiently. ‡ A user-friendly interface with proper menus. ‡ Data transfer should be accurate and within a reasonable amount of time keeping in mind the network traffic. ‡ The system should not allow entry of duplicate key values. ‡ System should have the ability to generate transactional Logs to avoid any accidental loss of data. ‡ Log file should also be generated.
  11. 11. 13 DBMS1. QuestionsName Data Type DescriptionQues_no. Number Question NumberQuestion Text QuestionAnswer1 Text First ChoiceAnswer2 Text Second ChoiceAnswer3 Text Third ChoiceAnswer4 Text Fourth Choice4. Correct ansName Data Type DescriptionQues_no. Number Question NumberAns Text Correct Answer5. Given ansName Data Type DescriptionQues_no. Number Question NumberAns Text Given Answer2. AdministratorsName Data Type DescriptionUser name Text Name of the AdministratorPassword Text Password
  12. 12. 146. StudentName Data Type DescriptionRoll Number Unique Roll noName Text Name of the StudentSex Text Sex of the StudentBranch Text Branch of the StudentTotal Number Marks of the StudentAddress Text Address of the StudentContact no Number Contact no of the Student 3. ResultsName Data Type DescriptionRoll Number Unique Roll noName Text Name of the StudentSex Text Sex of the StudentBranch Text Branch of the StudentTotal Number Marks of the Student
  13. 13. 15 User name Password Recieve USER RegisterUse name Use name Branch Exam Result Registration Roll Password Marks Result Examination Perform GK E-R DIAGRAM
  14. 14. 16 £ t¢ ¦¥¤ t_D £ student login t¢ ¦¥¤ t student verification ¢ ¡  L i 1.0 ¢  © ¨ ¡ ¦§ i tr ti student registration student registration gets result give exam ¢  © ¨ ¡ ¦§ i tr ti 2.0 give exam ¤¨¦§ lt ¢  ©¢ © i ti 5.0 3.0 fetch result perform testExamResult 3.1.1 stores resuit fetch question ¦ © ¤ © ¦¡¥ ¦  ¢ © ¦¢ ¦ r l l C l l t checks ¤¨¦§ lt 4.0 Figure- DFD
  15. 15. 17 PROGRAMMING CODESVB CODES FOR ADMIN.ASPX.VB -Partial Class Admin Inherits System.Web.UI.Page Dim flag As Boolean = False Protected Sub Button1_Click(ByVal sender As Object, ByVal eAs System.EventArgs) Handles Button1.Click Try con.Open() com.CommandText = select * from Admin where name= Trim(TextBox1.Text) and pass= Trim(TextBox2.Text) com.Connection = con dr = com.ExecuteReader If dr.Read Then flag = True End If Catch ex As Exception MsgBox(ex.Message) Finally con.Close() com.Cancel() dr.Close() End Try If flag = True Then flag = False Response.Redirect(ShowGANS.aspx) Else MsgBox(Login fail, MsgBoxStyle.Critical, Error) End If End Sub
  16. 16. 18VB CODES FOR STUDENTLOGIN.ASPX.VB ±Partial Class Default2 Inherits System.Web.UI.Page Dim flag As Boolean = False Protected Sub Button1_Click(ByVal sender As Object, ByVal eAs System.EventArgs) Handles Button1.Click Try con.Open() com.CommandText = select * from student whereroll= Trim(TextBox2.Text) and name= Trim(TextBox1.Text) com.Connection = con dr = com.ExecuteReader If dr.Read Then flag = True End If Catch ex As Exception MsgBox(ex.Message) Finally con.Close() com.Cancel() dr.Close() End Try If flag = True Then flag = False Session(Roll) = Trim(TextBox2.Text) MsgBox(Login Success, MsgBoxStyle.Information,LOGIN) Response.Redirect(Question.aspx) Else MsgBox(Login fail..., MsgBoxStyle.Critical,Login Error) TextBox2.Text = TextBox1.Text = End If End Sub Protected Sub TextBox1_TextChanged(ByVal sender As Object,ByVal e As System.EventArgs) Handles TextBox1.TextChanged End Sub
  17. 17. 19 Protected Sub TextBox2_TextChanged(ByVal sender As Object,ByVal e As System.EventArgs) Handles TextBox2.TextChanged End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e AsSystem.EventArgs) Handles Me.Load End SubEnd Class
  18. 18. 20VB CODES FOR QUESTION.ASPX.VB -Partial Class _Default Inherits System.Web.UI.Page Shared s As String Shared i As Integer = 0 Shared j As Integer = 0 Shared flag As Boolean = False Protected Sub Page_Load(ByVal sender As Object, ByVal e AsSystem.EventArgs) Handles Me.Load Response.AddHeader(Refresh, 5) If Not IsPostBack() Then datacon() End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal eAs System.EventArgs) Handles Button1.Click If flag = True Then datacon() End Sub Sub datacon() Try con.Open() com.CommandText = select * from question com.Connection = con adp.SelectCommand = com adp.Fill(ds, question) j = ds.Tables(0).Rows.Count If i ds.Tables(0).Rows.Count Then Label2.Text = ds.Tables(0).Rows(i).Item(0) Label1.Text = ds.Tables(0).Rows(i).Item(1) RadioButton1.Text =ds.Tables(0).Rows(i).Item(2) RadioButton2.Text =ds.Tables(0).Rows(i).Item(3) RadioButton3.Text =ds.Tables(0).Rows(i).Item(4) RadioButton4.Text =ds.Tables(0).Rows(i).Item(5) If flag = True Then com1.CommandText = insert into gansvalues( CInt(Label2.Text) , s ) com1.Connection = con com1.ExecuteNonQuery() i = i + 1 flag = False
  19. 19. 21 End If Else Response.Redirect(result.aspx) End If Catch ex As Exception MsgBox(ex.Message) Finally ds.Clear() con.Close() com.Cancel() com1.Cancel() RadioButton1.Checked = False RadioButton2.Checked = False RadioButton3.Checked = False RadioButton4.Checked = False End Try End Sub Protected Sub RadioButton_CheckedChanged(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesRadioButton1.CheckedChanged, RadioButton2.CheckedChanged,RadioButton3.CheckedChanged, RadioButton4.CheckedChanged If RadioButton1.Checked = True Then s = RadioButton1.Text If RadioButton2.Checked = True Then s = RadioButton2.Text If RadioButton3.Checked = True Then s = RadioButton3.Text If RadioButton4.Checked = True Then s = RadioButton4.Text flag = True End SubEnd Class
  20. 20. 22VB CODES FOR RESULT.ASPX.VB -Partial Class Default3 Inherits System.Web.UI.Page Dim r As Integer Protected Sub Page_Load(ByVal sender As Object, ByVal e AsSystem.EventArgs) Handles Me.Load r = Session(Roll) Static total As Integer Try con.Open() com.CommandText = select * from ans com.Connection = con com1.CommandText = select * from gans com1.Connection = con dr = com.ExecuteReader dr1 = com1.ExecuteReader While (dr.Read()) dr1.Read() If dr.Item(0) = dr1.Item(0) Then total = total + 1 End If End While If Not dr.Read Then com2.CommandText = update student set total = total where roll= r com2.Connection = con com2.ExecuteNonQuery() End If Catch ex As Exception MsgBox(ex.Message) Finally com2.Cancel() con.Close() dr.Close() dr1.Close() End Try Try con.Open() com.CommandText = select * from student whereroll= r com.Connection = con
  21. 21. 23 dr = com.ExecuteReader If dr.Read Then Label4.Text = dr.Item(0) Label3.Text = dr.Item(1) Label2.Text = dr.Item(2) Label1.Text = dr.Item(3) Label5.Text = dr.Item(4) End If Catch ex As Exception MsgBox(ex.Message) Finally con.Close() com.Cancel() dr.Close() End Try End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal eAs System.EventArgs) Handles Button1.Click Session.Abandon() Session.Clear() Response.Redirect(lOGIN.ASPX) End SubEnd Class
  22. 22. 24VB CODES FOR GANS.ASPX.VB -Partial Class ShowGANS Inherits System.Web.UI.Page Shared count As Integer = 0 Protected Sub Page_Load(ByVal sender As Object, ByVal e AsSystem.EventArgs) Handles Me.Load Try con.Open() com1.CommandText = select * from gans com1.Connection = con adp.SelectCommand = com1 adp.Fill(ds) GridView1.DataSource = ds GridView1.DataBind() Page.DataBind() Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.OkOnly, Error) Finally con.Close() com1.Cancel() ds.Clear() GridView1.Dispose() End Try End Sub Protected Sub Button1_Click1(ByVal sender As Object, ByVal eAs System.EventArgs) Handles Button1.Click Try con.Open() com.CommandText = delete gans com.Connection = con com.ExecuteNonQuery() MsgBox(Deleted Successfully...) Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, Error) Finally con.Close() com.Cancel() End Try End Sub
  23. 23. 25 Protected Sub GridView1_SelectedIndexChanged(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesGridView1.SelectedIndexChanged End Sub Protected Sub CheckBox1_CheckedChanged(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesCheckBox1.CheckedChanged If CheckBox1.Checked = True Then Panel1.Visible = True Try con.Open() com2.CommandText = select * from question com2.Connection = con dr = com2.ExecuteReader While dr.Read count = dr.Item(0) End While count += 1 TextBox1.Text = count Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical,Error) Finally com2.Cancel() dr.Close() con.Close() End Try Else Panel1.Visible = False End If End Sub Protected Sub Button2_Click(ByVal sender As Object, ByVal eAs System.EventArgs) Handles Button2.Click Try con.Open() com.CommandText = insert into question values( Trim(TextBox1.Text) , Trim(TextBox2.Text) , Trim(TextBox3.Text) , Trim(TextBox4.Text) , Trim(TextBox5.Text) , Trim(TextBox6.Text) ) com.Connection = con com.ExecuteNonQuery()
  24. 24. 26 com1.CommandText = insert into ans values( Trim(TextBox1.Text) , Trim(TextBox7.Text) ) com1.Connection = con com1.ExecuteNonQuery() MsgBox(Question Inserted.....) Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, Error) Finally con.Close() com.Cancel() com1.Cancel() TextBox1.Text = TextBox2.Text = TextBox3.Text = TextBox4.Text = TextBox5.Text = TextBox6.Text = TextBox7.Text = Panel1.Visible = False CheckBox1.Checked = False End Try End SubEnd Class
  25. 25. 27 DATABASE CODESDATABASE NAME ±ONLINEEXAMTABLE ± ADMINColumn Name Data Type Length Allow Nullsname(prim. key) varchar 50pass varchar 50TABLE ± STUDENTColumn Name Data Type Length Allow Nullsroll(prim. key) varchar 10name varchar 50sex char 10sub char 10total int 4 yesaddress varchar 50contact bigint 8 yes
  26. 26. 28DATABASE NAME ± QUESTIONColumn Name Data Type Length Allow Nullsqueno(prim. key) int 4que varchar 400op1 varchar 50op2 varchar 50op3 varchar 50op4 varchar 50DATABASE NAME ± ANSColumn Name Data Type Length Allow Nullsqueno(prim. key) varchar 4ans varchar 50DATABASE NAME ± GANSColumn Name Data Type Length Allow Nullsqueno(prim. key) varchar 4gans varchar 50 yes
  27. 27. 29Input andOutputForms1. Home Page
  28. 28. 302. StudentRegistration
  29. 29. 313. Result Form
  30. 30. 324. Administrative Registration
  31. 31. 335. Student ogin
  32. 32. 346. Question Form
  33. 33. 357. Add New Question
  34. 34. 368. About us
  35. 35. 379. ontact us
  36. 36. 38 ConclusionThis Web Application provides facility to conduct online examinationworldwide. It saves time as it allows number of students to give the exam ata time and displays the results as the test gets over, so no need to wait for theresult. It is automatically generated by the server.Administrator has a privilege to create, modify and delete the test papers andits particular questions. User can register, login and give the test with hisspecific id, and can see the results as well.
  37. 37. 39 Bibliography y Programming Microsoft® ASP.NET 2.0 Core Reference By: Dino Esposito y ASP.NET 2.0 All-in-One Desk For Dummies® By:Wlley Publishing,Inc. y Professional Asp.Net 2.0® By: Evjen, Hanselman, Rader. y Beginning Asp.Net 2.0® By: Chris Hart. y Pro Asp.Net 2.0 In Vb 2005® By: Laurence Moroney,Matthew Macdonald, and MatthewMacdonald. y Asp.Net 2.0 Black Book, 2007 Ed®s By: Dreamtech Press, KogentSolutions Inc.

×