Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

amb1s1

macrumors newbie
Original poster
Dec 20, 2006
18
0
Hi, I'm trying to learn Objective C and I don't have any application in mind to start learning objective C, so I decide to make a Test like application. I would like to know how hard you guys think is going to be to make an application like this. I would like to have like 70 question with 4 multiple choice answer. I have an Objective C book and a Cocoa Book. Can you guys point in the right way. Thanks
 

whooleytoo

macrumors 604
Aug 2, 2002
6,607
716
Cork, Ireland.
What you need to do is actually quite easy, there isn't too much code involved, but you still will need to learn about quite a few elements of Cocoa development.

In Xcode
- Use Xcode to create a Cocoa application project.
- Open the Resources sub-folder in Xcode, and open the .xib file there.

In Interface Builder
- Add an NSTextField to the window to show the question.
- Add an NSMatrix to show the radio buttons to choose the answer
- Add an "Ok" button (plus forward & back buttons if u need them).

You'll need to read up a tutorial on how to use Interface Builder to add IBOutlets (to point to the textfield and matrix so you can change their text, and fetch the answers), and how to add IBActions to the buttons (so you know when to check the answer and display the next question).
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
I think it's a good idea for a first project. With 70 questions though you may want to read in the questions and answers from an external textl file, a CSV file for example, or if you are feeling adventurous, an XML file!

b e n
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
I think this gives you a good chance to expand your abilities. You can start with 70 multiple choice questions that you read up from a next file, with the answer key in another plain, unencrypted text file.

You can move on to adding questions with textual responses, numeric only responses, etc. to expand your knowledge of the controls provided by IB.

You can then expand to storing the questions/answers in XML as lazydog mentioned, and then you could move on to encrypting the XML for the answer key to learn about that. If you wanted to be really paranoid you could avoid reading up/decrypting the answer key until the user has "submitted" the test. Obviously anything that is unencrypted in memory can be accessed, but if the user has already submitted their test, the answers won't help them anymore.

You could also expand to having the questions XML on a remote server that you pull from, to learn about how to do that, and if you wanted to get really ambitious you could run some sort of web service/CGI thing that takes the user's responses and returns correct/incorrect and their score, keeping the answers safely out of the user's hands.

-Lee
 

liptonlover

macrumors 6502a
Mar 13, 2008
989
0
sounds like a great way to learn! I don't know if this is your first programming attempt ever, and I wouldn't do something like this for my first attempt but you'll learn a lot of stuff I'm still trying unsuccessfully to learn so good luck!
PS when you figure out how to save/load data, I REALLY need help lol. This is getting ridiculous how I can't figure it out!

Another thing you can learn with this project is how to make a great interface. Make it a goal to have an app that doesn't need any instructions for the user to know what everything is. Also make sure saving/loading/sending in the score if you do that is fully automatic so the user does not have to worry.
Two more things you can learn how to do is adding informative sounds, and informative animations. It's a lot better than popping up an annoying message saying they got it right or wrong, it's fancier, more professional, you'll learn more, and the user will appreciate it.

Good luck!!!
Nate
 

amb1s1

macrumors newbie
Original poster
Dec 20, 2006
18
0
Now, I really think this can be a good project, but guys I have only done two apps. 1- Hello World and Push the button, will show the number 5 and Push the other one and will reset the number. I am long way to go, but I have to start with something. Beside MaacRumors.com which other forum can I go for objective c/cocoa. Thanks guys
 

zmttoxics

macrumors 65816
May 20, 2008
1,020
1
Walp, guessing / word games are usually a good intro to programming assignment. Card games can be a little harder (intro to stacks :p). My personal goal for cocoa is an IRC client - little more advanced but it will give me a chance to explore sockets and the IRC protocol a little more. :D
 

amb1s1

macrumors newbie
Original poster
Dec 20, 2006
18
0
Anybody interested in tutor me through Ichat please PM, I'm willing to pay. Will Prefer somebody from NY or NJ. Thanks
 

liptonlover

macrumors 6502a
Mar 13, 2008
989
0
:( I would gladly tutor you for free but I'm afraid I wouldn't be much help.
I have only found one other mac programming forum, and they are VERY inactive.
I suggest you go to http://www.cocoalab.com/ and go through their becomeanxcoder tutorial. It assumes you have no programming knowledge, it's a great tutorial, it's not too long, and it will prepare you for more cocoa/objc. I can't praise that tutorial enough. Here's all my programming links, these should help.

http://www.cocoalab.com/
http://osx.hyperjeff.net/reference/CocoaArticles.php
http://www.cocoadev.com/
http://www.cocoadevcentral.com/
http://www.cocoabuilder.com/archive/bydate
http://www.stepwise.com/
https://developer.apple.com/mac/index.php
http://www.mac-developer-network.com/
http://theocacao.com/
http://www.macdevnet.com/index.php/articles/beginners
http://macapper.com/2007/09/16/guide-programming-cocoa/
http://www.cprogramming.com/

Nate
 

amb1s1

macrumors newbie
Original poster
Dec 20, 2006
18
0
Thanks for your Help. I'm in the Network Business (cisco) I love my job, but I would love to learn how to program. The way apple is doing, I think is a good investment to learn object c.
:( I would gladly tutor you for free but I'm afraid I wouldn't be much help.
I have only found one other mac programming forum, and they are VERY inactive.
I suggest you go to http://www.cocoalab.com/ and go through their becomeanxcoder tutorial. It assumes you have no programming knowledge, it's a great tutorial, it's not too long, and it will prepare you for more cocoa/objc. I can't praise that tutorial enough. Here's all my programming links, these should help.

http://www.cocoalab.com/
http://osx.hyperjeff.net/reference/CocoaArticles.php
http://www.cocoadev.com/
http://www.cocoadevcentral.com/
http://www.cocoabuilder.com/archive/bydate
http://www.stepwise.com/
https://developer.apple.com/mac/index.php
http://www.mac-developer-network.com/
http://theocacao.com/
http://www.macdevnet.com/index.php/articles/beginners
http://macapper.com/2007/09/16/guide-programming-cocoa/
http://www.cprogramming.com/

Nate
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.