• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Code for a quiz

Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
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.
So I left, I came home, and I ate some pie. And then I read this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic