Question: I need help with these questions, The course is Mobile Application Development Which of the following is NOT included in the class definition? The class
I need help with these questions, The course is Mobile Application Development
Which of the following is NOT included in the class definition?
| The class name | ||
| Accessor methods | ||
| Instance variable declaration | ||
| Instance method definition |
QUESTION 2
Which of the following components does the Wheres My Phone? app use while waiting for a text message in the background?
| Activities | ||
| Services | ||
| Broadcast Receivers | ||
| Content Providers |
QUESTION 3
Which is the correct argument sent to the onOptionsItemSelected method to make menu items useful?
| Activity act | ||
| Class clss | ||
| Menu menu | ||
| MenuItem item |
QUESTION 4
Which of the following is NOT part of the Java class declaration?
| Name the class. | ||
| Import external resources. | ||
| Declare any inherited classes. | ||
| Declare any implemented interfaces. |
QUESTION 5
What is the text displayed on the canvas after the execution of the following code? 0 super.onDraw(canvas); 1 Paint dotPaint = new Paint(); 2 dotPaint.setColor(Color.RED); 3 canvas.drawRect(dotX, dotY, dotX + 20, dotY + 20, dotPaint); 4 a = 1; 5 b = 2; 6 a = b; 7 b = a; 8 canvas.drawText(a: +a+| b: +b, 20, 20, dotPaint);
| a: 1|b: 1 | ||
| a: 2|b: 1 | ||
| a: 1|b: 2 | ||
| a: 2|b: 2 |
QUESTION 6
Which interface should be used to handle the button press event?
| OnPressListener | ||
| OnClickListener | ||
| pressListener | ||
| clickListener |
QUESTION 7
Provided you know the namespace and attribute information, it is easier to manually code the menus XML code than it is to use the IDE to generate the menus XML code.
True
False
QUESTION 8
Which of the following is NOT true when overriding a method?
| The subclass is given a method of the same signature as a superclass method. | ||
| The superclass method is hidden when called from the subclass. | ||
| The superclass method can no longer be used. | ||
| You can override any method of the superclass. |
QUESTION 9
In the following onOptionsItemSelected() method, which id is most likely associated with accessing the applications 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); } }
| item1 | ||
| item2 | ||
| item4 | ||
| none, it will be handled by the default case |
QUESTION 10
Which line in the following code does NOT include an error? 0 public int foo() { 1 super.onDraw(canvas); 2 Paint dotPaint = new Paint(); 3 dotPaint.setColor(Color.RED); 4 doble i = 1; 5 j = 2; 6 i = j * i; 7 j = Math.pow(i, j); 8 canvas.drawText(i: + i + |j: + j); 9 }
| Line 4 | ||
| Line 5 | ||
| Line 7 | ||
| Line 8 |
QUESTION 11
Match the terms to the corresponding definition below.
|
|
QUESTION 12
Which is the correct argument sent to the onCreateOptionsMenu method to provide your own menu behavior?
| Activity act | ||
| Class clss | ||
| Menu menu | ||
| MenuItem item |
QUESTION 13
Broadcast Receivers are terminated when the event they are waiting for occurs.
True
False
QUESTION 14
Which of the following is an advantage of Motorolas MOTODEV Studio over App Inventor?
| MOTODEV allows you to develop more sophisticated Android Apps. | ||
| MOTODEV can be used by nonprogrammers. | ||
| MOTODEV allows you to develop for iOS in addition to Android. | ||
| MOTODEV is more intuitive to use. |
QUESTION 15
Using the asterisk wildcard (e.g. import com.packageName.*) will include all of the classes within packageName, even if they arent used.
True
False
QUESTION 16
Which of following is the correct term for a piece of information used to activate an Activity, Service, or Broadcast Receiver?
| Intent | ||
| IntentFilter | ||
| Content Provider | ||
| Bundle |
QUESTION 17
Which of the following is most likely to be seen in the default case of the onOptionsItemSelected method?
| return super.onCreateOptionsMenu(item) | ||
| return super.onOptionsItemSelected(item) | ||
| return super.onCreateOptionsMenu(MenuItem item) | ||
| return super.onOptionsItemSelected(MenuItem item) |
QUESTION 18
Java classes can extend only one superclass.
True
False
QUESTION 19
The Random class gives access to a floating-point number between 1 and 100.
True
False
QUESTION 20
Which of the following could never be found in the file NewClass.java?
| public NewClass() { message = Hello World!; } | ||
| public String title = New Class; | ||
| public void doSomething() { doSomethingElse(); } | ||
| public OtherClass() { message = Hello, World! Good to see you again!; } |
QUESTION 21
Match the component type to the example of that component type.
|
|
QUESTION 22
The Timer class method schedule uses which of the following units for its delay value?
| Hours | ||
| Minutes | ||
| Seconds | ||
| Milliseconds |
QUESTION 23
What interface is included in the following code? public class DotSmasherCanvas extends View implements OnTouchListener { int dotX, dotY, score; //Other code here }
| class DotSmasherCanvas | ||
| class View | ||
| class OnTouchListener | ||
| class int |
QUESTION 24
How do you tag objects for garbage collection?
| Pass the object reference to a built-in garbage collection method. | ||
| Set the object references to null. | ||
| Both A and B | ||
| Neither A nor B |
QUESTION 25
Class instance variables must be declared at the beginning of the class definition.
True
False
QUESTION 26
One feature of the Eclipse editor is showing or hiding blocks of code, which makes it easier to scroll through source code. Which of the following is the correct name for this in Eclipse?
| Code folding | ||
| Section hiding | ||
| Expand/Collapse | ||
| Open/close |
QUESTION 27
In the following onOptionsItemSelected() method, which id is most likely associated with starting a new session? 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); } }
| item1 | ||
| item2 | ||
| item4 | ||
| none, it will be handled by the default case |
QUESTION 28
A constructor is the same as any other method definition EXCEPT for what?
| A constructor includes an optional argument list. | ||
| A constructor includes an optional access modifier, usually public. | ||
| A constructor includes a return type. | ||
| A constructor places arguments within parentheses (). |
QUESTION 29
How much does it cost to deploy an Android application to the Android Market?
| $0 | ||
| $25 | ||
| $50 | ||
| $100 |
QUESTION 30
What is inherited in the following code? public class DotSmasherCanvas extends View implements OnTouchListener { int dotX, dotY, score; //Other code here }
| class DotSmasherCanvas | ||
| class View | ||
| class OnTouchListener | ||
| class int |
QUESTION 31
Match the terms to the corresponding definition below.
|
|
QUESTION 32
All class information must be stored in a file with the same name as the class and with a .java extension.
True
False
QUESTION 33
The schedule method of the Timer class can take any function as its first parameter.
True
False
QUESTION 34
What does XML stand for?
| Extendable Markup Language | ||
| Extensible Markup Language | ||
| Extended Markup Language | ||
| Extra Markup Language |
QUESTION 35
What does JDE stand for?
| Java Development in Eclipse | ||
| Java Designer for Eclipse | ||
| Java Development Environment | ||
| Java Designer Environment |
QUESTION 36
Which of the following is the correct final line of code in the definition of the quit() method?
| finish(); | ||
| finish(this); | ||
| return finish(); | ||
| return 0; //meaning finished without error. |
QUESTION 37
Which is the escape character used in Javas String object?
| Percentage sign (%) | ||
| Tilde (~) | ||
| Backslash (\) | ||
| Forward slash (/) |
QUESTION 38
Which is the correct definition of the term refactoring?
| Reducing a trinomial to a set of binomials | ||
| Rewriting code to make it better without changing its behavior | ||
| Rewriting code to add forgotten functionality or to remove unnecessary functionality | ||
| Rewriting code to fix broken functionality |
QUESTION 39
Which of the following is the LEAST common in game programming?
| Gathering input from the user | ||
| Rendering objects on screen | ||
| Retrieving data from a database | ||
| Managing data processing and rendering the display with a loop |
QUESTION 40
SMS messages come in as byte arrays of protocol description units (PDUs).
True
False
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
