SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
iOS 5 App Development Objective C
Start Test
Study First
Subjects
:
it-skills
,
apple
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. Each object does its own job - and presents to the rest of the world - to other objects - and indeed in a sense to the programmer - an opaque wall whose only entrances are the methods to which it promises to respond and the actions it promises to per
references to objects
CGFloat
Encapsulation of functionality
creating an initializer
2. Each _ has a 'designated' initializer method....
do so in viewDidLoad
for inheritance - adopting the superclasses implementation
class
will be ignored
3. You use _ to implement the view
copy - retain
CGRect bounds
message
(id)initWithFrame:(CGRect)aRect;
4. Execution of the break statement...
Model Objects[Factory Worker]
only the innermost loop in which the break is executed is terminated
causes the program to immediately exit from the loop it is executing - whether its for - while or do
lowercase - uppercase
5. [Instance Variables] The code it gets from its class and in a sense is shared with all other instances of that class - but the _ belong to it alone.
arguments[message]
nil
is an instance of that class
data
6. For view controllers that are closely related - like a table view controller and its detail view controller - you can simply give them _ that point to each other.
upper
instance variables
UIViewController
CGRect
7. Categories are an Objective C way to add _ to an existing class without subclassing
values
CGRect
Abstraction
methods
8. Number one use of protocols in iOS...
you must import the header file of that class
%d
designated initializer
delegates and dataSources
9. NSString* s2 = [s uppercase String]; Is an example of what kind of instance?
instance variables
receiver
safety - subclassability and makes code look more consistent with C structs
Ready-Made Instance
10. The notion that the data for an object is stored in it's instance variables and is accessed only by the objects methods. This maintains the integrity of the data.
count - objectAtIndex - makeObjectsPerformSelector - sortedArrayUsingSelector - lastObject
accessors - individually we call them 'getters' and 'setters'
receiver - selector - arguments
Data Encapsulation
11. We can use dot notation to reference...
12. Keep view and model objects in sync - control the 'flow' of the application - and save the model objects out to the filesystem
Controller Objects[Managers]
header files declare
Maintenance of state
to get and set variables
13. SomeClass* aVariable = [[SomeClass alloc] init]; is an example of what kind of instance?
creating an initializer
Instantiation from scratch
array[class - NSMutableArray]
initializer
14. In the last line of an init method...
you always return the newly initialized object(return self)
Hash table - Look up objects using a key to get a value.
variable scope - if defined within a block
viewWillAppear - viewDidAppear - viewWillDisappear & viewDidDisappear
15. Asking a class or object to execute a method
data source - view controller and delegate
message
for inheritance - adopting the superclasses implementation
CGRect
16. A command directed to an object is called an...
the array becomes an owner of that object and has a pointer to it.
Controller Objects[Managers]
message
instance
17. Delegation is an object oriented approach to
receiving and handling events that are associated with it
retain
callbacks
safety - subclassability and makes code look more consistent with C structs
18. The object to which a message is sent - the receiver can be referred to as self from inside the method that is invoked
receiver
setPossessionName
methods
UIViewController
19. Only exists within the statement block there defined - outside of the block is fine
alloc - singleton - informational utility method?
pointer to an object
Abstraction
variable scope - if defined within a block
20. In general - in Objective-C - a reference to an instance is a _ - and the name of the data type of what's at the far end of that pointer is the name of the instances's _.
causes the program to immediately exit from the loop it is executing - whether its for - while or do
pointer - class
implementation
NSBundle
21. A method in a _ is required unless its preceded by an @optional.
creates an instance of NSString that holds the character string
protocol
an object's property
rectangular
22. Property List...
collection of collections - NSArray of an NSArray
designated initializer
parentViewController
unordered collection of objects - objects must be unique
23. Reference Counting...
protocol
setPossessionName
self
You take ownership for an object you want to keep a pointer to
24. Hold data and know nothing about the user interface
delegates and dataSources
Model Objects[Factory Worker]
methods for generating an instance
type - name and value
25. The only reason to temporarily own an object - is...
to give it someone else - or another object
ordered collection of objects - immutable
the message release to all its entries
is called every time the event occurs
26. When overriding a method - all you need to is _ - you do not need to declare it in the header file because it has already been declared by the superclass....
define it in the implemenation file
do so in viewDidLoad
for inheritance - adopting the superclasses implementation
attributes - behavior
27. Why properties?
CGFloat
methods
Core Graphics Framework
safety - subclassability and makes code look more consistent with C structs
28. Archiving works by creating an instance of _ - which is essentially just a container for data - and placing objects and their data inside it.
implementation
its dataSource
instance of UIView or one of its subclasses
NSCoder
29. NSDictionary...
receiver[message]
group of global functions already assigned to this class
Hash table - Look up objects using a key to get a value.
define it in the implemenation file
30. super - is used...
position
for inheritance - adopting the superclasses implementation
pointer - class
the array becomes an owner of that object and has a pointer to it.
31. NSDate - class...
data
pointers
wait until the loop finishes processing the event - at the end release it
Used to find the time right now or to store past or future time/dates
32. NSString objects are usually sent _ rather than _...
Functions
Encapsulation of functionality
copy - retain
parentViewController
33. When an object is removed from an NSMutableArray - that object is sent the message release;...
data source - delegate and view controller
the array relinquishes ownership of that object and no longer has a pointer to it
they need to be defined in the implementation file
message
34. Proceed through the loop - jump back to the top and check again
its dataSource
Continue
ready-made instances - instantiation from scratch - and nib based instantiation
a single-array can contain objects of different types
35. Also - because arrays only hold a pointer to an object...
a single-array can contain objects of different types
dealloc - is called on the object & the object's memory is returned to the heap
instance of UIView or one of its subclasses
attributes - behavior
36. In Objective C - the name of a setter method is set plus the name of the instance variable it is changing - for example PossessionName would be...
for inheritance - adopting the superclasses implementation
lowercase - uppercase
array[class - NSMutableArray]
setPossessionName
37. A view is an...
parentViewController
safety - subclassability and makes code look more consistent with C structs
NSCoder
instance of UIView or one of its subclasses
38. When the message endEditing: is sent to a view - if it or any of its subviews or currently the _ - it will resign its first responder statues - and the keyboard will be dismissed.
safety - subclassability and makes code look more consistent with C structs
first responder
its dataSource
copy - retain
39. When an object is added to a NSMutableArray - that object is sent the message to retain;...
copy - retain
data source - delegate and view controller
the array becomes an owner of that object and has a pointer to it.
instance variables
40. Values to be supplied as the parameters to the method
they need to be defined in the implementation file
viewWillAppear - viewDidAppear - viewWillDisappear & viewDidDisappear
creates an instance of NSString that holds the character string
arguments[message]
41. Any other initializer a class has calls the _ designated initializer....
42. A pointer to the object being asked to execute a method
header files declare
selector[message]
instance variable of an object is valid
receiver[message]
43. Origin of a view's coordinate system is _ left
upper
a mechanism to enable specific callbacks
rectangular
position
44. Use of class methods - there are three...
@synthesize
alloc - singleton - informational utility method?
creating an initializer
class methods - initializers
45. Three ways instances are created...
group of global functions already assigned to this class
Core Graphics Framework
ready-made instances - instantiation from scratch - and nib based instantiation
C Functionn
46. If the view has no subviews - create it programmatically; if it has subviews
Ready-Made Instance
an object's property
create a XIB file
%d
47. Instance Variables by default are called @protected meaning...
define it in the implemenation file
arguments[message]
only the class and subclasses can access
the array becomes an owner of that object and has a pointer to it.
48. Dynamic binding means that when we call a certain object's method - and there are several _ of that method - the right one is figured out at runtime.
Instantiation from scratch
implementation
array[class - NSMutableArray]
count - objectAtIndex - makeObjectsPerformSelector - sortedArrayUsingSelector - lastObject
49. Defining variables - three parts...
type - name and value
create a XIB file
super - self
Continue
50. @property - is using methods...
view controller
header files declare
to get and set variables
selector[message]