Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-09-2009, 10:55 AM
Member
 
Join Date: Nov 2009
Posts: 8
Rep Power: 0
ravi.virgoo@gmail.com is on a distinguished road
Default how to generate 4 set of questions
I have a question bank(qb) .Form this qb i need to qenerate 4 sets of questions witout duplcates.In question bank questions again are arranged as 8 units and in 8 units i have 3 different formats i.e (simple questions,difficult questions,mediumquestions), before generating sets user will give input location of qb and level of quest(simple,diff,mediu).

Last edited by ravi.virgoo@gmail.com; 11-09-2009 at 11:09 AM.
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-09-2009, 12:30 PM
PhHein's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Germany
Posts: 466
Rep Power: 1
PhHein is on a distinguished road
Default
How is that related to Swing? Do you have a question?
__________________
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-09-2009, 01:01 PM
Member
 
Join Date: Nov 2009
Posts: 8
Rep Power: 0
ravi.virgoo@gmail.com is on a distinguished road
Default
This was application already developed using swings.
But it was generating 4 sets of questions with some duplicates.
__________________
virgoo
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-09-2009, 01:03 PM
Member
 
Join Date: Nov 2009
Posts: 8
Rep Power: 0
ravi.virgoo@gmail.com is on a distinguished road
Default
Now i need to generate 4 sets of quest with out duplicates
__________________
virgoo
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 11-09-2009, 01:11 PM
PhHein's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Germany
Posts: 466
Rep Power: 1
PhHein is on a distinguished road
Default
And do you have a question? What doesn't work? Complier errors? Runtime Exceptions? Stack trace?
__________________
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 11-09-2009, 01:20 PM
Member
 
Join Date: Nov 2009
Posts: 8
Rep Power: 0
ravi.virgoo@gmail.com is on a distinguished road
Default
That application was working perfectly but in some sets same questions are repeating.
so, i want to generate 4sets of questions with out any repetitions .
__________________
virgoo
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 11-09-2009, 01:27 PM
PhHein's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Germany
Posts: 466
Rep Power: 1
PhHein is on a distinguished road
Default
As you refuse to answer my questions, I can only give you a vague hint.

Implement a Set. You cannot have duplicates in a java.util.Set
__________________
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 11-09-2009, 01:40 PM
Member
 
Join Date: Nov 2009
Posts: 8
Rep Power: 0
ravi.virgoo@gmail.com is on a distinguished road
Default
sir, in my applic they already used java.util.List.
I am not clear with old application so i planned to write a new class for generating 4sets,
__________________
virgoo
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 11-09-2009, 01:42 PM
PhHein's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Germany
Posts: 466
Rep Power: 1
PhHein is on a distinguished road
Default
Ok, that's fine. Do it.
__________________
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 11-10-2009, 07:45 PM
Senior Member
 
Join Date: Aug 2009
Location: Pittsburgh, PA
Posts: 265
Rep Power: 1
zweibieren is on a distinguished road
Default
Somehow your code will have to
keep track of what questions have been selected so far.
You then have two possible approaches:
  1. Select the next question from those that have not been selected.
  2. Select a random question and reject it if it has already been selected.
Your choice will depend on how many questions there are altogether.
If there are under a thousand questions, any approach will do.
If there are many questions, approach a may be impractical.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generate a Class file Daniel New To Java 6 04-20-2009 06:37 AM
How to generate report Shivraj NetBeans 0 03-24-2009 01:17 PM
How to generate primary key in EJB naresh_m Enterprise JavaBeans 1 07-17-2008 10:41 AM
how to generate dynamic pdf valery Advanced Java 1 08-06-2007 11:01 PM
how to generate xml with Dom4j leonard XML 1 08-06-2007 05:39 PM


All times are GMT +2. The time now is 05:59 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org