Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2009
    Posts
    8
    Rep Power
    0

    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 10:09 AM.

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    12

    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

  3. #3
    Join Date
    Nov 2009
    Posts
    8
    Rep Power
    0

    Default

    This was application already developed using swings.
    But it was generating 4 sets of questions with some duplicates.

  4. #4
    Join Date
    Nov 2009
    Posts
    8
    Rep Power
    0

    Default

    Now i need to generate 4 sets of quest with out duplicates

  5. #5
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    12

    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

  6. #6
    Join Date
    Nov 2009
    Posts
    8
    Rep Power
    0

    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 .

  7. #7
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    12

    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

  8. #8
    Join Date
    Nov 2009
    Posts
    8
    Rep Power
    0

    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,

  9. #9
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    12

    Default

    Ok, that's fine. Do it.
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  10. #10
    zweibieren is offline Senior Member
    Join Date
    Aug 2009
    Location
    Pittsburgh, PA
    Posts
    285
    Rep Power
    11

    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.

Similar Threads

  1. Generate a Class file
    By Daniel in forum New To Java
    Replies: 6
    Last Post: 04-20-2009, 05:37 AM
  2. How to generate report
    By Shivraj in forum NetBeans
    Replies: 0
    Last Post: 03-24-2009, 12:17 PM
  3. How to generate primary key in EJB
    By naresh_m in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 07-17-2008, 09:41 AM
  4. how to generate dynamic pdf
    By valery in forum Advanced Java
    Replies: 1
    Last Post: 08-06-2007, 10:01 PM
  5. how to generate xml with Dom4j
    By leonard in forum XML
    Replies: 1
    Last Post: 08-06-2007, 04:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •