Test 3 Flashcards
Open-source tools, like App Inventor, are free to buy and use. True / Flase
True
Web applications have access to device capabilities, like the accelerometer or location services.
True or false
True
The first device to be considered a smartphone was the Apple iPhone. True/ False
False
The app marketplace launched with the first-generation iPhone. True/ False
False
An array in Java can have array members of different data types. True/ False
False
Smartphones have always had touchscreens. True/False
False
Which of the following is NOT a consideration for choosing a platform for your apps?
a. How large is your market?
b. Do you have a device that works with this platform?
c. What are the marketing trends for your proposed platform?
d. What programming language is used for the proposed platform?
b. Do you have a device that works with this platform?
Which of the following is the platform language for Android?
a. C#
b.Java
c. Objective-C
d. PHP
b.Java
Which of the following is the platform language for iOS?
a. C#
b. Java
c. Objective-C
d. PHP
c. Objective-C
Which company developed the iOS platform?
a. Apple c. Google
b. Facebook d. Microsoft
a.apple
Which now dissolved company led the smartphone industry before the advent of the iPhone?
a. Compaq c. Palm
b. Gateway d. BellSouth
c. Palm
What is the correct order for the standard development process of an app?
a. write, debug, compile, run
c. write, compile, run, debug
b. write, compile, debug, run
d. write, debug, run, compile
c. write, compile, run, debug
Which company developed the andriod platform?
a. Apple c. Google
b. Facebook d. Microsoft
C.Google
How much RAM did the first smartphone offer?
a. 1 MB c. 256 MB
b. 128 MB d. 512 MB
b. 128 MB
In the pseudocode statement num x = 1, which part is a literal?
a. num x c. =
b. x d. num
d. num
What is the output of the following pseudocode:
if 3 < 4 then
print “Hello”
else
print “Goodbye”
endif
a. The string, “Hello” c. Nothing
b. The string, “Goodbye” d. an error
a. The string, “Hello”
What is the proper placement of parameters in a function or method definition?
a. Before the function name
b. After the function name but before the parentheses
c. Inside the parentheses
d. After the parentheses
c. Inside the parentheses
- In an array of length n, what is the index of the last element?
a. n - 1 c. n + 1
b. n d. n + 2
a. n - 1
What is the output of running the following code:
string name = “Mark”
name[3] = ‘c’
print name
a. Mark c. Nothing
b. Mack d. An error
b. Mack
- What is the result of the following code:
num x = 4
num y = 3
num i = 0
num j = 0
while i < x
j = 0
while j < y
print i, j
j = j + 1
endfor
i = i + 1
endfor
0, 0
0, 1
0, 2
1, 0
1, 1
1, 2
2, 0
2, 1
2, 2
3, 0
3, 1
3, 2
On the Android platform, the apps you write operate at a different level than core apps, like the phone, contact, or browser, for security reasons. True/False
True
Core applications on the Android platform are given preference over third-party apps. True/False
False
What is the result of the following code:
num x = 0
num y = 10
while x < y
print y * y
x = x + 1
endwhile
a. Prints ‘0’ ten times
b. Prints the square of every number 0 through 9 (i.e. 0, 1, 4, 9, 16, etc.)
c. Prints 100
d. Prints 100 ten times
d. Prints 100 ten times
What is the output of the following code:
num x = 1
while x > 0
print x
x++
endwhile
a. Prints an infinite set of numbers (1, 2, 3, 4, 5, 6, and so on).
b. None; it does not run.
c. Prints a specific set of numbers.
d. Prints a random set of numbers.
c. Prints a specific set of numbers.
- Java programs aren’t native to the OS, so the Android platform includes the Java Virtual Machine (JVM) for running Android apps written in Java on Android devices. True/ False
False
- For the most part, the OS calls the code you supply for each life cycle event automatically. True/False
True
- What is the output of running the following code:
string name = “Mark”
print name[2]
a. Mark c. r
b. a d. An error
c. r
- In an Android app, the four types of components that represent the entry point into an application are Activity, Service, Content Provider, and Broadcast Receiver. True/ False
True
- In the Android app life cycle, a main( ) method is executed each time your app is started. True / False
False
- Content providers are the only way to share data between apps. True/False
True
- The iOS life cycle is simpler than Android’s because an iOS app has a single entry point. True/False
True
- Java programs are compiled into which format to be run on the virtual machine?
a. ASCII c. Bytecode
b. Binary d. Dvorak
c. Bytecode
- Which is NOT part of the application life cycle?
a. Started c. Exited
b. Being Destroyed d. Running
c. Exited
- Which of the following is NOT a life cycle method in the Activity component?
a. onInit( ) c. onRestart( )
b. onCreate( ) d. onResume( )
a. onInit( )
- Which of the following is the last life cycle method called in the Activity component?
a. onStart( ) c. onStop( )
b. onPause( ) d. onDestroy( )
onDestroy( )
- Though you can write code for any of the life cycle event handlers, which of the following methods is the one most commonly used?
a. onCreate( ) c. onStop( )
b. onStart( ) d. onResume( )
a. onCreate( )
- When an application interacts with data, which methods should be used?
a. onStart( ) and/or onPause( )
c. onStart( ) and onDestroy( )
b. onPause( ) and/or onResume( )
d. onPause( ) and/or onDestroy( )
d. onPause( ) and/or onDestroy( )
- Which of the following is NOT a property of Content Providers?
a. Store data c. Retrieve data
b. Format output d. Have no life cycle events
b. Format output