Elance Blackberry ( Native SDK Development ) Test Answers 2015



In what situation would you need to have a debug token installed for you to be able to load debug applications?
To run or debug unassigned applications
Installing release builds
Both of these
Neither of these


Consider the following in C++: namespace myNamespace { int a; int b; } How would the main part of the program access myNamespace variable a?
myNamespace::a
myNamespace:a
myNamespace.a
a


What must users utilize to bring their headless apps associated UIs to the foreground?
The app service.
The UI service.
The foreground service.
The notification service.


Why must an object id value always be unique within a single component?
Object ids don't have to be unique.
Because object ids are referred from anywhere within the component in which it is declared.
Because object ids are referred from external components in which it is declared.
Because object ids are deleted from within the component in which it is declared.


In order to use the functionality that the Image API offers, you must do what?
Use the available methods in your code
Import the Image.h header file
Include the io/io.h header file
Use io.open() and io.close() to open and close an input string


An instant messaging client is an example of what kind of app?
A headless, long-running app.
A headed, long-running app.
A headless, short-running app.
A headed, short-running app.


Within a signal handler, what does JavaScript determine?
It determines what your app will do in response to a sub-element.
It determines what your app will do in response to a signal.
It determines what your app will do in response to an object.
It determines what your app will do in response to an element.


If you need your app to continue running despite it not being visible, what permissions must be changed in what file?
The run_when_backgrounded parameter must be changed in the bar-descriptor.xml file.
The run_when_backgrounded parameter must be changed in the bar.xml file.
The when_backgrounded parameter must be changed in the bar-descript.xml file.
The run_backgrounded parameter must be changed in the descriptor.xml file.


When multiple properties are specified on a single line, what must they be separated by?
Comma
Semicolon
Hyphen
Colon


What control emits the clicked() signal?
Click
Button
Signal
Invoke


What function hides the page on the top of the stack, then removes it from the navigation stack and displaying the previous page again?
stack()
push()
pull()
pop()


Choose the C++ statement which declares a function with a default value for an argument.
void function(int a)
void myfunction(int a;a = 2)
void myfunction(int a)
void myfunction(int a=2)


What is the proper syntax for importing the geoMonitor.h header file?
include geoMonitor.h
#include<geoMonitor.h>
geoMonitor.h
#include geoMonitor.h


What is required of id syntax?
It must must begin with an upper-case letter or an underscore, and only contain letters, numbers, and underscores.
It must must begin with a roman numeral or an underscore, and only contain letters, numbers, and underscores.
It must must begin with a number or an underscore, and only contain letters, numbers, and underscores.
It must must begin with a lower-case letter or an underscore, and only contain letters, numbers, and underscores.


In the Momentics IDE, what is the difference between a workspace and a perspective?
A workspace is a collection of projects whereas a perspective is a layout of views in the IDE
A perspective is a collection of projects whereas a workspace is a layout of views in the IDE
A perspective and a workspace refer to the same thing
A perspective lives outside the IDE whereas a workspace lives inside an IDE


What does ComponentDefinition represent?
An imperative way to create dynamic components in QML.
A unique way to invoke rootContainer.
A method for placing calls within a single container.
A unique way to use ControlDelegate to load QML.


When adding a comment, what must the line start with?
//
||
\\


Which of the following are examples of UI controls?
Page, Contractor, Button, List
Page, Container, Button, Label
Port, Container, Button, Label
Purge, Maintainer, Button, Label


What is the syntax for signal declaration?
Q_SIGNALS: void textChanged(QString text);
void: textChanged(QString text); Q_SIGNALS
Q_SIGNALS: void (QString text)textChanged;
(QString text)Q_SIGNALS: void textChanged;


How do you put your phone into Development mode?
Settings > Blackberry ID > Development Mode
Settings > Blackberry Project > Development Mode
Settings > Blackberry Bridge > Development Mode
Settings > Security > Development Mode


Which C++ statement assigns to variable a the address of variable b?
a = *b;
a = &b;
a = "b;
a = b;


