Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Code for a quiz

 
Douglas McAuley
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am trying to develop a very simple quiz applet but can't really think where to start, can anyone give me a blueprint or even better some code.
Thanks
Douglas.
 
shankar surendranath
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
great effort.may i know about what topic this quiz will be?or is it multipurpose?
I am not an expert, but here is my suggestion.
1. Keep your questions and answer options in a text file, seperated by special characters.(then we can parse them using StringTokeniser).
2. Display the questions in a panel and the answer options in a panel. Next to the answer options will be four(or the exact number) of radio buttons.
3. There will be a button, which pickes up the value checked and compare it with the correct value.
4. The score can be calculated after each question has been answered.
5. In future you can use threading for setting timelimits for each question and you can also add graphics like our javaranch cattle roundup quiz. .
Keep us posted about your progress.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic