Help with this logic please..

Discussion in 'iOS Programming' started by jjardim, Jan 7, 2010.

  1. jjardim macrumors newbie

    Joined:
    Mar 19, 2008
    #1
    Ok, I'm not a complete newbie I'm just having a hard time thinking of an approach to this problem.

    I have 20 questions the user is answering
    There are 4 choices per answer (1 is correct, the other 3 are random numbers)


    I want to retain the choices in perhaps an array? Thats where I lack the experience, how can I retain that info.

    SO if I wanted to go back to question 16, I want to display what the choices were at that time.

    Does that make sense?

    I'm not looking for you to code me an example. Just point me in a direction.

    Thanks All!
    Jardim
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Create a class the encapsulates the data (the question, so the choices available, the order they were in, potentially the choice made and what the correct choice was). Then simply add instances of that class to the array :)
     
  3. jjardim thread starter macrumors newbie

    Joined:
    Mar 19, 2008
    #3
    Thanks!

    Thats kinda what I was thinking but you solidified it for me.

    Thanks for the quick response!

    Jardim
     

Share This Page