Which of the following are property types that QML supports?
cos, real, sin, strung
ing, read, boot, strong
int, real, bool, string
ins, read, book, strap


Select the correct statement about the Model and the View features.
The Model holds the raw data and does not worry about the display, whereas the View is responsible for rendering the data on the display
Neither the View and the Model are responsible for rendering the data on the display
Both the View and the Model are responsible for rendering the data on the display
The View holds the raw data and does not worry about the display, whereas the Model is responsible for rendering the data on the display


When a property is set to relative, what happens to the child object value when the parent value is changed?
It is deleted.
It is updated automatically.
Nothing happens.
The child object generates more child objects.


What is one way that properties are specified?
One-per-line.
One-per-page.
One-per-unit.
Two-per-line.


When a CheckBox control's check state signal changes, what signal does it emit?
checkedChanged()
“(checkedChanged)”
Changed()checked
'checkChanged()'


True or False? An AutoConnection will automatically detect if the slot is in an object on another thread and make the queued connection.
True
FALSE


What are JavaScript expressions used for within the QML language?
They are used to assign property ids.
They are used to assign object values.
They are used to assign property values.
They are used to assign element values.


What is Cascades?
A set of QML standards
A portion of BlackBerry's Native SDK
Slang for CSS
APIs that BlackBerry provides to help developers produce functional UIs out of the box


How would you declare a pointer which has no type in C++?
int * data;
void * data;
null * data;
void data;


Which of the following is not a correctly written id value?
id_1
idvalue_1
ID:_1
text1


Why is it important to use comment marks within QML syntax?
Comment marks tell the compiler to stop processing data.
Comments must be marked appropriately so the compiler can tell the difference between your comments and your code.
Comment marks tell the compiler to stop processing data and start at the beginning.
Comment marks tell the compiler to add the comments into the compiling of the program.


When creating a member function that needs to function as a slot, what section must you place the function declaration?
It must be placed in the public slots: section.
It must be placed in the private slots: section.
It must concatenate the public slots: section.
It must be routed to the public slots: section.


Choose the best description of the following configuration: Dialog* pMyDialog = Dialog::create() .content(Container::create()) .onClosed(this, SLOT(onClosedHandler()) .open();
Defining a Slot in QML
Defining a Dialog in QML
Defining a Dialog in Javascript
Defining a Dialog in C++


The _______ file is the main piece of the UI (the root of the visualization of the program).
App.cpp
App.qml
Main.cpp
Main.qml


True or False? You can only debug on a simulator.
TRUE
False


What is the correct order when setting up an event que for requesting and listening for events?
Use any service at any time, Listen for events, Start the library, Request events to flow into the event queue
Request events to flow into the event queue, Start the library, Use any service at any time, Listen for events
Listen for events, Use any service at any time, Request events to flow into the event queue, Start the library
Start the library, Request events to flow into the event queue, Use any service at any time, Listen for events


What static function do you use to connect a signal to a slot with C++?
object;;connect()
QObject::connect()
Qbject::connecter()”
Qobject;:connect()}


When adding multiple comments, what must be at the beginning and end of the line?
*/ at the beginning, and /* at the end.
|| at the beginning, and || at the end.
“ at the beginning, and “ at the end.
/* at the beginning, and */ at the end.


Which of the following can QML access from C++?
Only slots and signals
Functions, slots, signals and properties
Only functions and slots
Only signals and properties


Which of the following are examples of headless, short-running apps?
Post-directed SOS message receivers, fine-grained location trackers, or uploaders.
Port-directed SMS message receivers, coarse-grained location trackers, or downloaders.
Part-directed SNS message receptors, coarse-grained location tricklers, or downloaders.
Data-directed MSM message receivers, fine-grained location trackers, or downloaders.


Given the following code sample in C++: catch(…) { cout << "exception";}. What do the ellipses indicate?
Both of these
The handler will only catch int exceptions
The handler will catch any type of error thrown
None of these


