Online quiz mini project

Online quiz mini project

Sir i need a online quiz program coding using java servlet, jdbc odbc connection with ms. access. If possible send that source code to me. Thank you.

View Answers

May 8, 2014 at 6:51 PM

<%-- This code working perfectly --%> <%@page import="java.sql.*"%> <%@page contentType="text/html" pageEncoding="UTF-8"%> JSP Page

<% String st[]=new String[1000]; for(int i=0;i

} Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/oxfords","oxford", "oxford123"); Statement stmt=connection.createStatement(); ResultSet rs=stmt.executeQuery("Select * from quiz"); String ans=""; while(rs.next()){ ans+=rs.getString(7)+" "; } int count=0; int wrong=0; int nu=0; String answers[]=ans.split(" "); for(int i=0;i if(st[i].equals(answers[i])) { count++; } else { wrong++;
} }else{ nu++; }

} out.println("Your "+count+" answers are correct"); out.println("Your "+wrong+" answers are wrong"); out.println("Your "+nu+" Not answere"); %>


April 2, 2012 at 10:39 AM

Create table test(ques,op1,op2,op3,op4,ans) and answers(id,ans). Then try the following code:

1)form.jsp:

<%@page import="java.sql.*"%>
<html>
<form method="post" action="result.jsp">
<table>
<%
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/register","root";, "root");
Statement st=connection.createStatement();
ResultSet rs=st.executeQuery("Select * from test");
int i=1;
while(rs.next()){
%>
<tr><td><%=i%></td><td><%=rs.getString("ques")%></td><td><input type="radio" value="<%=rs.getString("op1")%>" name="radio<%=i%>"/><%=rs.getString("op1")%></td><td><input type="radio" value="<%=rs.getString("op2")%>" name="radio<%=i%>"/><%=rs.getString("op2")%></td><td><input type="radio" value="<%=rs.getString("op3")%>" name="radio<%=i%>"/><%=rs.getString("op3")%></td><td><input type="radio" value="<%=rs.getString("op4")%>" name="radio<%=i%>"/><%=rs.getString("op4")%></td></tr>

<%
i++;
}
%>
<tr><td><input type="submit" value="submit"></td></tr>
</table>
</form>
</html>

2)result.jsp:

<%@page import="java.sql.*"%>

<%
String st[]=new String[10];
for(int i=0;i<st.length;i++){
int j=i+1;
st[i]=request.getParameter("radio"+j);
System.out.println(st[i]);

}
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/register","root";, "root");
Statement stmt=connection.createStatement();
ResultSet rs=stmt.executeQuery("Select ans from answers");
String ans="";
while(rs.next()){
ans+=rs.getString("ans")+" ";
}
int count=0;
String answers[]=ans.split(" ");
for(int i=0;i<answers.length;i++){
if(st[i].equals(answers[i])){
count++;
}
}
out.println("Your "+count+" answers are correct");
%>

For more information, visit the following link:

http://www.roseindia.net/jsp/online-quiz-application-jsp.shtml

Thanks


October 26, 2012 at 6:31 PM

Thanks 4 d code.can u pls tel me how can we modify it to get random questions 4m mysql??


August 12, 2012 at 11:34 PM

The source code above works fine but whenever an answer radio button is not selected it throws an Null pointer exception. How to resolve this problem.Please help. Thanks in advance


August 25, 2012 at 9:13 PM

can anyone explain how to Create table test(ques,op1,op2,op3,op4,ans) and answers(id,ans)

then to execute the prog????????


July 1, 2014 at 11:15 AM

hello sir. I already follow the code above But Can I know how to get the number of incorrect answers if the user click the wrong answer.

Thank you









