Project Report on Exam Suite/Test Application/Exam App ( JAVA )

  • 6,608 views
Uploaded on

Project report on Examination system which is based on java technology. It includes the required use-case, DFD, implementation code and screenshots.

Project report on Examination system which is based on java technology. It includes the required use-case, DFD, implementation code and screenshots.

More in: Education , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
6,608
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
434
Comments
2
Likes
5

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. TEST ENGINE A SUMMER TRAINING PROJECT REPORT Submitted by PARAS MALIK In partial fulfillment for the award of the degree of BACHELOR OF TECHNOLOGY in INFORMATION TECHNOLOGY ANSAL INSTITUTE OF TECHNOLOGY, GURGAON affiliated to GURU GOBIND SINGH INDRAPRASTHA UNIVERSITY, DELHI MAY 2011
  • 2. ANSAL INSTITUTE OF TECHNOLOGY, GURGAON Affilaited to GURU GOBIND SINGH INDRAPRASTHA UNIVERSITY, DELHI BONAFIDE CERTIFICATE Certified that this project report “TEST ENGINE” is the bonafide work of “PARAS MALIK” who carried out the project work under my supervision. Mr. DINESH RAI Ms.ALPANA JIJJA
  • 3. ABSTRACT Exam Software is a Test Management Software, which offers a complete solution for Computer Based Test (CBT) .They are used to set up multiple choice tests for set time periods that when submitted are automatically corrected and the results logged beside the student's reference number. FEATURES Administrator login. Student registration. Management and update of student information ,instructions and questions. scope for fixing negative marks and maximum marks to each question. Display of result in the form of total score ,correct responses attempted and non attempted questions. WHAT IMPACT DOES IT HAVE Physical presence at a given location is absolutely not necessary. No time is spent on evaluation. Results are available instantly. The time of starting and completion of examination can be recorded at the server and the student cannot manipulate the same. Even for subjects that the actual examination that will not be conducted online students can be given extensive practice and training by holding online Mock Tests.
  • 4. Trends of the examination including topic wise trends of each subject can be easily obtained if required. TABLE OF CONTENTS CHAPTER NO. TITLE ABSTRACT LIST OF TABLES LIST OF FIGURES 1. INTRODUCTION 1.1 PURPOSE 1.2 SCOPE 1.3 FEATURES 1.4 OVERVIEW 1.5 LOGIN 1.6 TEST 2. TECHNOLOGIES USED 3. FEASIBILITY STUDY 3.1 ECONOMIC FEASIBILITY 3.2 TECHNICAL FEASIBILITY 3.3 BEHAVIOURIAL FEASIBILITY 4. EXISTING SYSTEM 4.1 DISADVANTAGES OF CURRENT SYSTEM 4.2 CHARACTERISTIC OF PROPOSED SYSTEM 5. DESIGN AND IMPLEMENTATION 5.1USE CASE DIAGRAM 5.2 DATA FLOW DIAGRAM 5.3 SCREENSHOTS 5.4 IMPLEMENTATION ( CODING ) 6. TEST CASES FUTURE SCOPE
  • 5. CONCLUSION REFERENCES INTRODUCTION 1.1 PURPOSE The purpose of thistest simulator is to take test in an efficient manner and no time wasting for checking the paper. The main objective of this test is to efficiently evaluate the candidate thoroughly through a fully automated system that not only saves lot of time but also gives fast results. For students they give papers according to their convenience and time and there is no need of using extra thing like paper, pen etc. 1.2 SCOPE Scope of this project is very broad in terms of other manually taking exams. Few of them are:- This can be used in educational institutions as well as in corporate world. No restriction that examiner has to be present when the candidate takes the test. 1.3 FEATURES: Secure Easy to use Reliable and accurate
  • 6. No need of examiner 1.4 OVEVIEW The test application created for taking test has following stages Login Test Result 1.5 LOGIN:- There is a quality login window because this is more secure than other login forms as in a normal login window there are multiple logins available so that more than one person can access to test with their individual login. It include two login windows one for administrator and another one for student. 1.6 TEST: Test page is the most creative and important page in this project. It consists of 2 modules namely: Subject selection Utilities  Utilities:- It includes:- Skip and come back to the question afterwards ifneeded. Gives the list of attempted and unattempted questions and can go to any question directly and can either attempt or change the answer of the already attempted question.
  • 7. 2. TECHNOLOGIES USED  Front end as: Core Java  Back end as: Microsoft SQL Server 2008  Database: SQL  Querying language: SQL
  • 8. 3. FEASIBILITY STUDY 3.1) ECONOMIC FEASIBILITY Economic analysis is most frequently used for evaluation of the effectiveness of the system. More commonlyknows as cost/benefit analysis the procedure is to determine the benefit and saving that are expected from a system and compare them with costs, decisions is made to design and implement the system. This part of feasibility study gives the top management the economic justification for the new system. This is an important input to the management the management, because very often the top management does not like to get confounded by the various technicalities that bound to be associated with a project of this kind. A simple economic analysis that gives the actual comparison of costs and benefits is much more meaningful in such cases. In the system, the organization is most satisfied by economic feasibility. Because, if the organization implements this system, it need not require any additional hardware resources as well as it will be saving lot of time. 3.2) TECHNICAL FEASIBILITY Technical feasibility centers on the existing manual system of the test management process and to what extent it can support the system. According to feasibility analysis procedure the technical feasibility of the
  • 9. system is analyzed and the technical requirements such as software facilities, procedure, inputs are identified. It is also one of the important phases of the system development activities. The system offers greater levels of user friendliness combined with greater processing speed. Therefore, the cost of maintenance can be reduced. Since, processing speed is very high and the work is reduced in the maintenance point of view management convince that the project is operationally feasible. 3.3) BEHAVIOURAL FEASIBILITY People are inherently resistant to change and computer has been known to facilitate changes. An estimate should be made of how strong the user is likely to move towards the development of computerized system. These are various levels of users in order to ensure proper authentication and authorization and security of sensitive data of the organization.
  • 10. 4. EXISTING SYSTEM The whole process of assigning test and evaluating their scores after the test, was done manually till date. Processing the test paper i.e. checking and distributing respective scores used to take time when the software was not installed. 4.1 DISADVANTAGES OF CURRENT SYSTEM The current system is very time consuming. It is very difficult to analyze the exam manually. To take exam of more candidates more invigilators are required but no need of invigilator in case of on line exam. Results are not precise as calculation and evaluations are done manually. The chances of paper leakage are more in current system as compared to proposed system. Result processing takes more time as it is done manually.
  • 11. 4.2 CHARACTERISTIC OF THE PROPOSED SYSTEM The test engine created for taking test has following features : In comparison to the present system the proposed system will be less time consuming and is more efficient. Analysis will be very easy in proposed system as it is automated. Result will be very precise and accurate and will be declared in very short span of time because calculation and evaluations are done by the simulator itself. The proposed system is very secure as no chances of leakage of question paper as it is dependent on the administrator only. The logs of appeared candidates and their marks are stored and can be backup for future use.
  • 12. 5. DESIGN AND IMPLEMENTATION 5.1 USE CASE DIAGRAM LOGIN ADD QUESTIONS REGISTER VERIFY REGISTRATION GIVE EXAM DISPLAY RESULT DB MAINTENANCE
  • 13. 5.2 DATA FLOW DIAGRAM User Table Login User Registration Reg_Table Exam Result C C++ JAVA Calculate Result LOGOUT
  • 14. 5.3 SCREENSHOTS First Page Second Page
  • 15. Student Registration Page
  • 16. Student Login Page
  • 17. Instructions Page
  • 18. Examinaton Test Page
  • 19. Result page
  • 20. 5.4 IMPLEMENTATION (CODING) First Page importjavax.swing.*; importjava.awt.*; importjava.awt.event.*; class first implements ActionListener { JFramefrm; JPanelpnl;JLabellbl; JButton btn1,btn2; JLabeljlb; public first() { frm=new JFrame("Welcome"); pnl=new JPanel(); pnl.setLayout(null); pnl.setBackground(Color.black); jlb=new JLabel(new ImageIcon("uit.jpg")); jlb.setBounds(0,0,400,80); btn1=new JButton("WELCOME TO EXAM SUITE APPLICATION"); //JButtonmyButton =new JButton(“press me”); //btn1.setIcon(new ImageIcon("uit.jpg")); frm.setVisible(true); frm.setSize(400,200); frm.setResizable(false); frm.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent e)
  • 21. { System.exit(0); } } ); btn1.setBackground(Color.green); btn1.setForeground(Color.black); btn1.setBounds(50,80,300,60); btn1.addActionListener(this); frm.add(pnl); pnl.add(btn1); pnl.add(jlb); } public void actionPerformed(ActionEventae) { Object e=ae.getSource(); if(e==btn1) { MSIP obj=new MSIP(); frm.setVisible(false); } } public static void main(String args[]) { firstobj=new first(); } }
  • 22. THE SECOND PAGE importjavax.swing.*; importjava.awt.*; importjava.awt.event.*; class MSIP implements ActionListener { JFramefrm; JPanelpnl;JLabel lbl1,lbl2; JButton btn1,btn2,btn3; JLabeljlb; public MSIP() { frm=new JFrame("Main Sign In Page"); pnl=new JPanel(); pnl.setLayout(null); pnl.setBackground(Color.black); jlb=new JLabel(new ImageIcon("uit.jpg")); jlb.setBounds(0,0,400,80); btn1=new JButton("Administrator Login"); btn2=new JButton("Student Login"); btn3=new JButton("Student Registration"); frm.setVisible(true); frm.setSize(400,200); frm.setResizable(false); frm.addWindowListener( new WindowAdapter() {
  • 23. public void windowClosing(WindowEvent e) { System.exit(0); } } ); btn1.setBackground(Color.gren; btn2.setBackground(Color.green); btn3.setBackground(Color.green); btn1.setForeground(Color.black); btn2.setForeground(Color.black); btn1.setBounds(20,80,150,30); btn2.setBounds(210,80,150,30); btn3.setBounds(100,130,170,30); btn1.addActionListener(this); btn2.addActionListener(this); btn3.addActionListener(this); frm.add(pnl); pnl.add(btn1); pnl.add(btn2); pnl.add(btn3); pnl.add(jlb); } public void actionPerformed(ActionEventae) { Object e=ae.getSource(); if(e==btn1) { signinobj=new signin(); } else if(e==btn2) { studsigninobj=new studsignin(); } else if(e==btn3) { Registration obj=new Registration(); } }
  • 24. public static void main(String args[]) { MSIP obj=new MSIP(); } } THE REGISTRATION PAGE importjava.sql.*; importjava.awt.*; importjavax.swing.*; importjava.awt.event.*; class Registration extends JFrame implements ActionListener { TextField t1,t3,t4,t5,t6,t7,t8; JTextField t2; Button b1,b2; public Registration() { Panel pnl=new Panel(); setSize(600,600); setVisible(true); setBackground(Color.gray); pnl.setLayout(null); Label lb1,lb2,lb3,lb4,lb5,lb6,lb7,lb8; JLabeljlb; jlb=new JLabel(new ImageIcon("uit.jpg")); jlb.setBounds(90,0,400,80); lb1=new Label("STUDENT NAME "); lb2=new Label("PASSWORD"); lb3=new Label(" FATHER'S NAME "); lb4=new Label(" Mobile no. "); lb5=new Label(" AGE "); lb6=new Label(" DATE OF BITRH "); lb7=new Label(" ADDRESS "); lb8=new Label(" COURSE "); pnl.add(jlb); t1=new TextField(30); t2=new JPasswordField(30); t3=new TextField(30); t4=new TextField(30); t5=new TextField(30);
  • 25. t6=new TextField(100); t7=new TextField(30); t8=new TextField(30); b1=new Button("SUBMIT"); b2=new Button("CANCEL"); add(pnl); pnl.add(lb1); lb1.setBounds(180,100,110,30); pnl.add(t1); t1.setBounds(310,100,90,30); pnl.add(lb2); lb2.setBounds(180,150,110,30); pnl.add(t2); t2.setBounds(310,150,90,30); pnl.add(lb3); lb3.setBounds(180,200,110,30); pnl.add(t3); t3.setBounds(310,200,90,30); pnl.add(lb4); lb4.setBounds(180,250,110,30); pnl.add(t4); t4.setBounds(310,250,90,30); pnl.add(lb5); lb5.setBounds(180,300,110,30); pnl.add(t5); t5.setBounds(310,300,90,30); pnl.add(lb6); lb6.setBounds(180,350,110,30); pnl.add(t6); t6.setBounds(310,350,90,30); pnl.add(lb7); lb7.setBounds(180,400,110,30); pnl.add(t7); t7.setBounds(310,400,90,30); pnl.add(lb8); lb8.setBounds(180,450,110,30); pnl.add(t8); t8.setBounds(310,450,90,30); pnl.add(b1); b1.setBounds(230,500,60,30); b1.addActionListener(this);
  • 26. pnl.add(b2); b2.setBounds(310,500,60,30); b2.addActionListener(this); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { System.exit(0); } }); } public void actionPerformed(ActionEvent e) { Object src=e.getSource(); if(src==b1) { insert(); exitregobj=new exitreg(); } else if(src==b2) { reseted(); } } public void reseted() { t1.setText(""); t2.setText(""); t3.setText(""); t4.setText(""); t5.setText(""); t6.setText(""); t7.setText(""); } public void insert() { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  • 27. Connection con=DriverManager.getConnection("jdbc:odbc:path","sa",""); PreparedStatement stat=con.prepareStatement("insert into registration(student_name,student_father,mob_no,age,dob,address,course)value s(?,?,?,?,?,?,?)"); System.out.println(t1.getText()); stat.setString(1,t1.getText()); stat.setString(2,t2.getText()); stat.setString(3,t3.getText()); stat.setString(4,t4.getText()); stat.setString(5,t5.getText()); stat.setString(6,t6.getText()); stat.setString(7,t7.getText()); introwi=stat.executeUpdate(); if(rowi>0) { JOptionPane.showMessageDialog(this,"Data inserted..............."); } } catch(Exception e1) { JOptionPane.showMessageDialog(this,"Data not inserted..............."+e1); } } public static void main(String args[]) { Registration obj=new Registration(); } }
  • 28. STUDENT SIGNIN PAGE importjava.sql.*; importjava.awt.*; importjavax.swing.*; importjava.awt.event.*; classsignin extends JFrame implements ActionListener { TextField t1,t2; Button b1,b2; Label lb1,lb2; publicsignin() { Panel pnl=new Panel(); setSize(300,200); setVisible(true); setBackground(Color.red); pnl.setLayout(null); lb1=new Label("username"); lb2=new Label(" password"); t1=new TextField(30); t2=new TextField(30); b1=new Button("SUBMIT"); b2=new Button("CANCEL"); add(pnl); pnl.add(lb1); lb1.setBounds(180,100,110,30); pnl.add(t1); t1.setBounds(310,100,90,30); pnl.add(lb2); lb2.setBounds(180,150,110,30); pnl.add(t2); t2.setBounds(310,150,90,30);
  • 29. b1.setBounds(230,450,60,30); b1.addActionListener(this); pnl.add(b1); pnl.add(b2); b2.setBounds(310,450,60,30); b2.addActionListener(this); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { System.exit(0); } }); } public void actionPerformed(ActionEvent e) { Object src=e.getSource(); if(src==b1) { insert(); } else if(src==b2) { reseted(); } } public void reseted() { t1.setText(""); t2.setText(""); } public void insert() { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:path","sa",""); PreparedStatement stat=con.prepareStatement("insert into stulogin(user_name,password)values(?,?)"); System.out.println(t1.getText()); stat.setString(1,t1.getText());
  • 30. stat.setString(2,t2.getText()); introwi=stat.executeUpdate(); if(rowi>0) { JOptionPane.showMessageDialog(this,"Data inserted..............."); } } catch(Exception e1) { JOptionPane.showMessageDialog(this,"Data not inserted..............."+e1); } } //public static void main(String args[]) { //signinobj=new signin(); } }
  • 31. INSTRUCTIONS PAGE ( EXAM RULES) importjavax.swing.*; importjava.awt.*; importjava.awt.event.*; class Instructions implements ActionListener { JFramefrm; JPanelpnl; JLabel lbl1,jlb; JButton btn1; JTextAreajtru; String em; public Instructions() { frm=new JFrame("Test Instructions"); pnl=new JPanel(); btn1=new JButton("START"); pnl.setLayout(new FlowLayout()); pnl.setBackground(Color.white); jlb=new JLabel(new ImageIcon("uit.jpg")); jlb.setBounds(0,0,10,20); //lbl1=new JLabel("INSTRUCTIONS :"); String str="nt EXAM RULESnn"+ " This is a simple user friendly software developed using Java.nn"+ " It can be applied to schools ,colleges etc to conduct exams.nn"+ " The procedure for using this software is very easy. Select one nn"+ "of the exams listed in the menu. After selecting the choice the nn"+ "exam will be started by clicking continue button. The questionsnn"+ "and options are displayed on the screen. We can choose onenn"+ "of the answer.After completing the exam the results are nn"+ "displayed on the screen.n"; jtru=new JTextArea(str,6,12); jtru.setFont(new Font("Arial",Font.PLAIN+Font.BOLD,14));
  • 32. frm.setVisible(true); frm.setSize(500,500); frm.setResizable(false); frm.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent e) { frm.setVisible(false); } } ); //lbl1.setBounds(10,10,100,20); jtru.setBounds(10,30,200,300); btn1.setBounds(20,20,20,20); btn1.addActionListener(this); frm.add(pnl); pnl.add(jlb); pnl.add(btn1); pnl.add(jtru); } public void actionPerformed(ActionEventae) { Object e=ae.getSource(); if(e==btn1) { examinatobj=new examinat(); frm.setVisible(true); } }
  • 33. public static void main(String args[]) { Instructions obj=new Instructions(); } } THE EXAMINATION PAGE importjava.awt.*; importjava.awt.event.*; importjava.util.*; importjavax.swing.*; importjava.sql.*; public class examinat extends JFrame implements Runnable,ActionListener { int x; Object obj; ResultSetrs; JFramefrm; JPanel p,p2,p3; JLabel l,l1,l2,l3,lbl4,lbl5,lbl6,lbl7,lbl,lq,lid; JTextArea ta; JButton pre,s,n,m,e,btn1,btn2,btn3,btn4; JButton[] btn =new JButton[30]; JRadioButton rb1,rb2,rb3,rb4; intqmark; Thread th; boolean b=true; int hour=0,minute=59,second=59; String str; ButtonGroupbg; String[][] user =new String[30][2]; publicexaminat() { for(int k=0;k<30;k++) for(int l=0;l<2;l++) user[k][l]="0"; frm=new JFrame("Main"); frm.setSize(800,800); frm.setVisible(true);
  • 34. p=new JPanel(); p2=new JPanel(); p3=new JPanel(); p.setBackground(Color.yellow); p2.setBackground(Color.lightGray); bg=new ButtonGroup(); pre=new JButton("PREVIOUS"); s=new JButton("START"); n=new JButton("NEXT"); m=new JButton("MARK"); e=new JButton("END EXAM"); e.addActionListener(this); m.addActionListener(this); btn1=new JButton(""); btn2=new JButton(""); btn3=new JButton(""); btn4=new JButton(""); btn1.setBackground(Color.orange); btn2.setBackground(Color.green); btn3.setBackground(Color.red); btn4.setBackground(Color.yellow); l2=new JLabel("QTEXT: "); l1=new JLabel(); lq=new JLabel(); lid=new JLabel(); ta=new JTextArea(); l3=new JLabel("Total marks: 120"); lbl=new JLabel("INDEX:"); lbl4=new JLabel("1. Viewed but not attempted"); lbl5=new JLabel("2. Viewed and attempted"); lbl6=new JLabel("3. Not viewed and not attempted"); lbl7=new JLabel("4. Viewed but booked"); pre.addActionListener(this); n.addActionListener(this); s.addActionListener(this); frm.add(p); p.setLayout(null); p2.setLayout(null); p3.setLayout(null); p.setBounds(0,0,400,400); p2.setBounds(400,0,400,330);
  • 35. p3.setBounds(400,330,400,400); p.add(p2); p.add(p3); p.add(l1); p.add(l2); p.add(lid); p.add(l3); p.add(pre); p.add(s); p.add(n); p.add(m); p.add(e); p2.add(lbl); p2.add(lbl4); p2.add(lbl5); p2.add(lbl6); p2.add(lbl7); p2.add(btn1); p2.add(btn2); p2.add(btn3); p2.add(btn4); lbl.setBounds(5,10,40,20); l1.setBounds(10,10,100,30); l2.setBounds(10,50,80,30); lid.setBounds(100,50,80,30); l3.setBounds(10,90,100,30); s.setBounds(5,150,75,30); pre.setBounds(85,150,105,30); n.setBounds(195,150,75,30); m.setBounds(280,150,105,30); e.setBounds(280,20,105,30); lbl4.setBounds(50,20,200,50); lbl5.setBounds(50,100,200,50); lbl6.setBounds(50,180,200,50); lbl7.setBounds(50,260,200,50);
  • 36. btn1.setBounds(300,20,70,50); btn2.setBounds(300,100,70,50); btn3.setBounds(300,180,70,50); btn4.setBounds(300,260,70,50); l=new JLabel("QUESTION: "); l.setBounds(5,200,70,20); ta.setBounds(2,230,350,150); ta.setEditable(false);ta.setBackground(Color.yellow);ta.setForeground(Color.bl ack);//lq.setPreferredSize(new Dimension(200,200)); ta.setFont(new Font("Comic Sans",1,16)); ta.setLineWrap(true); ta.setWrapStyleWord(true); rb1=new JRadioButton(""); rb1.setBounds(5,440,375,50); //rb1.setBackground(Color); rb1.addActionListener(this); rb2=new JRadioButton(""); rb2.setBounds(5,500,375,50); //rb2.setBackground(Color.blue); rb2.addActionListener(this); rb3=new JRadioButton(""); rb3.setBounds(5,560,375,50); //rb3.setBackground(Color.blue); rb3.addActionListener(this); rb4=new JRadioButton(""); rb4.setBounds(5,620,375,50); //rb4.setBackground(Color.blue); rb4.addActionListener(this); p.add(l); p.add(ta); p.add(rb1); p.add(rb2); p.add(rb3); p.add(rb4); bg.add(rb1); bg.add(rb2); bg.add(rb3); bg.add(rb4); p3.setLayout(new GridLayout(6,5)); sql();
  • 37. int x=0; for(int i=1;i<=6;i++) { for(int j=1;j<=5;j++) { //JButtonbtn=new JButton(""+x); btn[x]=new JButton((x+1)+""); p3.add(btn[x]); btn[x].addActionListener(this); btn[x].setBackground(Color.red); x++; } } /*th=new Thread(this,"mythread"); th.start(); */ frm.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { System.exit(0); } }); } public void run() { int hour=00,minute=59,second=59; str="TIME : "+hour+":"+minute+":"+second; l1.setText(str); while(true) { try {Thread.sleep(1000);} catch(Exception e) {}
  • 38. second--; if(second==00 && minute==00 && hour==00 ) { newendbox(); frm.setVisible(false); break; } if(second==00) {minute--;second=59; } if(minute==00) {hour=00; } str="TIME : "+hour+":"+minute+":"+second; l1.setText(str); } } public void sql() { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:path","",""); String query="select * from test1"; Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONC UR_UPDATABLE); rs=stmt.executeQuery(query); setdata(); } catch(Exception e) { System.out.print(e);}
  • 39. } public void setdata() throws Exception { lid.setText(rs.getString("Quesid")); ta.setText(rs.getString("QTEXT")); rb1.setText(rs.getString("OPTION1")); rb2.setText(rs.getString("OPTION2")); rb3.setText(rs.getString("OPTION3")); rb4.setText(rs.getString("OPTION4")); } public void reseted() { rb1.setSelected(false); rb2.setSelected(false); rb3.setSelected(false); rb4.setSelected(false); } public void actionPerformed(ActionEventae) { try{ Object obj=ae.getSource(); if(obj==s) { th=new Thread(this,"mythread"); th.start(); reseted(); rs.next(); setdata(); } if(obj==n) { reseted(); rs.next(); setdata(); } else if(obj==pre)
  • 40. { rs.previous(); setdata(); } String z=lid.getText(); int a=Integer.parseInt(z)-1; System.out.println(a); if(obj==rb1) { user[a][0]=""+(a+1); user[a][1]=rb1.getText() ; } if(obj==rb2) { user[a][0]=""+(a+1); user[a][1]=rb2.getText() ; } if(obj==rb3) { user[a][0]=""+(a+1); user[a][1]=rb3.getText() ; } if(obj==rb4) { user[a][0]=""+(a+1); user[a][1]=rb4.getText() ; } if(obj==rb1 || obj==rb2 || obj==rb3 || obj==rb4) { btn[a].setBackground(Color.green); System.out.print("radio"); } if(obj==m) btn[a].setBackground(Color.yellow); for(int j=0;j<=btn.length-1;j++)
  • 41. { if(obj==btn[j]) { try { rs.absolute(j+1); setdata(); System.out.println(j+1); btn[j].setBackground(Color.orange); } catch(Exception tf) { System.out.print(tf);} } } } catch(Exception ex){System.out.print(ex);} String str=ae.getActionCommand(); if(str.equals("END EXAM")) { newexitbox(); for(int k=0;k<30;k++) { for(int l=0;l<2;l++) { System.out.print("question ids and user options:" +user[k][l]+ "t"); } System.out.println(); } } } public static void main(String[] args) { examinatobj=new examinat(); }
  • 42. } THE RESULT PAGE importjavax.swing.*; importjava.awt.*; importjava.awt.event.*; class Result implements ActionListener { JFramefrm; JPanel pnl,pnl1,pnl2; Panel pnlgrid; JLabelslbl; JLabel plbl1,plbl2,plbl3,plbl4,plbl5,plbl6; JLabel pnlbl1,pnlbl2; JButtonbtn; public Result() { frm=new JFrame("Result"); pnl=new JPanel(); pnl1=new JPanel(); pnl2=new JPanel(); pnl1.setBackground(Color.red); pnl2.setBackground(Color.green); pnl.setLayout(null); slbl=new JLabel("Username :"); pnlgrid=new Panel(); pnlgrid.setLayout(new GridLayout(5,6)); int x=1; for(int i=1;i<=5;i++) { for(int j=1;j<=6;j++) { Button btn=new Button(" "+x); btn.setBackground(Color.red); pnlgrid.add(btn); x++;
  • 43. } } pnlgrid.setBounds(10,150,200,200); pnlbl1=new JLabel("Incorrect Answer"); pnlbl2=new JLabel("Correct Answer"); plbl1=new JLabel("Total Questions :"); plbl2=new JLabel("Correct :"); plbl3=new JLabel("Incorrect :"); plbl4=new JLabel("Attempt :"); plbl5=new JLabel("Not Attempt :"); plbl6=new JLabel("Percentage :"); btn=new JButton("Close"); frm.setVisible(true); frm.setSize(600,400); frm.setResizable(false); frm.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } } ); slbl.setBounds(10,10,80,15); pnlbl1.setBounds(400,10,100,15); pnlbl2.setBounds(400,30,100,15); pnl1.setBounds(520,10,15,15); pnl2.setBounds(520,30,15,15); plbl1.setBounds(400,50,100,15); plbl2.setBounds(400,70,80,15); plbl3.setBounds(400,90,80,15); plbl4.setBounds(400,110,80,15); plbl5.setBounds(400,130,80,15); plbl6.setBounds(400,150,80,15); btn.setBounds(400,220,80,30); btn.addActionListener(this); frm.add(pnl);
  • 44. pnl.add(slbl); pnl.add(btn); pnl.add(plbl1); pnl.add(plbl2); pnl.add(plbl3); pnl.add(plbl4); pnl.add(plbl5); pnl.add(plbl6); pnl.add(pnlgrid); pnl.add(pnlbl1); pnl.add(pnlbl2); pnl.add(pnl1); pnl.add(pnl2); } public void actionPerformed(ActionEventae) { Object e=ae.getSource(); if(e==btn) { System.exit(0); } } public static void main(String args[]) { Result obj=new Result(); } }
  • 45. 6. TEST SUITS REGISTRATION TABLE COLUMN NAME DATA TYPE student_name varchar(90) student_father varchar(90) mob_no varchar(13) Age int dob varchar(50) address varchar(MAX) course varchar(50) password nvarchar(50) student_name student_father mob_no age dob address course password Result Rahul Prasad Harun Prasad 9888998899 20 5-4-1991 ABC Street, Rohini JAVA rptest SUCCESS Ayesha 9988889999 20 16-7-1991 Xyz Street Dwarka C++ AYESHA INVALID Rohan Divander 208877768 20 12-2-1991 QweStreet,C P JAVA INVALID TashiKapoor SohanKapoor 293902390 24 10-11- 1995 123, mayurvihar C++ Tashi SUCCESS Rock Star Rocky Star 20 11-5-1991 12K, Rohini C++ Rock INVALID C Kumar J Kumar 23242321 23 12-4-1998 23,g nagar JAVA Qwerty SUCCESS J RAJ M RAJ 7886768799 22 14-9-1999 67 jk Colony C++ Uuhuh` SUCCESS ZABASTSU Loonies 999999999 20 17-8-1991 San Andreas Loonies INVALID paras sunilmalik 989898 20 18-6-1991 NEW DELHI JAVA Paras SUCCES
  • 46. STUDENT LOGIN COLUMN NAME DATA TYPE user_name varchar(50) password nvarchar(50) User_name Password Result Paras Paras Success Ayesha Invalid Paras Paras18 Invalid Tashi Tashi Success Tashi Invalid Rahul Prasad Test Invalid Rahul Prasad Rptest Success QUESTION TABLE COLUMN NAME DATA TYPE SRNO int QuesID int SUBJECT varchar(MAX) QTEXT varchar(MAX) OPTION1 varchar(MAX) OPTION2 varchar(MAX) OPTION3 varchar(MAX) OPTION4 varchar(MAX) ANSWER int Marks int Status bit
  • 47. Future scope There have been numerous cases of computer glitches, errors in content, and security lapses reported in online examination .So in the near future the so – called software could be made more secure and reliable.While electronic glitches are rare, they have been known to occur, for instance when computer crashes voided the efforts of thousands of student. There are also cases in which the correction software has corrupted scores. so the software can be programmed well so as to avoid corrupted scores. CONCLUSION The On line test System is developed using visual basic and sql fully meets the objectives of the system for which it has been developed. The system is operated at a high level of efficiency and all the teachers and user associated with the system understands its advantage. The system solves the problem. It was intended to solve as requirement specification.
  • 48. REFERENCES The existing websites referred for the making of the project are:  www.oracle.com  www.oracle.com/technetwork/tutorials/index.html  Java2 Complete Reference  HCL Tutorial assignments  Concept of DBMS--dbms.knowledgehills.com  www.codeproject.com