Beruflich Dokumente
Kultur Dokumente
GUIDED BY:
Mr. Rakesh Kamboj Lecturer M.M.E.C
SUBMITTED BY:
Nitin Malik (11090118) Tarandeep Singh (11090135) Vishal Gulati(11090142)
1 |Page
We hereby certify that the work which is being presented in the project entitled Automated Test System in fulfillment of the requirement for the award of the degree of Bachelor Of Technology in Computer Engineering of M.M. Engineering College, Mullana, Ambala, Haryana, India is an authentic record of our own work carried out during a period from August 2012 to December 2012, under the supervision of Mr. Rakesh Kamboj The matter presented in this project has not been submitted by us for the award of any other degree of this or any other Institute/University.
Date:(Assistant prof.)
Head Of Department
Internal
2 |Page
We wish to express our deep sense of indebtedness and sincerest gratitude to our guide Mr. Rakesh Kamboj Department of Computer engineering, M.M. Engineering College Mullana, Ambala, Haryana, India for his invaluable guidance and constructive criticism throughout his dissertation. He has displayed unique tolerance and understanding at every step of progress and encouraged us. We deem it our privilege to have carried out our work under his able guidance. We would especially like to thank Prof. Sandeep Goyal(Assoc. Professor and Head), Department of Computer engineering, M.M. Engineering College Mullana, Ambala, Haryana, India, without whom this work would not have been as it is now. Our sincere thanks go to Mr. Kushagra Aggarwal for his painstaking attitude and prudential suggestions throughout our project work.
As a Final Personal Note, we are grateful to our parents, who are inspirational to us in their understanding, patience and constant encouragement
3 |Page
Abstract
This project has been made using Java.It uses MS Access for creating the database. The following Packages of Java are used in the project:
4 |Page
CONTENTS
Sr. No. 1. Chapter Introduction Page No. 6-19
2.
Background of project
20
3.
System model
21-24
4.
Implementation
24-51
5.
56-64
6.
References
54-65
Introduction to JAVA
5 |Page
The Internet helped catapult Java to the forefront of programming, and Java, in turn, has had a profound effect on the Internet. The reason for this is quite simple: Java expands the universe of objects that can move about freely in cyberspace. In a network, two very broad categories of objects are transmitted between the server and your personal computer: passive information and dynamic, active programs. For example, when you read your e-mail, you are viewing passive data. Even when you download program, the programs code is still only passive data until you execute it. However, second type of object can be transmitted to your computer: a dynamic, self-executing program. Such a program is an active agent on the client computer, yet is initiated by the server. For example, a program might be provided by the server to display properly the data that the server is sending. As desirable as dynamic, networked programs are, they also present serious problems in the areas of security and portability. Prior to Java, cyberspace was effectively closed to half the entities that now live there. As you will see, Java addresses those concerns and, by doing so, has opened the door to an exciting new form of program: the applet.
Advantages of JAVA
8 |Page
Simple
9 |Page
Security:
As you are likely aware, every time that you download a normal program, you are risking a viral infection. Prior to Java, most users did not download executable programs frequently, and those who did scanned them for viruses prior to execution. Even so, most users still worried about the possibility of infecting their systems with a virus. In addition to viruses, another type of malicious program exists that must be guarded against. This type of program can gather private information, such as credit card numbers, bank account balances, and passwords, by searching the contents of your computers local file system. Java answers both of these concerns by providing a firewall between a networked application and your computer. When you use a Java-compatible Web browser, you can safely download Java applets without fear of viral infection or malicious intent. Java achieves this protection by confining a Java program to the Java execution environment and not allowing it access to other parts of the computer. (You will see how this is accomplished shortly.) The ability to download applets with confidence that no harm will be done and that no security will be breached is considered by many to be the single most important aspect of Java.
10 | P a g e
Portability:
As discussed earlier, many types of computers and operating systems are in use throughout the worldand many are connected to the Internet. For programs to be dynamically downloaded to all the various types of platforms connected to the Internet, some means of generating portable executable code is needed. As you will soon see, the same mechanism that helps ensure security also helps create portability. Indeed, Javas solution to these two problems is both elegant and efficient.
Object Oriented
Although influenced by its predecessors, Java was not designed to be source-code compatible with any other language. This allowed the Java team the freedom to design with a blank slate. One outcome of this was a clean, usable, pragmatic approach to objects. Borrowing liberally from many seminal object-software environments of the last few decades, Java manages to strike a balance between the purists everything is an object paradigm and the pragmatists stay out of my way model. The object model in Java is simple and easy to extend, while simple types, such as integers, are kept as high-performance nonobjects.
Robust
The multiplatformed environment of the Web places extraordinary demands on a
11 | P a g e
Multithreaded
Java was designed to meet the real-world requirement of creating interactive,
12 | P a g e
Architectural Neutral
A central issue for the Java designers was that of code longevity and portability. One of the main problems facing programmers is that no guarantee exists that if you write a program today, it will run tomorroweven on the same machine. Operating system upgrades, processor upgrades, and changes in core system resources can all combine to make a program malfunction. The Java designers made several hard decisions in the Java language and the Java Virtual Machine in an attempt to alter this situation. Their goal was write once; run anywhere, any time, forever. To a great extent, this goal was accomplished.
Distributed
Java is designed for the distributed environment of the Internet, because it handles TCP/IP protocols. In fact, accessing a resource using a URL is not much different from accessing a file. The original version of Java (Oak) included features for intraaddress-space messaging. This allowed objects on two different computers to execute procedures remotely. Java revived these interfaces in a package called Remote Method Invocation (RMI). This feature brings an unparalleled level of abstraction to client/ server programming.
Dynamic
Java programs carry with them substantial amounts of run-time type information that is used to verify and resolve accesses to objects at run time. This makes it possible to dynamically link code in a safe and expedient manner. This is crucial to the robustness of the applet environment, in which small fragments of bytecode may be dynamically updated on a running system.
14 | P a g e
Database:
A database is an organized collection of information. A simple example of a database are like your telephone directory, recipe book etc. A Relational model is the basis for any relational database management system (RDBMS). A relational model has mainly three components:
1. A collection of objects or relations,. 2. Operators that act on the objects or relations. 3. Data integrity methods. To design a database we need three things: 1. Table 2. Rows 3. Columns
The Systems Development Life Cycle (SDLC), or Software Development Life Cycle in systems engineering, information systems and software engineering, is the process of creating or altering systems, and the models and methodologies that people use to develop these systems. The concept generally refers to computer or information systems. Emphasis on this article (SDLC) is on man-made technological life-cycle. But there are many other life-cycle models to choose from. This includes ecological life cycles, for every life cycle, whether biological or technological, has a beginning and an end. In software engineering the SDLC concept underpins many kinds of software development methodologies. These methodologies form the framework for planning and controlling the creation of an information system[1]: the software development process. In project management a project can be defined both with a project life cycle (PLC) and an SDLC, during which slightly different activities occur. According to Taylor (2004) "the project life cycle encompasses all the activities of the project, while the systems development life cycle focuses on realizing the product requirements".
The System Development Life Cycle framework provides a sequence of activities for system designers and developers to follow. It consists of a set of steps or phases in which each phase of the SDLC uses the results of the previous one. A Systems Development Life Cycle (SDLC) adheres to important phases that are essential for developers, such as planning, analysis, design, and implementation, and are explained in the section below. A number of system development life cycle (SDLC) models have been created: waterfall, fountain, spiral, build and fix, rapid prototyping, incremental, and synchronize and stabilize. The oldest of these, and the best known, is the waterfall model: a sequence of stages in which the output of each stage becomes the input for the next. These stages can be characterized and divided up in different ways, including the following:
Project planning, feasibility study: Establishes a high-level view of the intended project and determines its goals.
Systems analysis, requirements definition: Defines project goals into defined functions and operation of the intended application. Analyzes end-user information needs.
Systems design: Describes desired features and operations in detail, including screen layouts, business rules, process diagrams, pseudocode and other documentation.
17 | P a g e
Integration and testing: Brings all the pieces together into a special testing environment, then checks for errors, bugs and interoperability.
Acceptance, installation, deployment: The final stage of initial development, where the software is put into production and runs actual business.
Maintenance: What happens during the rest of the software's life: changes, correction, additions, moves to a different computing platform and more. This, the least glamorous and perhaps most important step of all, goes on seemingly forever.
conduct any objective test, they have to check the answer sheets manually which is time consuming.
2. Students cannot do practice of attempting objective question papers. 3. Generation of results manually might result in errors. The Automated Test System will
be overcoming the above mentioned problems and will be providing the following features:
5. Test creation will become easier which will be including incorporation of new questions
and deletion and modification of already existing questions periodically.
6. Paper pattern which includes duration of test, number of questions of various levels and
marking scheme; will have flexibility, i.e. faculty will have such options.
7. Results and the answers will be displayed instantaneously just after the completion of
test.
8. The records of the students will be updated in their profile after the completion of their
test for future references.
9. There will be different level of questions in the paper so that the judgement of students
knowledge can be done efficiently.
10. 11.
There will be zero paper work. The students will have to get themselves registered before they proceed further.
Background
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.
19 | P a g e
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.
System Model
Automates Test System will provide a basis for effective fulfillment of conducting Automated tests as a replacement for the paper based tests which are conducted during the internals in the college. It is a generic software which is not specifically for MMU. but can be used by any college, school or institute. The only necessary condition for the usage of this software is that there should be following users:
20 | P a g e
User: He is the person who will be appearing in the test which will be conducted by the faculty. He will know his result instantaneously. Before all this, he will have to register himself or fill login-id and password if already registered. The person has to select for which he is giving the exam and selects ot and appears for it .The exam result is shown when the user completed the exam.
DATA TABLES
Field name
21 | P a g e
Data type
Description
Automated Test System Username Password Fname Doe Subj Conducted Text Text Text Text Text Text Username of user Password provided by the admin Father name Date of exam Subject to appear for If the exam is yet conducted
Field name
question Ans1 Ans2 Ans3 Ans4
22 | P a g e
Data Type
text Text Text Text Text
Description
Question that examiner puts Answer1 Answer2 Answer3 Answer4
Automated Test System Rightans Subject Number Text Right answer to question Subject chosen
Users Table
HARDWARE REQUIREMENT:
SOFTWARE REQUIREMENT:
23 | P a g e
Platform: The operating system requirement of our application software is WINDOWS 98 or higher Front end: JAVA Backend: MS ACCESS
Source code
import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.sql.*; import java.util.ArrayList; public class Login extends JDialog { public static String subject;
24 | P a g e
try{ st= con.createStatement(); ResultSet rs= st.executeQuery("Select * from Log_information where username='" + name + "' and password='" + password + "' and subj='" + subj + "' and conducted='N';"); return rs.next(); } catch(Exception ex){ System.out.println("Error checking login : " + ex.getMessage()); return false; } finally{ try { st.close(); } catch (Exception e) { } try { con.close(); } catch (Exception e) { } } } boolean checkUserad(String name, String password) { Connection con = null; Statement st = null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:questiondsn"); } catch(Exception e){ System.out.println("Error connecting : " + e); }
class QuestionSeries { static String info =" Online Test Week \n \nINSTRUCTIONS:\nThere are 20 questions in this test and 10 minutes to complete them all.\nThe finish button is highlighted in blue when you reach the end of the test. \nClicking the finish button will display the results with the correct answers marked in light red. \n \nThe timecounter begins when you click on the 'start' button \n \nBest of luck!\n"; static String []question = new String[20]; static String [][]answers =new String[20][500]; static int []n = new int[20]; static String []choice= new String[20]; static int tally = choice.length; static String testtitle="Online Test"; static int timeLimit =10; static int passMark = 35; public static ArrayList<String> subjects = new ArrayList<String>(); public static Connection con = null; public static Statement st = null; public static void loadQuestions(){ ResultSet rs = null; try{ String qry = "select Question,ans1,ans2,ans3,ans4,rightans from questionseries where subject='" + Login.subject + "'"; st = con.createStatement(); rs = st.executeQuery(qry); int i = -1; while( rs.next() && i<19 ){ question[++i] = rs.getString(1); answers[i][0] = rs.getString(2); answers[i][1] = rs.getString(3); answers[i][2] = rs.getString(4); answers[i][3] = rs.getString(5);
30 | P a g e
String qry = "select distinct subject from questionseries"; Statement st = con.createStatement(); rs = st.executeQuery(qry); while( rs.next() ){ subjects.add(rs.getString(1)); } }
31 | P a g e
int seconds, minutes; int quesnum, itemCheck, mark; final String TESTTITLE = QuestionSeries.testtitle; final int TIMELIMIT = QuestionSeries.timeLimit; final int PASS = QuestionSeries.passMark; String []answers = new String[TOTAL]; JButton []choice_button = new JButton[6]; JTextArea answerboxes[] = new JTextArea[4]; JRadioButton []boxes = new JRadioButton[4]; JTextPane pane = new JTextPane(); JLabel student, choose, message, timecounter, testresult; boolean start_test, check_answer, allowRestart, finishtest; Northwindow panelNorth = new Northwindow();
32 | P a g e
/* OnlineTest Constructor */ protected OnlineTest(){ QuestionSeries.loadQuestions(); for (int i=0; i<TOTAL; i++) answers[i] =""; getContentPane().setLayout(new BorderLayout() ); getContentPane().add("North", panelNorth); getContentPane().add("South", panelSouth); getContentPane().add("Center", panelCenter); int width = 0, height=0; //for what we've used if(java.awt.Toolkit.getDefaultToolkit().getScreenSize().getWidth()<799) {width=640;height=460;} else {width=720; height=540; } setSize(width,height); Dimension dim = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); setLocation((dim.width-width)/2, (dim.height-height)/2); setTitle(" "+QuestionSeries.testtitle); setDefaultCloseOperation( EXIT_ON_CLOSE ); setVisible(true); } /** ** Northwindow class **/ class Northwindow extends JPanel{ /** ** Northwindow constructor **/ public Northwindow(){ setLayout(new GridLayout(2,2)); setBackground(new Color(230, 230, 255));
33 | P a g e
42 | P a g e
import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.sql.*; import java.util.ArrayList; public class exsched extends JDialog { public static String subject; JLabel lbtop = new JLabel("SET STUDENTS DETAIL"); JLabel lbname = new JLabel("NAME"); JLabel lbfname = new JLabel("FATHERS NAME"); JLabel lbdoe = new JLabel("DATE OF EXAM"); JLabel lbsub = new JLabel("SELECT SUBJECT"); JLabel lbspass = new JLabel("SET PASSWORD"); JLabel lbpass = new JLabel("CONFIRM PASSWORD"); JButton btexit = new JButton("Exit"); JButton btsave = new JButton("Save"); JTextField txtname=new JTextField(20);
43 | P a g e
c.add(lbtop); c.add(lbname); c.add(txtname); c.add(lbfname); c.add(txtfname); c.add(lbdoe); c.add(txtdoe); c.add(lbsub); c.add(txtsub); c.add(lbspass); c.add(txtspass); c.add(lbpass); c.add(txtpass); c.add(btsave); c.add(btexit);
btsave.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent ae){ if (!perfor()) System.out.println("Error in Saving"); txtname.setText(""); txtfname.setText(""); txtdoe.setText(""); txtpass.setText(""); txtspass.setText(""); } } );
btexit.addActionListener(
45 | P a g e
public boolean perfor() { Connection con = null; Statement st = null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:questiondsn"); } catch(Exception e){ System.out.println("Error connecting : " + e); return false; }
try{ String str="INSERT INTO log_information ( username, [password], fname, doe, subj, conducted ) VALUES('" + txtname.getText() + "','" + txtpass.getText() + "','" + txtfname.getText() + "','" + txtdoe.getText() + "','" + txtsub.getSelectedItem().toString() + "','N')"; st=con.createStatement(); int rowcount= st.executeUpdate(str); } catch(Exception ex){ System.out.println("Error checking login : " + ex.getMessage()); return false; }
46 | P a g e
c.add(lbtop); c.add(lbadd); c.add(txtques); c.add(lboption1); c.add(txtoption1); c.add(lboption2); c.add(txtoption2); c.add(lboption3); c.add(txtoption3); c.add(lboption4); c.add(txtoption4); c.add(lbright); c.add(txtr); c.add(lbsub); c.add(txts); c.add(btsave); c.add(btexit);
btexit.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent ae){ //System.exit(0); setVisible(false); } } ); setVisible(true); }
public boolean perfor(){ Connection con = null; Statement st = null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:questiondsn");
50 | P a g e
try{ String str="INSERT INTO QuestionSeries VALUES('" + txtques.getText() + "','" + txtoption1.getText() + "','" + txtoption2.getText() + "','" + txtoption3.getText() + "','" + txtoption4.getText() + "'," + txtr.getText() + ",'" + txts.getText() + "' )"; st=con.createStatement(); int rowcount= st.executeUpdate(str); } catch(Exception ex){ System.out.println("Error checking login : " + ex.getMessage()); return false; } finally{ try { st.close(); } catch (Exception e) { } try { con.close(); } catch (Exception e) { } }
return true; }
51 | P a g e
finally{ try { con.close(); } catch (Exception e) { } } }*/ public static void main(String [] args) { new administrator(); }
54 | P a g e
55 | P a g e
56 | P a g e
57 | P a g e
58 | P a g e
59 | P a g e
60 | P a g e
61 | P a g e
1. It can be used by the institute itself for conducting objective tests of various subjects. 2. It is generic software, so it can be used by various other institutes, schools and colleges. 3. The students nowadays face so many competitive exams which are objective. So they can
prepare themselves by using this software personally. Even if the faculty doesnt want to conduct test online, then he can at least keep question bank and modify it by using this software.
ADVANTAGES:
Use full for a rural students, where they can improve their knowledge and come across about automated examination. Improves concentration. User friendly. User information is maintained. Cost effective. Data validation is done during data entry itself so that errors are minimized.
62 | P a g e
Conclusion
The Automated test System is developed using Java and Ms Access fully meets the objectives of the system for which it has been developed. The system has reached a steady state where all bugs have been eliminated. 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.
BIBLOGRAPHY
63 | P a g e
WEBSITES
Books
Java: The Complete Reference, by Herbert Scheldt. Programming with Java, by E Balaguruswamy. Head First Java 2nd Edition
64 | P a g e