Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Mobile Application Development questions Match the component type to the example

ID: 3911439 • Letter: M

Question

Mobile Application Development questions

Match the component type to the example of that component type.

A Tip Calculator

Where’s My App, which waits for a text message to be received and responds with the device’s location

A background music player, which runs while the user interacts with other activities

The Contacts app, which makes the user’s contact list available to other apps

Activity

Regular App

Broadcast Receiver

Broadcast Sender

Content Receiver

Content Provider

Services

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

2 points   

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

      -       A.       B.       C.       D.       E.       F.       G.   

A Tip Calculator

      -       A.       B.       C.       D.       E.       F.       G.   

Where’s My App, which waits for a text message to be received and responds with the device’s location

      -       A.       B.       C.       D.       E.       F.       G.   

A background music player, which runs while the user interacts with other activities

      -       A.       B.       C.       D.       E.       F.       G.   

The Contacts app, which makes the user’s contact list available to other apps

A.

Activity

B.

Regular App

C.

Broadcast Receiver

D.

Broadcast Sender

E.

Content Receiver

F.

Content Provider

G.

Services

Explanation / Answer

Please Note: You have posted more than one Question. I have answered the four questions. Please Post Separate for other Questions.

QUESTION 22

The Timer class method schedule uses which of the following units for its delay value?

Hours

Minutes

Seconds

Milliseconds

Answer)

In the Time class method the schedule uses

-Milliseconds-

for its delay value.

delay value is always calculated in 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

Answer)

OnTouchListener is the interface which is included in the following code.

implements OnTouchListener is the statement where it implements the interface OnTouchListener.

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

Answer)

Tag objects for garbage collection by;

Set the object references to null.

We nullify the object reference to make it eligible for garbage collection.

QUESTION 25

Class instance variables must be declared at the beginning of the class definition.

True

False

Answer)

False

Instance variables can be declared anywhere at class level in the class definition of the object.