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 ");
tid = rs.getString(2);
aid = rs.getString(4);
ResultSet rp=st.executeQuery("select * from qp order by random() ");
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.