Help with scantron project please.

This is a discussion on Help with scantron project please. within the C++ Programming forums, part of the General Programming Boards category; Hi. I have a project due Wednesday and I just looked at it. I don't know where to start. Could ...

  1. #1
    Unregistered
    Guest

    Help with scantron project please.

    Hi. I have a project due Wednesday and I just looked at it. I don't know where to start. Could some body give me some pointers?

    scantron.cpp

    1. Accepts a scantron quiz key for a 10 item quiz. The first 9 digits are the ID and the next 10 characters are the answers. The key will have an ID of 000000000.

    2. Accepts up to 50 scantron quizzes.

    3. Stops when it encounters a form with an ID of 000000000. Note: The scantron generates the @ character when the answer is blank.

    4. Prints a count of how many forms were scanned.

    5. Prints a list of IDs and scores, as shown below.

    6. Prints an analysis of the answers for each of the 10 questions, as shown below.

    ---Sample Dialogue-----------------------------------------------------

    Key? 000000000ABCDEABCDE
    Quiz? 111111111ABCABCABCA
    Quiz? 234567891ABCDEABCDE
    Quiz? 333333333AAAAAAAAAA
    Quiz? 000000000@@@@@@@@@@

    There were 3 quizzes scanned.

    ID SCORE
    -- --------
    111111111 3
    234567891 10
    333333333 2

    ITEM A B C D E Key
    ----- --- --- --- -- --- ------
    1 3 0 0 0 0 A
    2 1 2 0 0 0 B
    3 1 0 2 0 0 C
    4 2 0 0 1 0 D
    5 1 1 0 0 1 E
    6 2 0 1 0 0 A
    7 2 1 0 0 0 B
    8 1 1 1 0 0 C
    9 1 0 1 1 0 D
    10 2 0 0 0 1 E

    -------------------------------------------------------------------------

    Any help is greatly appreciated!

  2. #2
    Unregistered
    Guest
    That bottom part didn't come out but its supposed to be a table showing the number of the question and who missed it, etc.
    I think you can get the picture.

  3. #3
    Intranasal Heroin User Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,035
    what compiler are you using? if its Borland Turbo C++, you could make one large graphics of a scantron sheet, and put in some mouse support, and when the user clicks on a specific part just use nested if statements on where the user clicked. so just draw a nice little scantron sheet, print out the coordinates for where the mouse is, and say if MouseX == somthin and MouseY == somthin, then add or deduct a point. hope this helps.

  4. #4
    Unregistered
    Guest
    I'm using MSVC++

  5. #5
    Intranasal Heroin User Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,035
    ohhh.....darn. Looks like in order to put a graphic on your going to have to do windows api programming...your using console right?
    well anyway, i wouldn't know what to suggest, but what I would do, is i'd take a huge crashcourse on starting small and getting bigger by making the key an array of how many questions there are, and with the question if the user types input, the program would take the input and match it with the key's equal element. for example, on question number three the user typed 'A', then the program would say
    Code:
    if(key[question_number] == input) //in this case question_number = 2, for question number 3(arrays start with 0)
    {
         score++;
         question_number++; //go to next question
    }
    else
    {
        question_number++;//do not add on to score, just continue to next question
    }
    and before that, you could say
    Code:
    while(question_number == 1)
    {
          cout << "Did you make love to your cat in a dumpster?" << endl;
          cout << "A: Yes  B: No  C: Maybe D: I have no idea" << endl;
    }
    to tell the user the question.
    Now with the key array, you could say
    Code:
    char key = {
    {'A','C','D','B'}}
    this says question #1 is A, question #2 is C, #3 is D and #4 is B.
    Hope this helps.

  6. #6
    Registered User Paro's Avatar
    Join Date
    Feb 2002
    Posts
    160

    Exclamation

    Exterria:

    How did you make it say

    Code:

    blah blah blah


    when i do it it says

    Blah Blah
    Edit:

    Code:
    Blah Blah
    AHHHH i figured it out thanks anyways LOL

    [POOPOO]Hehe does this work[/POOPOO]
    Last edited by Paro; 02-18-2002 at 04:19 PM.

  7. #7
    Unregistered
    Guest
    What kind of variable type should I use at the beginning to store: 00000000ABCDEABCDE?

  8. #8
    Intranasal Heroin User Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,035
    whats that for anyway?

  9. #9
    Unregistered
    Guest
    The first nine numbers are the student ID number. The following 10 characters are the answers.

  10. #10
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    char arrays would probably be the easiest.

  11. #11
    Unregistered
    Guest
    how do i get 000000000ABCDEABCDE into a char array?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 09:05 AM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. Help with scantron project please.
    By IT-s in forum C++ Programming
    Replies: 6
    Last Post: 02-06-2006, 10:37 PM
  4. Game Independent Anti-cheat Project Needs Programmers
    By GIA Project Lea in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-15-2005, 07:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21