Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
June 21, 2018, 08:40:31 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
  Print  
Author Topic: Add generic pseudocode for Obj. C to Summary section?  (Read 4245 times)
sarahswati
Newbie
*
Posts: 1


« on: February 13, 2013, 02:24:03 PM »

Hi,

I'm trying to learn Objective C after not having programmed in several years (C and C++ ...and not having programmed much outside of classes, frankly). I'm approaching 40 and I don't know if it's just getting older or some sort of ADD, but I found myself having to read this chapter several times, going back and forth, to get it all to sink in. (I don't think it's your book… your book seems wonderful. I think it's just me.) I found it immensely helpful for me to write out pseudocode for a generic Objective C program in order to keep everything straight. Something along the lines of the following:


Steps to Writing an Objective C Program

1. Import header files.

(Interface section)

2. Define object.

3. Declare methods for that object.

4. Repeat for all objects.

(Implementation Section)

5. Declare instances in braces.

6. Define method with return type and argument type.

7. Write procedure follwed by method in braces.

8. Repeat for all methods.

(Program Section)

9. Initialize main with its arguments.

10. Brace, @autoreleasepool.

11. In nested braces: Define pointer to object, allocate object, and initialize it all in one line.

12. Repeat for all objects.

13. Write general program instructions, using methods operating on objects.

14. End brace.

15. Return value.

16. End brace.

I thought it might be a good idea to include something like this in the Summary section at the end of the chapter to help those of us who have trouble keeping things straight in our minds while learning.

Any thoughts? (And do I have this right? Does it make sense?)

TIA
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents ゥ 2009 classroomM.com. All rights reserved.