Ch4
In what graphics format should launcher icons be saved?
.png
The condition necessary to test if a variable stockPrice is below 0.30 is ____________________.
0.30 < stockPrice
When you publish an app in the Android Market, you must provide an icon of size ____________________ (state as number x number) as the display icon in the Market.
512 X 512
For a extra high-density screen, the pixel size of an icon should be ____________________ (state as number x number).
96 X 96
Which symbol is the operator for "equal to?"
==
Which of the following types of controls always operates independently, therefore selecting it will never deselect any other controls?
CheckBox control
Never offer a default selection, as it complicates user input. T/F
False
The following condition is valid: (6 || ticketPrice) > (450.45 == "vacation"). T/F
False
When you are comparing one string to another string, use the == operator. T/F
False
Whenever possible, you should use the default launcher icon so your app looks as uniform as possible with other apps. T/F
False
When you have one set of instructions to execute when a condition is true and another set of instructions if the same condition is false, which statement would you use?
If Else statement
When does a toast notification disappear from the screen?
It automatically fades after a set amount of time
To create a toast message of long duration, you use the _____________________ keyword in the makeText method.
LENGTH_LONG
____________________ controls are used to select and deselect an option.
RadioButton
In what are RadioButton controls usually used together, which causes only one RadioButton to be selected at a time?
RadioGroup
What method call is used to display a toast notification?
Toast.makeText
Which of the following is the correct syntax for displaying a toast message for a long length of time?
Toast.makeText(MainActivity.this, "A toast message", Toast.LENGTH_LONG).show( );
The code to display the short toast message "Hi mom" is _________________________________________________________________.@@@
Toast.makeText(MainActivity.this, "Hi mom", Toast.LENGTH_SHORT).show();
A toast notification communicates messages to the user. T/F
True
A toast notification is an easy way to inform the user of a failed data validation. T/F
True
Java automatically indents statements within an If Else statement to indicate that the statements are within the If Else structure. T/F
True
Launcher icons form the first impression of your app on prospective users in Google Play. T/F
True
RadioButton controls are circular in shape, while CheckBox controls are square. T/F
True
The statement 6<=6 is true. T/F
True
Which of the following types of graphics are best to use for icon design because the images can be scaled without loss of detail?
Vector-based graphics
When two Strings are compared, they are ordered ____________________.
alphabetically
The isChecked method makes use of the ____________________ property of the RadioButton or CheckBox control.
checked
To compare the alphabetical order of two strings, what should be used?
compareTo method
When more than one condition is included in an If statement, what is the condition called?
compound condition
You can test for a(n) ____________________ being true or false and change the flow of what happens in a program based on the user's input.
condition
Decision-making statements in Java allow you to test which of the following?
conditions
Which term defines a fundamental control structure used in computer programming?
decision structure
What is used to compare Strings in Java for equality?
equals method
Which property can center a control horizontally as well as position it at other places on the screen?
gravity property
What is the resulting value of the expression "sears".compareTo("chicago")?
greater than 0
Which of the following terms best describes a triplet of three colors which encodes different colors?
hexadecimal color code
A custom launcher icon image can be placed in the res/mipmap folder by adding a(n) _______________________ using a built-in wizard in Android Studio.
image asset
What is the method used to test a checked property on a radio button?
isChecked() method
The icon on the home screen that represents your application is referred to as which of the following?
launcher icon
What is the icon used to start your app called?
launcher icon
Instead of eyeballing the controls on the user interface for alignment, you can use the ____________________ property to create the desired spacing around controls.
layout:margin
Which term can be used to change the spacing around each object in your layout?
margins
When an If statement is placed inside another If statement, what is the inner If statement considered to be?
nested
What does a toast notification use to display a message?
only the amount of space needed
What tool does Java provide to compare the relationship between the variables being tested in conditional statements?
relational operators
Let the String variable city be set to the value "Boston". The truth value of the expression (city.compareTo("Anaheim") > 0) is ____________________.
true
The truth value of the expression !(false && (true || !false) && (!false || !true)) is ____________________.
true
What is a common mistake made when forming a conditional statement?
using the assignment operator instead of the comparison operator
The process of verifying that a value entered by a user is acceptable for what the program is expecting is called ________________.
validation
The hexadecimal color code for red is ____________________.
#FF0000