Which of the following is a property that is relative to another property?
color: "yellow"
height: 300
width: parent.width - 50
width: 300


When one class is derived from another in C++, what is inherited from the base class?
The Friends
All of these
The Destructor
The Constructor


Which of the following operators allow you to define the member functions of a class outside the class in C++?
,
%
::
?


Which of the following is an example of an AbstractPane
NavigationPane
All of these are examples of an AbstractPane
TabbedPane
Page


How many slots can a signal be connected to?
5
3
1
There is no limit


Which of the following is NOT a component of the Qt toolkit?
Qt Network module
All of these are part of the toolkit
Qt Media module
Qt Core


Consider this code fragment in C++: a = 25; b = &a; What does b equal?
address of b
value contained in the address of a
address of a
25


If you press and hold an item that has Context Actions on it, which of the following will happen?
None of these
It will revel a compressed menu
It will reveal a full menu
It will not reveal a menu


Which macros should accompany the connect() parameter?
The INVOKE() and SLOT() macros.
The SIGN() and BUTTON() macros.
The SIGNAL() and STOP() macros.
The SIGNAL() and SLOT() macros.


Select the statement that is true.
Only the Action Overflow menu can come in full and compressed states
Neither the Tab Overflow menu and the Action Overflow menu can come in both full and compressed states
Both the Tab Overflow menu and the Action Overflow menu can come in full and compressed states
Only the Tab Overflow menu can come in full and compressed states


Is it possible to write an app entirely in QML as opposed to C++?
No. All apps must be written in C++.
No.
No, all apps must be written in QML.
Yes, though there is some inherent C++ code that is provided when creating a new Cascades project in the Momentics IDE.


In regard to C++, the first-class containers in the STL include:
set, multiset, map, multimap
Sequence containers, Associative containers, Container adapters
vector, deque, list, set, multiset, map, multimap
vector, deque, list


What is the following QML code sample do? signal mySignal(float value, bool enabled)
Imports a signal from the mySignal class.
Creates a button
Creates a signal with two parameters
Retrieves an event


Which of the following is a way to properly create a password field in QML?
ListField{ id:password inputMode: TextFieldInputMode }
TextField{ id:password inputMode: TextFieldInputMode.Password }
textField->setInputMode(bb::cascades::TextFieldInputMode::Password);
textField->setInputMode(bb::core::TextFieldInputMode::Password);


If you wanted to develop Cascade applications, which of the following applications would you NOT need to use?
QML
Java
C++
Javascript


If the value of a slider changes, what signal is emitted by the Slider control?
ValueChanged()immediate
ValueChanged()
immediateValue()
immediateValueChanged()


How are JavaScript inline functions added to QML elements?
They are added as units.
They are added as functions.
They are added as methods.
They are added as objects.


The BBM Social Platform uses a(n) ____ programming model.
event driven
threads
object oriented
procedural


Which of the following is not a field that messages can include?
data
subject
body
sender


When your QML property is type-safe, what must be matched with the property type?
Its hierarchy.
Its ranking.
The value.
Its inheritance.


