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. initWithFrame: the designated initializer for UIView gives the view
copy - retain
You take ownership for an object you want to keep a pointer to
size and position
protocol
2. NSArray - class...
define it in the implemenation file
ordered collection of objects - immutable
storage
receiver[message]
3. A set of variables and associated methods. An object can be sent messages to cause one of its methods to be executed.
variable scope - if defined within a block
declaration and initialization of a variable
Used to find the time right now or to store past or future time/dates
object
4. Each class picks one _ as it's designated initializer....
message
to give it someone else - or another object
delegates and dataSources
initializer
5. Any individual object belonging to any class...
object
rectangular
is an instance of that class
wait until the loop finishes processing the event - at the end release it
6. NSString objects are usually sent _ rather than _...
accessors - individually we call them 'getters' and 'setters'
copy - retain
ordered collection of objects - immutable
initializer
7. A pointer to the object being asked to execute a method
Anytime you call a method with new - alloc or copy. You own and must release that object.
C Functionn
the message release to all its entries
receiver[message]
8. Reducing details to focus on the core concepts
upper
declaration and initialization of a variable
attributes - behavior
Abstraction
9. class methods...
group of global functions already assigned to this class
receiver[message]
instance of UIView or one of its subclasses
is called every time the event occurs
10. SomeClass* aVariable = [[SomeClass alloc] init]; is an example of what kind of instance?
NSCoder
CF - Ref
Instantiation from scratch
class methods - initializers
11. It's class is sent the message alloc - which creates an instance of that class and returns a pointer to it - and then that instance is sent the message init - which gives its instance variables initial values.
creating an initializer
ready-made instances - instantiation from scratch - and nib based instantiation
you must import the header file of that class
view
12. NSString *s = @'Hello - World'; is an example of...
designated initializer
instance variables
Encapsulation of functionality
declaration and initialization of a variable
13. Prefixing a character string with an @ symbol [specific - NSString class]...
wait until the loop finishes processing the event - at the end release it
Encapsulation of functionality
cannot be added to an array
creates an instance of NSString that holds the character string
14. If you aren't going to initialize an instance reference pointer at the moment you declare it by assigning a real value - it's a good idea to assign it _.
nil
pointers
subview(s)
copy - retain
15. In the last line of an init method...
create a XIB file
you always return the newly initialized object(return self)
instance variables
data source - view controller and delegate
16. A view is a subclass of _
methods for generating an instance
viewWillDissapear: and viewWillAppear:
You take ownership for an object you want to keep a pointer to
UIView
17. NSNumber - class...
@synthesize
copy - retain
Object wrapper around primitive types like int - float - double - BOOl
view controller
18. 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.
they need to be defined in the implementation file
(id)initWithFrame:(CGRect)aRect;
first responder
you must import the header file of that class
19. Proceed through the loop - jump back to the top and check again
subview(s)
Continue
NSCoder
Is a placeholder object
20. Name of the new class - it's superclass - the instance variables that each instance of this class has - and any methods this class implements
%d
header files declare
creating an initializer
you must import the header file of that class
21. @property - is using methods...
Is a placeholder object
to get and set variables
data source - delegate and view controller
collection of collections - NSArray of an NSArray
22. To get the full path for a directory in the sandbox - you use the _ NSSearchPathForDirectoriesInDomains.
Anytime you call a method with new - alloc or copy. You own and must release that object.
C Functionn
dealloc - is called on the object & the object's memory is returned to the heap
Data Encapsulation
23. A command directed to an object is called an...
initializers
the instance variables
message
declaration and initialization of a variable
24. Also - because arrays only hold a pointer to an object...
superclass's
its dataSource
a single-array can contain objects of different types
pointer - class
25. Execution of the break statement...
causes the program to immediately exit from the loop it is executing - whether its for - while or do
safety - subclassability and makes code look more consistent with C structs
to give it someone else - or another object
NSLog routine
26. A UITableViewController can fill all three roles of...
data source - view controller and delegate
calling code that does the instantiation for you
class's
position
27. When do you take ownership?...
%d
Anytime you call a method with new - alloc or copy. You own and must release that object.
size and position
unordered collection of objects - objects must be unique
28. What happens when the last owner calls release?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
29. Variable names tend to start with a _ letter; class names tend to start with an _ letter.
nil
data source - view controller and delegate
@interface ClassName:SuperClassName
lowercase - uppercase
30. Why properties?
upper
an object's property
safety - subclassability and makes code look more consistent with C structs
super - self
31. A UITableView usually needs three different pieces...
initializers
NSCoder
data source - delegate and view controller
creates an instance of NSString that holds the character string
32. Objective C only allows for single inheritance - so in regards to class you only ever see the following pattern
a mechanism to enable specific callbacks
for inheritance - adopting the superclasses implementation
@interface ClassName:SuperClassName
viewWillDissapear: and viewWillAppear:
33. Origin of a view's coordinate system is _ left
(id)initWithFrame:(CGRect)aRect;
you always return the newly initialized object(return self)
upper
data source - view controller and delegate
34. Primitives and C Structures...
Anytime you call a method with new - alloc or copy. You own and must release that object.
cannot be added to an array
CGFloat
lowercase - uppercase
35. Hold data and know nothing about the user interface
instance variables
wait until the loop finishes processing the event - at the end release it
Model Objects[Factory Worker]
Controller Objects[Managers]
36. Classes describe two things...
Generic object wrapper for other non-object data types
attributes - behavior
lowercase - uppercase
implementation
37. When an object is added to a NSMutableArray - that object is sent the message to retain;...
super - self
only the class and subclasses can access
the array becomes an owner of that object and has a pointer to it.
CGFloat
38. A callback is a function that is supplied in advance of an event - and...
values
object
instance
is called every time the event occurs
39. In Cocoa Touch - the table view asks another object _ what it should display...
its dataSource
causes the program to immediately exit from the loop it is executing - whether its for - while or do
@interface ClassName:SuperClassName
UIView
40. super - is used...
collection of collections - NSArray of an NSArray
nil
Is a placeholder object
for inheritance - adopting the superclasses implementation
41. Class methods typically either create
CGRect bounds - GCPoint center - CGRect frame
CGRect bounds
position
new instances of the class or retrieve some global property of the class.
42. Class methods do not operate on an _ or have any access to _ variables....
calling code that does the instantiation for you
instance
CGFloat
size and position
43. UITableViewController is a subclass of...
header files declare
accessors - individually we call them 'getters' and 'setters'
NSBundle
UIViewController
44. Three ways instances are created...
ready-made instances - instantiation from scratch - and nib based instantiation
nil
in the dealloc - or when a Controller's view is 'unloaded'
Model Objects[Factory Worker]
45. The class is responsible for what instance variables the instance has - but not the _ of those variables.
cannot be added to an array
new instances of the class or retrieve some global property of the class.
values
CGRect bounds - GCPoint center - CGRect frame
46. 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
group of global functions already assigned to this class
pointer - class
data
Encapsulation of functionality
47. Just a floating point number - but we always use it for graphics.
to give it someone else - or another object
header files declare
CGFloat
group of global functions already assigned to this class
48. [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.
receiver
define it in the implemenation file
instance
data
49. In Objective C arrays can hold only...
NSBundle
(id)initWithFrame:(CGRect)aRect;
%d
references to objects
50. What does autorelease mean?
wait until the loop finishes processing the event - at the end release it
nil
upper
creates an instance of NSString that holds the character string