Amazon.com Widgets Please validate or verify my descriptions are correct
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 14, 2014, 06:59:31 PM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Old Stuff
| |-+ Chapter Study
| | |-+ Chapter 3 - Classes, Objects, and Methods
| | | |-+ Please validate or verify my descriptions are correct
Pages: [1] Go Down
Print
Author Topic: Please validate or verify my descriptions are correct (Read 681 times)
bigfly
Newbie
*
Posts: 5



Email




on: November 28, 2010, 04:28:50 AM

Is my understanding correct? (see comments in code)
Code: (Objective-C)
@implementation Fraction // @[section] NewClassName //

- ( void ) print { // methodDeclaration, "print" method uses "NSLog" function to display //

NSLog( @"%i/%i", numerator, denominator );  // methodDefinitions, that will display in Console //
}

- ( void ) setNumerator: ( int ) n { // methodDeclaration with "argument" //

numerator = n; // methodDef or instance var with = arg return type or value //
}

- ( void ) setDenominator: ( int ) d { // methodDeclaration with "argument" //

denominator = d; // methodDef or instance var with = arg return type or value //
}

@end


Thanks for any comments.
Logged

My daddy always said, "If you want it done right, you gotta do it yourself!"

"Livin', learnin', and lovin' life!"
Pages: [1] Go Up
Print
Jump to:



Login with username, password and session length

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 (c) 2009 classroomM.com. All rights reserved.