|
-
Mar 11th, 2010, 01:00 PM
#1
Thread Starter
Fanatic Member
Program for "Questions"
I want to ask how to make this:
I make program for questions like "test" .
First they have 3 fields to fill Name, Age , Email
and down start the questions
and after they finish the questions and press the buton "Check" to Give them the information on .txt file or in other slide don't know but to show them the information like ready to be printed with theyr questions and answers.
Something like this:
Name: Yes
Age: 20
Email: [email protected]
1. What is CCCP ?
a) Russian
b) Bulgaria
B) Greece
and the right answer is a) and if they click on the radio button or checkbox and the show the results that the user has mades
example:
Name: Yes
Age: 20
Email: [email protected]
1. What is CCCP ?
a) Russian
and this way to show the results only the awnsers to the questions that he choose to select and if its wrong answer to be in font = red if its right to be in font = green
can someone help me?
-
Mar 11th, 2010, 06:06 PM
#2
Re: Program for "Questions"
First, you need to decide how are you going to store your questions. Will it be a database, or a XML file, or a plain text file, or a spreadsheet?
Depending on this you will need to have something that reads the test questions, iterates through them, displaying each question, the necessary number of radio buttons and then some code for displaying the results and saving the user input.
So, how are you going to store the quesitons?
-
Mar 12th, 2010, 08:41 AM
#3
Thread Starter
Fanatic Member
Re: Program for "Questions"
i have wirted up to show the results on .txt file or other file
-
Mar 12th, 2010, 08:55 AM
#4
Re: Program for "Questions"
His question was no about showing the results, but where are you storing the questions?
-
Mar 12th, 2010, 08:57 AM
#5
Thread Starter
Fanatic Member
Re: Program for "Questions"
-
Mar 12th, 2010, 09:03 AM
#6
Re: Program for "Questions"
You could use panels for that. Place on every panel that questions you want. Use the "Document Outline panel" to sort them. When a user has finished answering the questions they can go to the next panel.
i have wirted up to show the results on .txt file or other file
??? Don't know what that means, but you can export the answers after everything has been filled. How you want to do it, is up to you obviously.
-
Mar 12th, 2010, 09:17 AM
#7
Thread Starter
Fanatic Member
Re: Program for "Questions"
i need help about that i have maded the questions already by labels
and the awnsers with radiobuttons
and when they fill the awnsers to show them the results
-
Mar 12th, 2010, 09:17 AM
#8
Hyperactive Member
Re: Program for "Questions"
I did that with a wizard-style program that ran the user through eight or nine screens worth of configuration options... I had one window but several panels, each panel containing the controls for one option set.
So you could do the same here... Keep track of which panel you're on, and when the user answers a question you hide the current panel and show the next one. Internally, you could probably store the responses in a simple array... question 1 had answer A, question 2 had answer C, and so forth.
As to displaying the answers... depends on what you're looking for. Do you want the program to just display the answers once, or store the answers in human-readable format for later use?
Either way, you need to iterate through the question array, display the questions, display the selected answer, and set the font color at that time.
I hope that helped.
-
Mar 12th, 2010, 09:27 AM
#9
Thread Starter
Fanatic Member
Re: Program for "Questions"
what is that wizzard that you talk about ?
-
Mar 12th, 2010, 09:32 AM
#10
Hyperactive Member
Re: Program for "Questions"
The one I referred to was one that helped design configuration options to be used in another program. If you're asking what a "wizard" is, I suggest you look here:
http://www.bitzipper.com/faq_wizard.html
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|