Related Tutorials/Questions & Answers:
Online quiz mini project
Online quiz mini project  Hi. I follow one of the code for "Online quiz mini project". I would like to know how to count the number of wrong answers in jsp
Online quiz mini project
Online quiz mini project  Sir i need a online quiz program coding using java servlet, jdbc odbc connection with ms. access. If possible send that source code to me. Thank you
Advertisements
online examination system mini project
online examination system mini project  i developed a project on online examination system using jsp and java script . I am getting the quetion... in finding out that..only that part had left for my project completion.please help me
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
mini project
mini project  I want a mini project on eco tourism
[Mini-Project]
[Mini-Project]  [Mini-Project] Develop a programmer's editor in Java that supports syntax highlighting, compilation support, debugging support, etc
JAVASCRIPT FOR ONLINE QUIZ
JAVASCRIPT FOR ONLINE QUIZ  i m creating a set of online questionnaire consist of 12 questions with choice of answers from 0-6.i've done creating a html codes.but have to calculate percentage based on total scores.my problem is i
MINI PROJECT
MINI PROJECT  CAN ANYONE POST A MINI PROJECT IN JAVA?   Hi... You can have the following projects as per ur requirement. Free and easy to download.. All projects are JAVA based Sale and purchase in java swing Java
mini project using eclipse
mini project using eclipse  please send me the steps to design online examination system using eclipse,,,,b fast
mini project - Java Beginners
mini project  can anybody plz send the mini project of "on line course portal for a campus
Online Quiz Application in JSP
Online Quiz Application in JSP  ... are going to implement of Online quiz application using of JSP. Step 1: Create... quiz question and answer form using with JSP or JDBC database.  Here
regarding mini project - JDBC
regarding mini project  i need to make a mini project using servlet and jdbc.pls help me with a real time application
mini project - Date Calendar
mini project  i need a simple project code in c/c++.can u make it urgently for me.please.  Hi Friend, Please specify it. Thanks
Need Help in creating online quiz application using JSP - JSP-Servlet
Need Help in creating online quiz application using JSP  Hi, i am creating online Quiz application using JSP and MySQl ,Apache 6 in Netbeans IDE. i... of database mySql-->select * from quiz
Failed to run Online Quiz Application in JSP - JSP-Interview Questions
Failed to run Online Quiz Application in JSP   Hi, I have been following your following link to run the online quiz application, but I failed... your question. Thanks  Hi, I cannot run your online quiz
sir plz send the project on quiz system code
sir plz send the project on quiz system code  sir plz send the client server based project in core java database in my sql
quiz
question has a complexity (difficulty) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question to a quiz. Define the giveQuiz method
Want Mini project - Development process
Want Mini project  Hi Can u plz send me mini project.I want to learn Dao, DaoImpl, Service,ServiceImpl, DTO, Action class, HibernateDao, HibernateDaoImpl, i.e; I want mini project implementing all concepts like jsp ,struts
Online Test System Project
Online Test System Project  I want a full ready-made project on online test system in jsp. i am not using servlet but only jsp.And backend database...://www.roseindia.net/jsp/online-quiz-application-jsp.shtml
Online Test System Project
Online Test System Project  I want a full ready-made project... as mysql. my email address is help me. send a full project on online test system.../online-quiz-application-jsp.shtml   Many many thanks for the reply
online shopping project
online shopping project  Hi, i want online shopping project modules description and screens
online shopping project
online shopping project  Hi, i want online shopping project modules description and screens
Online project management degrees
Online project management degrees  Is there any Online project management degrees course available? What are the duration of the course? Thanks   Hi check the page Online Business Management Degree. Thanks
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.  please provide online quiz program coding using jsp, jdbc...: http://www.roseindia.net/jsp/online-quiz-application-jsp.shtml
online test project
online test project  i need online test project in java using struts...kindly help..   Have a look at the following link: http://www.roseindia.net/struts/struts/struts2.2.1/onlinetestapp
online shopping project
online shopping project  sir, plz can u send me the coding of simple application of online shopping cart project using jsp and servlets which should be run in netbeans without any errors
online project tracking system
online project tracking system  hello sir , I chintan patel and my question is as under how to assign project for admin to project manager in jsp servlet project my project name is "online project tracking system " and i am
mini project using html,javascript and ms access with source code
mini project using html,javascript and ms access with source code  I want a mini project which uses html and java script and backend as ms access with source code. plz send its important and urgent
online shopping project
online shopping project  dear sir/madam,i am uday pratap singh. i need online shopping project description with code. i also want which type of question arises in interview from the current project. please send detail about
online shopping project
online shopping project  can you plz send the source code of online shopping application developed with the help of struts 1.2, hibernate and sql , jsp   Please visit the following link: Struts Shopping Cart
online examination system project in jsp
-quiz-application-jsp.shtml Thanks   hi i'm doing online exam project...online examination system project in jsp  I am doing project in online examination system in java server pages. plz send me the simple source code
online examination system project in jsp
online examination system project in jsp  How many tables are required in SQL for online examination system project in jsp in java
online examination system project in jsp
online examination system project in jsp  How many tables are required in SQL for online examination system project in jsp in java my email id
Java project in online examination system
Java project in online examination system  how many and which tables are required at backend as SQL for online examination system project in jsp
online examination system project in jsp
online examination system project in jsp  How to show the status bar which shows how much time is remaining in online examination system in jsp.my
online examination system project in jsp
online examination system project in jsp  How many and which data tables are required for online examination system project in jsp in java. please give me the detailed structure of each table
online examination system project in jsp
online examination system project in jsp  thanks for providing me 6 tables for online examination system. I want to know what will the id field of Answers1 table contain? Will it contain same id for all the questions of Set1 &
online examination system project in jsp
online examination system project in jsp  thanks for providing me 6 tables for online examination system. I want to know what will the id field of Answers1 table contain? Will it contain same id for all the questions of Set1 &
online examination system project in jsp
online examination system project in jsp  Thanks for providing me the 6 tables.But I want to know will the id field of answers1 table be same for all questions of Set1? Will it be 1 or will be 1,2,3,... What
online shopping project in java - JDBC
online shopping project in java  hii, i am doing a project online... as the project runs or should I open connections only when I am required to retrieve... as long as the project runs but close the statement after the execution of each
[Mini-Project] Develop a programmer's editor in Java that supports syntax highlighting, compilation support, debugging support, etc.
[Mini-Project] Develop a programmer's editor in Java that supports syntax highlighting, compilation support, debugging support, etc.  Please reply me sir
online shopping project report with source code in java
online shopping project report with source code in java  Dear Sir/Mam, i want to a project in java with source code and report project name online shopping. thank you
Mini project on Book Bank using netbeans tool with java and for database using mysql
Mini project on Book Bank using netbeans tool with java and for database using mysql  hi roseindia, i have need the miniproject on bookbank with the deisgn using the netbeans tool, and create the database for that using mysql
Mini project on Book Bank using netbeans tool with java and for database using mysql
Mini project on Book Bank using netbeans tool with java and for database using mysql  hi roseindia, i have need the miniproject on bookbank with the deisgn using the netbeans tool, and create the database for that using mysql
online shopping project in j2ee - JSP-Servlet
online shopping project in j2ee  hello, I am doing a project on online shopping implementing it with only jsp-servlet.I wanted to know that do I need to incorporate any of struts or EJB in my project (in any possible case which I

Ads