This site requires JavaScript, please enable it in your browser!
Greenfoot back
frikakikimasive
frikakikimasive wrote ...

2015/7/29

how to make the quiz question appear randomly

frikakikimasive frikakikimasive

2015/7/29

#
Now i 'm making quiz game use Greenfoot , I want to ask how to make the quiz questions appear randomly ?
danpost danpost

2015/7/29

#
You need to show some attempted coding that we can help with. Read the page linked to 'Posting code? read this!' below the reply box. I will say that this action should be controlled by your world object. So, it would be your subclass of World which you should attempt to do this and whose attempted code you should be showing. This page explains how to correctly ask for help.
frikakikimasive frikakikimasive

2015/7/30

#
I 've made ​​it using an image to one question , but the problems that exist in this quiz does not appear random and its users can answer this quiz to memorize answers before her , and that makes this game is not effective , what can you give examples of other scenarios this quiz game about ?
danpost danpost

2015/7/30

#
Normally, the questions and answers would be listed either in an array or a list object within a class that extend the Object class (as such, what class it extends does not need to be specified). Then, within that class, an int field would be used to track the index of the current question and optional answers. The value of this int field can be set as a random number limited to the length or size of the array or list. Methods within the class can be created to change the current question and get the necessary data for the current question. It would take an extra field or two and more methods to avoid the same question from being selected a second time (or multiple times) before all questions are exhausted.
frikakikimasive frikakikimasive

2015/7/31

#
May I ask for your email sir , I will send my game so that you can help me with my game , it also if you are willing to help me , I desperately need help
danpost danpost

2015/7/31

#
frikakikimasive wrote...
May I ask for your email sir , I will send my game so that you can help me with my game , it also if you are willing to help me , I desperately need help
My email is not to be made public -- sorry.
frikakikimasive frikakikimasive

2015/7/31

#
Oh I 'm sorry , because I 'm used to ask for assistance to my lecturer and he gives his email and told me to send the matter
danpost danpost

2015/7/31

#
If you can get it to compile, you can upload (share) it to this site, publishing the source code so that one can download it and look at it.
frikakikimasive frikakikimasive

2015/8/1

#
But how can I find a way to create questions in this quiz appear random ?
danpost danpost

2015/8/1

#
frikakikimasive wrote...
But how can I find a way to create questions in this quiz appear random ?
That would depend on how you store the question, answer and options in fields.
You need to login to post a reply.