Thread: need advice on project

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    380

    need advice on project

    Hi,
    I would like to acquire advice on writing an educational quizzing program. This program is suppose to allow the use of these question types: Multiple choice, direct, fill-in-blank, and true-or-false. It also it suppose to be able to load and save these from disk.

    My problem is on how to get the program to manage the different question types and storing and retrieving them from disk.

    Thanks for advice on this.
    Don't you dare hit me on the head, you know I'm not normal.
    A Stooge Site
    Green Frog Software

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    I'd suggest a config file of sorts. Maybe something like:
    Code:
    TYPE MC
    QUESTION Where are you?
    ANSWER 1 Here
    ANSWER 2 There
    ANSWER 3 Everywhere
    ANSWER 4 Nowhere
    CORRECT ANSWER 1
    ...... repeat more questions
    There are of course many ways to do this...
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    I once did a quiz project, a file with questions and answers looked like this.

    [file content]

    begin_header /* to validate wether it was a proper quiz file*/
    question
    answer
    end_header /* to validate wether it was a proper quiz file*/

    [EOF]

    The whole executable of the project was able to :

    make quizzes and encode them so that you couldnt read the answers from the files

    decode and read em so you could do the quiz

    an edit function

    While playing a quiz you could also typ in commands like /score (display score), /quit (quit the quiz), /pass (to skip a question no points awarded but points are being held of, /hint (give 1/Xth of the length of the answer depending on the difficultie set in the beginning, and then finally there was the command /highscore.

    When i started coding it i thought it was going to be done very fast, but when i started to do the editing,quiz-making and other functions it was more complicated then it looked...
    Anyhow i never finished it because it became boring after a while...

    To get to the actual coding
    My problem is on how to get the program to manage the different question types and storing and retrieving them from disk.
    Something like Salem said, storing and retrieving then from disk ... look into fgets and fprintf, but i suppose you are already familiar with these functions.

    ::edit::
    When i did such kind of project i never thought of multiple choice questions, it were only direct questions ....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Project Help please!
    By black_hole??? in forum C++ Programming
    Replies: 4
    Last Post: 04-28-2009, 12:55 AM
  2. c++ project advice
    By ecd in forum C++ Programming
    Replies: 2
    Last Post: 10-09-2003, 12:34 PM
  3. possible project
    By subdene in forum C++ Programming
    Replies: 6
    Last Post: 09-26-2003, 01:33 PM
  4. Remove ActiveX from VC++ project
    By cr_naik in forum Windows Programming
    Replies: 2
    Last Post: 07-02-2003, 11:15 AM
  5. DJGPP project problems
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 06-08-2002, 07:16 PM