MAD Mobile Application development chapter 5 part 2
What is the output of running the following code?
string name = "Mark"
print name[2]
r
Which of the following is not an Android Layout?
GameLayout
All three major platforms dicussed in the book have a marketplace for developers to sell their apps.
True or False?
True
In the pseudocode statement num x = 1, which part is a variable?
x
Which of the following is the platform language for Android?
Java
The easiest way to deal with temporary text in a text box that needs to be removed when a user enters certain information is to build a JavaScript solution.
True or False?
False
What is the correct order to start the emulator in the Blocks Editor window?
Click 'New emulator', slide the green lock icon right to unlock, click 'Connect to Device', and select the emulator to start your app.
Testing the graphical user interface (GUI) during the early stages of development is best done using which of the following methods?
Using the emulator
What is the output of the following pseudocode?
if 3 < 4 then
print "Hello"
else
print "Goodbye"
endif
Hello
Which of the following is NOT an example of a best practice?
Using inheritance
On the iOS platform, where do life cycle events occur?
Application delegate
C#, Java, and Objective-C have automatic garbage collection enabled by default.
True or False?
False
What data type should be used when keeping track of a name?
string
The Blocks Editor is what type of application?
Java Web Start
Windows Phone is Microsoft's first entry into the smartphone operating system market.
True or False?
False
In the following onOptionsItemSelected() method, which id is most likely associated with accessing the application's help page?
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.item1:
new();
return true;
case R.id.item2:
open();
return true;
case R.id.item3:
close();
return true;
case R.id.item4:
info();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
item4
Based on the associated figure, what might the code blocks shown imply about the intent of the application?
Calculate the number of gallons from the number of ounces
Smartphones have always had touchscreens.
True or False?
False
What property is used to set the text that will display in an app's top information bar?
Title
In C#, Java, and Objective-C, String objects are immutable, meaning that after strings are created, they can't be changed. Therefore, the following code is illegal:
String str1 = "abc";
str1 = str1 + "123";
True or False?
False
Which is the correct definition of the term refactoring?
Rewriting code to make it better without changing its behavior
Which of the following is NOT a life cycle method in the Activity component?
onInit()
Which section of the App Inventor workspace allows the developer to modify certain aspects of components?
Properties
Given the inheritance tree in the accompanying figure, which is a list of all superclasses?
Vehicle, UnpoweredVehicle, PoweredVehicle
What does JNLP (the type of file a Java Web Start application is stored in) stand for?
Java Native Launch Protocol
Which of the following is NOT represented as a block?
Errors
What are the more commonly used names for accessor methods?
Getters and setters
Like object-oriented programs, procedural programs are data centered.
True or False?
False
When using the Texting component, where do you find the block to include the automatically included messageText argument?
Social
Which is the most efficient way to concatenate the two strings, "quick brown fox" and "jumped over the lazy dog" in Java?
StringBuffer buffer = new StringBuffer("quick brown fox");
buffer.append(" jumped over the lazy dog");
String string1 = buffer.toString();
Tapping the screen registers what event in the Android SDK and App Inventor?
Click
In Android Studio, the palette contains?
GUI widgets
In Java, Class instance variables must be declared at the beginning of the class definition.
True or False?
False
Which of the following is the correct final line of code in the definition of the quit() method?
finish();
How much RAM did the first smartphone offer?
1 MB
Android Studio: What is inherited in the following code?
public class DotSmasherCanvas extends View implements OnTouchListener {
int dotX, dotY, score;
//Other code here
}
class View
Which of the following is a preferred tool for iOS development?
Interface Builder