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

1(2 points). The Model is the middleman between the __________________ and the C

ID: 3736780 • Letter: 1

Question

1(2 points). The Model is the middleman between the __________________ and the Controller.

Answer:

2(3 points).By default an ArrayAdapter creates a view for each item in the array by calling ________ on each item and placing the result in a TextView.

Answer:

3 (3 points). In order to register a TextWatcher on a GUI component, we call the ____________ method.

Answer:

4 (3 points). You have created the private class BH. Inside the onCreate method of the current activity, a Button b has been created. What is the function of the next two lines?

BH bh = new BH( );

b.setOnClickListener( bh );

Answer:

5 (3 points). If button b is clicked, what is the output of the program?

private class ButtonHandler implements View.OnClickListener

{

   public void onClick( View v )

{

if( b == v )

Log.w( "MA", "YES" );

else

          Log.w( "MA", "NO" ):

}

}

Answer:

Explanation / Answer

1) View

2) toString()

3) onTextChanged()

4) A new object of class BH named bh is created.

And th object is passed to button as a listener through setOnClickListener() method.

5) A warn log is sent with tag, MA and message, YES.