Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Java Quiz help

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java Quiz help

    Hi,

    I have to create a multiple choice quiz based bored game for an Assignment but I'm having some trouble. I've read over the internet that it would be easier to store the questions/answers in an Array but I'm quite clueless as to how i would go about this?

    Ideally I would like to ask the first user a question and provide the user with 4 answers to pick from and then allow the next user to do the same, while counting there score...

    Could someone point me in the right direction please? Or provide some insight

    Thanks.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,312
    My Mood
    Mellow
    Thanks
    194
    Thanked 669 Times in 656 Posts

    Default Re: Java Quiz help

    When you read an array to store questions/answers would be easier, I wonder easier than what?

    I suggest you create a QuizQuestion class in which to store the questions with their answers which also indicates the correct answer and the value or complexity of the question should they vary. You could then store the QuizQuestion instances in a collection of some sort, even an array.

  3. #3
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,545
    My Mood
    Grumpy
    Thanks
    0
    Thanked 167 Times in 158 Posts

    Default Re: Java Quiz help

    Quote Originally Posted by kingsta View Post
    Hi,

    I have to create a multiple choice quiz based bored game
    I'm bored already!
    Improving the world one idiot at a time!

Similar Threads

  1. Using Java to create a quiz...
    By purple_ninja in forum What's Wrong With My Code?
    Replies: 7
    Last Post: September 7th, 2013, 08:16 AM
  2. How to make a quiz in Java?
    By sly in forum Java Theory & Questions
    Replies: 6
    Last Post: March 18th, 2013, 10:43 AM
  3. Do You Know the Answer to Java Quiz?
    By dblog616 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: July 13th, 2012, 08:17 PM
  4. Making a Java quiz with Classes
    By diagnonsense in forum Java Theory & Questions
    Replies: 2
    Last Post: March 26th, 2012, 06:53 AM
  5. Free Java quiz .
    By skoiloth in forum Totally Off Topic
    Replies: 11
    Last Post: January 9th, 2012, 10:16 AM