Programming in Objective C (Chapters 1 - 3) -
About this set
Created by:
GoatFeather on December 1, 2011
Subjects:
iOS, Objective C, programming, iPhone, iPad
Description:
These are flashcards for Chapters 1 through 3 of David Kochan's "Programming in Objective C." Please let me know what you think or if you have any suggestions. Thanks!!! :-)
Log in to favorite or report as inappropriate.
Order by
45 terms
Terms | Definitions |
|---|---|
procedural programming language | A language in which programs are defined by procedures and functions that operate on a set of data |
integral values | values without decimal places |
Add an int to a NSString Object? | (@"The integer is %i", number) |
newline character | \n (backslash n) |
What means a program ends normally? | 0 |
A constant NSString Object? | @"Strings Rule" (The "@" symbol indicates an NSString object) |
What is an object? | A set of variables and associated methods. An object can be sent messages to cause one of it methods to be executed. |
Print stuff in objective C? | NSLog(@"HelloWorld"); |
main | A special name that indicates precisely where the program begins execution |
Import a system file? | #import <Foundation/Foundation.h> |
Import a file you created? | #import "myprog.h" |
Compile at Command Line? | gcc -framework Foundation filename -o progname |
Look in current directory? | ./ (period backslash) |
GNU objective-c compiler? | gcc |
Stop Sign | Fatal Error |
Yellow exclamation mark | warning |
.o | object file (compiled file) |
.pl | perl source file |
.mm | OBJECTIVE C++ source file |
.m | OBJECTIVE C source file |
.h | header file |
.cc .cpp | c++ language source file |
.c | C language source file |
Who pioneered the C programming language? | Dennis Ritchie @ Bell Labs |
The range of value associated with each data type is??? | machine depenedent |
Data Encapsulation | Data for an object is sotred in its instance variables and is accessed only by the object's methods. This maintains data integrity. |
How to combine alloc and init? | ClassName *newInstance = [ClassName new]; |
Setters and Getters are referred to as? | accessor methods |
Reference (pointer) | Holds a memory address "pointing" to the location of the object's data in memory |
* | indicates it is creating a reference (or pointer) to an object |
Free memory of an object? | [instanceName release]; |
Combine three-line sequence to declare, allocate, and initialize? | ClassName *newInstance = [[ClassName alloc] init]; |
Initialize an object? | newInstance = [newInstance init]; |
Create a new instance? (allocate new memory space for object) | newInstance = [ClassName alloc]; |
Define a new variable for a new instance of class? | ClassName newInstanceName; |
In the @implementation section you? | Define the Methods |
In the @interface section you? | Declare the Methods |
+ before method indicates? | Class Method |
- before method indicates? | Instance Method |
Method declarations in interface? | -(returnType) methodName: (argType) argName; |
Syntax for using methods in Objective-C | [ClassOrInstance method]; [receiver message]; [receiver message: input]; |
Applying a method to an object? | affects the "state" of that object |
methods | The actions performed on the instance |
instance | A unique occurence of class. A concrete representation of a class. Instances are objects, typically created by sending an "alloc" or "new" message to a class object |
class | A set of instance variable and methods that have access to those variables. After a class is defined, instances of the class (that is objects) can be created. A blueprint. |
First Time Here?
Welcome to Quizlet, a fun, free place to study. Try these flashcards, find others to study, or make your own.