Which of the following properly displays the syntax to import JavaScript code into the temperature conversion app?
import TemperatureFunctions.convertTemp(tempInport.t
TemperatureFunctions.convertTemp(tempInport.t
import "tempFunctions.js" as TemperatureFunctions
import tempFunctions.js as “TemperatureFunctions”


Which of the following is NOT a perspective in the Momentics IDE?
QML System Information perspective
QNX System Information perspective
Debug perspective
QML Editing perspective


Which of the following is NOT true about Cascades?
It provides the look and feel for Blackberry
It is a replacement for the Qt Quick
It provides advanced placement management of components
It does NOT use QML


When a property has be declared as a default property, what can be done to the property tag?
It must be replaced with a new tag.
It can be omitted.
It needs a secondary child property tag similar to its default property tag.
You must set up new property tags.


By default, long-running headless apps have a short run time. What permissions must be changed to extend their run time?
The _sys_headed_nostop permissions.
The _sys_headless_nostop permissions.
The _sms_headless_nonstop permissions.
The _sjs_head_stop permissions.


Once you have created an object, when is it necessary to change its id?
It is necessary to change its id before runtime binding.
The id must be changed at compile time.
You must change it before you cycle the app for the first time.
It is never necessary and cannot be changed.


Which of the following is NOT true about the QString Qt class?
Does not work with QChar
It allows access to individual characters
It can be initialized with UTF16 character array


What type of exceptions will the following C++ function throw: int myfunction (int a) throw();?
Int
All
None


The acronym PPG stands for:
Platform Proxy Gateway
Push Payload Gateway
Push Proxy Gateway
Proxy Push Gateway


The frame around the display area of the screen is called what?
Device canvas.
Device bezel.
Devise easel.
Device box.


What trait should signals have if you want to provide simple interactions in your apps?
They should be sanitized.
They should be predefined.
They should be encapsulated.
They should be sandboxed.


Which of the following is not a step in loading a QML document from C++?
QObject::setProperty()
Application::setScene()
QmlDocument::create()
QmlDocument::createRootObject()


True or False? The MOC can't convert macros defined by Qt into C++ code.
False
TRUE


Which of the following Core Qt classes does NOT use implicit sharing?
QObject
QString
QList
QImage


Which of the following lines of code are depicting an attached property?
("Width has changed to:", width)onWidthChanged: console.log
("Right mouse button pressed")console.log
onWidthChanged: console.log("Width has changed to:", width)
color: ListView.isCurrentItem ? "red" : "blue"


If you wanted to connect a smoke detector and sprinkler system, what would logically be the syntax for its slot?
()))SLOT(dispenseWater
SLOT(signalWater()))
(dispenseWater()))SLOT
SLOT(dispenseWater()))


When an application does not have permission to run in the background the application lifecycle includes the ____ ____.
Background State
Foreground State
Terminal State
Stopped State


Why is it important to not allow untrusted data to be appended when using the QScriptEngine class?
The new content might affect the performance of scripts
The class is not equipped to handle appended data and this could result in a fatal error
This could compromise your data model
The untrusted data could result in malicious activity


Objects within QML are specified by what?
They are specified by their type.
They are specified by their shape.
They are specified by their value.
They are specified by their order.


Of the following, which is a properly written property value?
(height: (50 + 22))
height: 50 + 22
Height: {50 + 22}
height= 50 + 22


In C++, can you use the same signal handlers for predefined signals that you use in QML?
Yes. You must first connect the signal to an existing slot of another class, then define your own slot to handle the signal.
No.
No. You must either connect the signal to an existing slot of another class, or define your own slot to handle the signal.
Yes.


When the following code is added to the .pro file, what does it do? LIBS += -lbbplatform
Adds different platform features to your app
Adds necessary all libraries
Links header files
Links classes


Where does the compiler first look for file.h in the following C++ directive: #include "file.h" ?
None of thee
The same directory that includes the file containing the directive
In the default directories where it is configured to look for the standard header files
In all directories specified by the PATH environment variable on the machine


The class QAbstractEventDispatcher is apart of the QTCore. The QAbstractEventDispatcher Interface to manage QT's ___ ___.
event queque
object events
change events
event dispatcher


The QTSql Module contains the QSqlClassRelation class. What does this class do?
It stores information about an SQL foreign key
It stores information about an SQL foreign key
It is an editable data model for a single database table
It's the base class for SQL driver factories


What is the maximum number of items that can be contained within an Application menu
10
5
There is no limit
3


Below is the default property of the Dialog control. Please select the true statement: Page { attachedObjects: [ Dialog { Container { Button {} Button {} } } ] }
A control added inside the Dialog will not automatically be assigned to the content property
This property needs to be explicitly declared in the QML
This property does NOT need to be explicitly declared in the QML
None of these


Which layouts allow objects to overlap?
Dock layout
Absolute layout
Stack layout
Dock and Absolute layout