I am doing a project in jsp of creating question paper from question bank.
Here we have to generate a paper based on the language like c,c++.
we want to know how to generate the paper by considering two question from each area like inheritence,exception handling.the question has to be randomly gnererated from question bank database which has area_id and language_id and questions. Kindly give us a logic how to select questions accordingly.
we tried the following logic but it does not work.WE are working in net beans(derby server).

ResultSet rs = st.executeQuery("select tech,t.tid,a.tid,aid from technology t,area a where t.tid=a.tid ");
 while(rs.next())
     {
               if(option.equals(rs.getString(1)))
                   {
                            tid = rs.getString(2);
                    
                                 
                                
                                   if(tid.equals(rs.getString(3)))
                                       {
                                            aid = rs.getString(4);
                                            %>
                                            <p><%=aid%></p>
                                             
                                           <%
                                            
                                        
                                               
                                               ResultSet rp=st.executeQuery("select * from qp order by random() ");
                                           while(rp.next()){
                                               while(rp.getString(3).equals(rs.getString(4))){
                                            %> <p><%=rp.getString(4)%></p><%
                                            }
                                           }
                        }                   
                                              

          }}

Here we first selected the desired language(technology) and in each technlogy we have different areas.We selected the areas and put them in an array and from each array element we tried to select questions under each element to apply random number generation function to select question but it does not work.

hi, i am also workin on similar problem....if u got any idea u plz do reply me....

commented: Create your own thread and do not forget to include code you have so far! -3

you must be having some question code that must be unique so by using it and with the help of random() generate your random questions and store it into an array.

I was also working on same project named Online Examination and the problem iam facing is about the timer.I want that timer should start when the start button on the form is clicked and it shouls stop after 45 mins,I am using the java code but it is not working.Can anyone help me on this problem also

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.