aspose file tools*
The moose likes Java in General and the fly likes Want to make a Quiz Software similar to ExamLab Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Want to make a Quiz Software similar to ExamLab" Watch "Want to make a Quiz Software similar to ExamLab" New topic
Author

Want to make a Quiz Software similar to ExamLab

Mahtab Alam
Ranch Hand

Joined: Mar 28, 2012
Posts: 282

Helllo Everyone,

I want to make a Quiz software using Java .(I am making this for Educational purposes for students and professionals)
It will be a desktop application and any one can install on their system and play with it.
In it there will be Categories.
User can select any one quiz under category .User can cancel Quiz at any time.
After finishing the Quiz he can review his answers. Questions will be in random order and I will be able to change the database of questions (I don`t know there will be need to use a database or not)

There will also be Image questions in which user have to identify the image and answer question based on image.
It is very much similar to ExamLab .If any one of you can tell how to do it And the skills that will be needed

Shukran


Oracle Java Programmer , Oracle SQL Expert , Oracle Java Web Component Developer
Jim Venolia
Ranch Hand

Joined: Sep 07, 2013
Posts: 154
    
    2

If there aren't too many questions you could have a 3d array of [category][question][answer]. A separate array would hold images.

This would be an excellent problem for getting started with SQL (replace the arrays with tables).

It's a no-brainer. We just need to take it to the next level to turn this into a win-win situation. The best practice is to get rid of the low-hanging fruit first. Ping me with an agenda so we can go flag up on this thing
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39396
    
  28
Not parallel arrays, I hope?
I would suggest a QuestionAndAnswer class.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3164
    
  47

For a side information, ExamLab was a desktop app long time ago. There were many conflicts on screen resolution and platform-specific configurations that made me convert it to a web app.
As per your requirement, a light-weight solution might not need a database at all. What all you need is a way to structure your question-answer pairs in relation to categories. Depending on the number of questions, storing each category with its questions and answers in a single file would do the trick.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

Devaka Cooray wrote:For a side information, ExamLab was a desktop app long time ago. There were many conflicts on screen resolution and platform-specific configurations that made me convert it to a web app.

Looks like someone didn't use proper LayoutManagers


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3164
    
  47

Maneesh Godbole wrote:Looks like someone didn't use proper LayoutManagers

Given that it wasn't written in Java?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
I have written a number of "Quiz' programs, most recently as web applications.

Choosing the most flexible possible representation of the questions is your most important design decisions.

I use XML for several reasons:

1. A question set can be completely contained in a single XML document - since that is text it is easily edited. No need to get involved with any database software.

2. input flexibility - if you come up with a new question style you can add it to an existing script without invalidating existing questions.

3. program manipulation - a DOM in memory is well suited for searching and selecting questions using standard Java library XML tools.

Bill
Mahtab Alam
Ranch Hand

Joined: Mar 28, 2012
Posts: 282

Shukran for your reply , I am going well in building this app.
But facing one problem. I have four JRadioButton as choices

When user selects JRadioButton j1 as answer for question 1 and clicks next, when question 2 is displayed that JRadioButton (that he chosen as answer of question 1) is shown selected by default for next question.

How to get rid of this problem.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3164
    
  47

Since Java 1.6, calling clearSelection() on your ButtonGroup unchecks all buttons in it. For further questions related to Swing, please start a new topic on our swing forum.
Mahtab Alam
Ranch Hand

Joined: Mar 28, 2012
Posts: 282

Shukran , It worked.

I will follow the guidelines.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Want to make a Quiz Software similar to ExamLab