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

Chapter 5 Android Bootcamp 3rd edition Developer FAQs 1. Typically in a MainActi

ID: 3876091 • Letter: C

Question

Chapter 5 Android Bootcamp 3rd edition Developer FAQs 1. Typically in a MainActivity.java file, the class extends ActionBarActivity. When the primary purpose of the class is to display a list, what is the opening MainActivity class statement? 2. Which Android control displays a vertical listing of items? 3. When does a scroll bar appear in a list? 4. Initialize an array named temps with the integers 22, 56, 38, 30, and 57. 5. Answer the following questions about the following initialized array: String[]pizzaToppings = new String[10]; a. What is the statement to assign mushrooms to the first array location? b. What is the statement to assign green peppers to the fourth location in the array? c. How many toppings can this array hold? d. Rewrite this statement to initially be assigned the following four toppings only: extra cheese, black olives, mushrooms, and bacon. 6. Write a line of code that assigns the values Samsung, HTC, Sony, Motorola, and Asus to the elements in the array phoneBrands. 7. Fix this array statement: doubles { } driveSize = ["32.0", "64.0", "128.0"] 8. Write two lines of code that assign an array named coding with the items Java, C#, Python, Visual Basic, and Ruby and display this array as a generic list. 9. Which type of pictures can be used for free fair use without copyright? 10. What does URI stand for?

Explanation / Answer

Hi,

Please find the Answers for your questions.

1) Ans :

class MainActivity extends ActionBarActivity{

List list=new ArrayList();

list.add(10);
list.add(30);
list.add(40);
list.add(20);
list.add(60);

System.out.println(list);
}

2)Ans :

With the help of these controllers

android.widget.ListView
android.app.Activity
android.widget.ArrayAdapter

3)Ans :

code : android:fadeScrollbars="true" in xml

With either Android 2.1 or 2.2 scrollbars will be

displayed only if the user scroll the list down.

4)Ans :

Int[] temps={22, 56, 38, 30,57};

5)Ans :

String[] pizzaToppings = new String[10];

(a)Ans :

pizzaToppings[0]="mushrooms";

(b)Ans :

  pizzaToppings[3]="green peppers";

(c)Ans :

   8 remaining because total array size is 10

(d)Ans:

pizzaToppings[1]="extra cheese";
pizzaToppings[2]="black olives";
pizzaToppings[4]="mushrooms";
pizzaToppings[5]="bacon";

6)Ans:

String[] phoneBrands={"Samsung", "HTC", "Sony", "Motorola","Asus"};

7)Ans :

String[] doubles={"32.0", "64.0", "128.0"};

Because the double values are in String with in doublequotes so we taken String array
to Fix the Statement.

8)Ans:


String[] coding={"Java", "C#", "Python", "Visual Basic","Ruby"};

for(int i=0;i<coding.length;i++){
System.out.println(coding[i]);
}

9)Ans:

you take photo with your own camera phone or camera and the theme of the picture is yours then
that kind of pictures can use with out any copy right,Because the picture has taken with your own idea.

10)Ans:

Uniform Resource Idenentifier , means its a string of characters which indicates your location or place.

like www.google.com,www.yahoo.com ,www.amazon.com

Thank You.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote