Terms Flashcards
What is a runtime instance of a class?
An object
An object contains what of the instance variables declared by its class and what to the methods of the class?
In-memory copy and pointers
What is the procedure to create an object?
Allocation and initialization
What two distinct pieces specify a class?
The interface and the implementation
Where does the class declaration and definitions for the public interface go?
The interface
Which file extension has the class, type, function and constant declarations in them?
The header files (.h)
Which file extension has the implementation in them and may contain Objective-C and C code in them?
The implementation files (.m)
Which file extension has the implementation in them and may contain Objective-C, C, and C++ code in them?
The implementation files (.mm)
What compiler directive insures that that the same file is never included more than once?
import
What file in a framework is best to import, and what is usually that filed named?
The framework's umbrella file and is usually the same name as framework; e.g., the syntax for importing the header files of the (hypothetical) Gizmo framework is: #import
A class declaration begins and ends with what compiler directives?
@interface and @end
What is the class name and what is the parent class name in the following syntax: @interface ClassA : ClassB @end
ClassA is the class name and ClassB is the parent class
True or False. An Objective-C class can have more than one parent.
False. In Objective-C, a class can have only one parent.
What are the only two types of declarations that can be in a class declaration?
Property and method declarations
Where do any class declarations of custom functions, constants, or data types go in the interface file (.h)?
Outside of the @interface…@end block.
A class implementation begins and ends with what compiler directives?
@implementation and @end
What should an implementation file always import as part of its first lines of code?
It’s interface file.
What are the two types of variables that will contain an object that are supported in Objective-C and how are they declared?
Static variable declarations include the class name. Dynamic variable declarations use the type 'id' for the object.
What must go in front of all statically typed object variables and what does it represent?
An asterisk, which represents a pointer declaration.
True or False. An ‘id’ object variable type implies a pointer.
True.