Check Out Our Work & Get Yours Done

Submit Work

or

Download Sample
Get Your First Solution Free
Order Now

Mobile Applications Quiz

CallTutors Guarantees

  • Work Within Deadline
  • Lowest Price Guaranteed
  • Plagiarism Free Guaranteed
  • 24 * 7 Availability
  • Native Experienced Experts
  • Free Revisions



Get
Flat 30% Off
on your Assignment Now!

Price Includes

Turnitin Report

$20.99
free

Limitless Amendments

$31.49
free

Bibliography

$17.05
free

Outline

$6.55
free

Title Page

$6.55
free

Formatting

$10.49
free

Get all these features

$93.12
free

CS 4405: MOBILE APPLICATIONS
In the code from
Question 9, which method is invoked when the activity is started?
Select one:
a. super.onCreate(icicle);
b. btn.setOnClickListener(this);
c. public void onCreate(Bundle icicle)
d. public class Now extends Activity implements View.OnClickListener

The correct answer is: super.onCreate(icicle);

Question 2


What is Mapping?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. What the user expects to happen when they interact with the interface is exactly what should happen

The correct answer is: What the user expects to happen when they interact with the interface is exactly what should happen

Question 3


How many equal signs “=” are needed to compare values ?
Select one:
a. -1
b. 0
c. 1
d. 2

The correct answer is: 2

Question 4


When using the keyword private before a variable or a method, it means only the class itself can access the variable or method. What designation would allow access to the variable or the method from any part of the Java program?
Select one:
a. void
b. Integer
c. everyone
d. public

The correct answer is: public

Question 5


Note, that you can declare a variable and initialize it in one statement:
int SecretNum = 0;

What will display if you execute immediately after this line?
System.out.print(SecretNum);
Select one:
a. 3
b. 2
c. 1
d. 0

The correct answer is: 0

Question 6


What provides Internet access at any level you wish, from raw Java sockets all the way up to a built-in WebKit-based Web browser widget?
Select one:
a. Storage
b. Network
c. Multimedia
d. GPS

The correct answer is: Network

Question 7


Which element should you use in addition to TabHost and TabWidget in order to create a tabbed portion of a view?
Select one:
a. FrameLayout
b. android:id
c. ViewBounds
d. drawable/molecule

The correct answer is: FrameLayout

Question 8


Which mobile application element is not found on desktop computers?
Select one:
a. Textboxes
b. Locality
c. Volume adjustment
d. Buttons

The correct answer is: Locality

Question 9


What is Simplicity?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Usual tasks should be easy and less common tasks should be possible
d. User should never be allowed to make a mistake

The correct answer is: Usual tasks should be easy and less common tasks should be possible

Question 10


What is the Widget created by this code in the layout file?
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id="@+id/icon"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:adjustViewBounds="true"
android:src="@drawable/molecule"
/>
Select one:
a. image
b. android:id
c. ViewBounds
d. drawable/molecule

The correct answer is: image

Question 11


What is the property sent from the device browser to the server, along with the web page request, which tells us what type of device is used?
Select one:
a. http header
b. http-version
c. device-type
d. user-agent

The correct answer is: user-agent

Question 12


What Android features allows your application to initiate calls, send and receive SMS messages?
Select one:
a. Storage
b. Network
c. Multimedia
d. Phone services

The correct answer is: Phone services

Question 13


Which Widget can be used to create a time clock showing hours and minutes?
Select one:
a. clock_do
b. android:clock
c. getTime
d. AnalogClock

The correct answer is: AnalogClock

Question 14


What is a basic unit of a Java program or an object?
Select one:
a. method
b. class
c. property
d. public

The correct answer is: class

Question 15


What is Mapping?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. What the user expects to happen when they interact with the interface is exactly what should happen

The correct answer is: What the user expects to happen when they interact with the interface is exactly what should happen

Question 16


If a method does not return any value, what type would it take?
Select one:
a. Integer
b. String
c. void
d. Intents

The correct answer is: void

Question 17


What Widgets are being created in this app:

Layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android
="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
> <TextView
android:id="@+id/selection"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Spinner android:id="@+id/spinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"
/>
</LinearLayout>
Java code:
public class SpinnerDemo extends Activity
implements AdapterView.OnItemSelectedListener {
TextView selection;
String[] items={"lorem", "ipsum", "dolor", "sit", "amet",
"consectetuer", "adipiscing", "elit", "morbi", "vel",
"ligula", "vitae", "arcu", "aliquet", "mollis",
"etiam", "vel", "erat", "placerat", "ante",
"porttitor", "sodales", "pellentesque", "augue", "purus"};
@Override public void onCreate(Bundle icicle) {
super.onCreate(icicle); setContentView(R.layout.main); selection=(TextView)findViewById(R.id.selection);
Which line is the activity?
Select one:
a. TextLabel, icicle
b. Label, List
c. List, Entry field
d. Spinner, Label

The correct answer is: Spinner, Label

Question 18


Which XML element of the Android manifest indicates security access your application will need to be allowed to function properly?
Select one:
a. uses-permission
b. instrumentation
c. uses-sdk
d. application

The correct answer is: uses-permission

Question 19


Given the Learning Activity 3.5 code, which line prompts the user to enter a numerical value?
Select one:
a. YourNumber = input.nextInt();
b. import java.util.Scanner;
c. Scanner input = new Scanner(System.in);
d. SecretNum = (int) (Math.random()*1000);

The correct answer is: YourNumber = input.nextInt();

Question 20


What is a significant performance consideration when downloading images on a mobile device?
Select one:
a. Activities
b. image ratio
c. copyright
d. low or expensive bandwidth

The correct answer is: low or expensive bandwidth

Question 21


What Android feature allows the user to play back music, take pictures with the camera, or use the microphone for audio note-taking?
Select one:
a. Storage
b. Network
c. Multimedia
d. GPS

The correct answer is: Multimedia

Question 22


The primitive types in Java are byte, short, int, long, float, double, char, boolean. Which one can be used to represent a word like “Hello”?
Select one:
a. char
b. none, the String object should be used
c. double
d. long

The correct answer is: none, the String object should be used

Question 23


If you need a user to type in a date, what Widget should you use? It will allow the user to select a date, which means you don't have to validate or explain the format like day/month/year or month/day/year, or four digit year 2013 or two digit year 13.
Select one:
a. TimePickerDialog
b. DatePicker
c. DatePicketDialog
d. Chrono

The correct answer is: DatePicker

Question 24


The SlidingDrawer should contain two things:
1. A handle, frequently an ImageView
and the second:
Select one:
a. large label
b. a drop down list
c. The contents of the drawer itself, usually some sort of container
d. checkbox

The correct answer is: The contents of the drawer itself, usually some sort of container

Question 25


How many lines will this code display?

System.print(“Hello “);
System.print(“World”);
Select one:
a. 4
b. 3
c. 2
d. 1

The correct answer is: 1

Question 26


Which file contains GUI layout information like a list of buttons, text boxes?
Select one:
a. AndroidManifest.xml
b. build.xml
c. res/layout/main.xml
d. assets/

The correct answer is: res/layout/main.xml

Question 27


What is Learnability?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: An interface should be easy to use from the first time the user interacts with it

Question 28


What is Memorability?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: Interface should be easier to use each time the user interacts with it

Question 29


What type of programming does Java implement?
Select one:
a. object oriented
b. procedural
c. no-SQL
d. relational

The correct answer is: object oriented

Question 30


What is Efficiency?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: Number of steps it takes for a user to complete a task

Question 31


What is a valid property of a label widget?
Select one:
a. TextView
b. android:typeface
c. layout/main.xml
d. LabelView

The correct answer is: android:typeface

Question 32


What API (application programming interface) is available on most mobile devices?
Select one:
a. development and connection
b. orientation and geolocation
c. device restart
d. linear-gradient

The correct answer is: orientation and geolocation

Question 33


A level of abstraction for any data stored on the device that is accessible by multiple applications:
Select one:
a. Activities
b. Content Providers
c. Services
d. Intents

The correct answer is: Content Providers

Question 34


Given the Learning Activity 3.5 code, which line makes external code available to our program?
Select one:
a. getCode();
b. import java.util.Scanner;
c. if
d. input.nextInt();

The correct answer is: import java.util.Scanner;

Question 35


True or False: Intents are ways of specifying something you want accomplished, then telling Android to go find something to accomplish it. Frequently, these are used to cause activities to spawn. For example, whenever you launch an application from the main Android application launcher, the launcher creates an Intent and has Android open up the activity associated with that Intent.
Select one:
True
False

The correct answer is 'True'.

Question 36


System messages, running around the inside of the device, notifying applications of various events:
Select one:
a. Activities
b. Content Providers
c. Services
d. Intents

The correct answer is: Intents

Question 37


What is a basic unit of a Java program or an object?
Select one:
a. method
b. class
c. property
d. public

The correct answer is: class

Question 38


True or False: In Android, the Spinner is the equivalent of the drop-down selector.
Select one:
True
False

The correct answer is 'True'.

Question 39


Java expects the start of the program to be in which method?
Select one:
a. private Main {}
b. private my Start(String[] args)
c. public void start()
d. public static void main(String[] args)

The correct answer is: public static void main(String[] args)

Question 40


The simplest Android Widget is a label. What is its name in the layout file?
Select one:
a. TextView
b. android-label
c. label.xml
d. LabelView

The correct answer is: TextView
What mobile platform applies to iPad and iPhone devices?
Select one:
a. iOS
b. SQL Server
c. MySQL
d. Android

The correct answer is: iOS

Question 2


The building blocks of the Android user interface are:
Select one:
a. Activities
b. Content Providers
c. Services
d. Intents

The correct answer is: Activities

Question 3


To create an integer variable and assign a value, you would use:
Select one:
a. Int myNumber = 5;
b. myNumber = 5;
c. int myNumber; myNumber = 5;
d. 5 = myNumber;

The correct answer is: int myNumber; myNumber = 5;

Question 4


This layout code will change the font of the entry field:
<TextView
android:text="monospace:"
android:layout_marginRight="4px"
android:textSize="20sp"
/>
Select one:
True
False

The correct answer is 'False'.

Question 5


Consider the following Java code, then answer: What do we call printFullName() ?

class Student {
private String firstName;
private String lastName;
public Student(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
// Your code goes here
}

public class Main {
public static void main(String[] args) {
Student[] students = new Student[] {
new Student("Morgan", "Freeman"),
new Student("Brad", "Pitt"),
new Student("Kevin", "Spacey"),
};
for (Student s : students) {
s.printFullName();
}
}
}
Select one:
a. function
b. static
c. display feature
d. method

The correct answer is: method

Question 6


What programming development language and environment is used to develop Android apps?
Select one:
a. C++ with Visual Studio
b. Objective-C with XCode
c. Cobol with Borland IDE
d. Java with Eclipse

The correct answer is: Java with Eclipse

Question 7


What is Error Recovery?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: User should never be allowed to make a mistake

Question 8


What languages are used to develop web based mobile apps?
Select one or more:
a. C++
b. HTML
c. JavaScript
d. Objective-C

The correct answers are: HTML, JavaScript

Question 9


What type of programming does Java implement?
Select one:
a. object oriented
b. procedural
c. no-SQL
d. relational

The correct answer is: object oriented

Question 10


Given the following code in the layout file, where will the text be displayed in the Android app?
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="You were expecting something profound?"
/>
Select one:
a. bottom left
b. bottom right
c. top left
d. top right

The correct answer is: top left

Question 11


What Java code can be used on the checkbox Widget?

<?xml version="1.0" encoding="utf-8"?>
<CheckBox xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id="@+id/check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This checkbox is: unchecked" />
Select one:
a. getCheckMark()
b. isChecked()
c. setCheckMark()
d. getMark()

The correct answer is: isChecked()

Question 12


Given the Learning Activity 3.5 code, which line defines the SecretNum variable as an integer number?
Select one:
a. int SecretNum;
b. integer SecretNum;
c. SecretNum = 0;
d. SecretNum == YourNumber

The correct answer is: int SecretNum;

Question 13


Will this if statement work?
if (SecretNum = YourNumber )
Select one:
a. Yes
b. No

The correct answer is: No

Question 14


Given the code in the Java file and later in the layout file, what is the Widget being programmed and what is the event?
public void someMethod(View theButton) {
// do something useful here
}
<Button
android:onClick="someMethod"
...
/>
Select one:
a. Button, someMethod
b. theButton, click
c. someMethod, onClick
d. Button, onClick

The correct answer is: Button, onClick

Question 15


Given the following code of the app, what is the app doing?

Layout file:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
> <TextView
android:id="@+id/selection"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<AutoCompleteTextView android:id="@+id/edit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:completionThreshold="3"/>
</LinearLayout>
The corresponding Java code is:

public class AutoCompleteDemo extends Activity
implements TextWatcher {
TextView selection;
AutoCompleteTextView edit;
String[] items={"lorem", "ipsum", "dolor", "sit", "amet",
"consectetuer", "adipiscing", "elit", "morbi", "vel",
"ligula", "vitae", "arcu", "aliquet", "mollis",
"etiam", "vel", "erat", "placerat", "ante",
"porttitor", "sodales", "pellentesque", "augue", "purus"};
@Override public void onCreate(Bundle icicle) {
super.onCreate(icicle); setContentView(R.layout.main); selection=(TextView)findViewById(R.id.selection); edit=(AutoCompleteTextView)findViewById(R.id.edit); edit.addTextChangedListener(this);

edit.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line,
items));
}
public void onTextChanged(CharSequence s, int start, int before, int count) {
selection.setText(edit.getText()); }
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
// needed for interface, but not used
}
public void afterTextChanged(Editable s) { // needed for interface, but not used
} }
Select one:
a. This application has an error and it will not run.
b. As the user types, matches are shown in a selection list that, like with Spinner, folds down from the field. The user can type in the suggested word.
c. As the user types, the text is comparing the entered text as a prefix against a list of previous entries. This is a spelling wizard.
d. As the user types, the text is treated as a prefix filter, comparing the entered text as a prefix against a list of candidates. Matches are shown in a selection list that, like with Spinner, folds down from the field. The user can either type out an entry (e.g., something not in the list) or choose an entry from the list to be the value of the field.

The correct answer is: As the user types, the text is treated as a prefix filter, comparing the entered text as a prefix against a list of candidates. Matches are shown in a selection list that, like with Spinner, folds down from the field. The user can either type out an entry (e.g., something not in the list) or choose an entry from the list to be the value of the field.

Question 16


Consider the following Java code:

class Student {
private String firstName;
private String lastName;
public Student(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
// Your code goes here
}

public class Main {
public static void main(String[] args) {
Student[] students = new Student[] {
new Student("Morgan", "Freeman"),
new Student("Brad", "Pitt"),
new Student("Kevin", "Spacey"),
};
for (Student s : students) {
s.printFullName();
}
}
}

What do we call printFullName() ?
Select one:
a. function
b. static
c. display feature
d. method

The correct answer is: method

Question 17


Given the Learning Activity 3.5 code, which line generates a number between 1 - 1000?
Select one:
a. import java.util.Scanner;
b. SecretNum = (int) (Math.random()*1000);
c. Scanner input = new Scanner(System.in);
d. YourNumber = input.nextInt();

The correct answer is: SecretNum = (int) (Math.random()*1000);

Question 18


Which method shows words on a screen?
Select one:
a. System.out.println();
b. printnow();
c. screen();
d. GPS();

The correct answer is: System.out.println();

Question 19


Which method shows words on a screen?
Select one:
a. System.out.println();
b. printnow();
c. screen();
d. GPS();

The correct answer is: System.out.println();

Question 20


Which XML element of the Android manifest indicates the version required for your application?
Select one:
a. uses-permission
b. instrumentation
c. uses-sdk
d. application

The correct answer is: uses-sdk

Question 21


When using the keyword private before a variable or a method, it means only the class itself can access the variable or method. What designation would allow access to the variable or the method from any part of the Java program?
Select one:
a. void
b. Integer
c. everyone
d. public

The correct answer is: public

Question 22


What mobile platforms are most common today?
Select one or more:
a. iOS
b. SQL Server
c. MySQL
d. Android

The correct answers are: iOS, Android

Question 23


What is the web browser used on iOS mobile devices?
Select one:
a. Web Toolkit
b. Chrome
c. Internet Explorer
d. Safari

The correct answer is: Safari

Question 24


Given the Learning Activity 3.5 code, which line assigns a value to a variable?
Select one:
a. Int myNumber = 5;
b. myNumber = 5;
c. SecretNum = 0;
d. 5 = myNumber;

The correct answer is: SecretNum = 0;

Question 25


The following code creates the EditText Widget. What does this Widget look like in comparison to labels, images, or buttons?

<?xml version="1.0" encoding="utf-8"?>
<EditText xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id="@+id/field"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:singleLine="false"
/>
Select one:
a. large label
b. a drop down list
c. field to type something in
d. checkbox

The correct answer is: field to type something in

Question 26


If the name of the Java class is: class MyProgram

What should be the name of the Java file?
Select one:
a. MyProgram
b. myProgram.java
c. MyProgram.java
d. program

The correct answer is: MyProgram.java

Question 27


The following code creates an app which does what?

Layout file:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView android:id="@+id/dateAndTime"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Button android:id="@+id/dateBtn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Set the Date"
/>
<Button android:id="@+id/timeBtn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Set the Time"
/>
</LinearLayout>
Java code:
public class ChronoDemo extends Activity { DateFormat fmtDateAndTime=DateFormat.getDateTimeInstance(); TextView dateAndTimeLabel; Calendar dateAndTime=Calendar.getInstance(); DatePickerDialog.OnDateSetListener d=new DatePickerDialog.OnDateSetListener()
{
} };
TimePickerDialog.OnTimeSetListener t=new TimePickerDialog.OnTimeSetListener()
{
} };
@Override public void onCreate(Bundle icicle) {
super.onCreate(icicle); setContentView(R.layout.main);
Button btn=(Button)findViewById(R.id.dateBtn);
btn.setOnClickListener(new View.OnClickListener() { public void onClick(View v) {
new DatePickerDialog(ChronoDemo.this, d,
public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
dateAndTime.set(Calendar.YEAR, year); dateAndTime.set(Calendar.MONTH, monthOfYear); dateAndTime.set(Calendar.DAY_OF_MONTH, dayOfMonth); updateLabel();
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
dateAndTime.set(Calendar.HOUR_OF_DAY, hourOfDay); dateAndTime.set(Calendar.MINUTE, minute); updateLabel();
} });
dateAndTime.get(Calendar.YEAR), dateAndTime.get(Calendar.MONTH), dateAndTime.get(Calendar.DAY_OF_MONTH)).show();
btn=(Button)findViewById(R.id.timeBtn);
btn.setOnClickListener(new View.OnClickListener() { public void onClick(View v) {
new TimePickerDialog(ChronoDemo.this, t,
} });
dateAndTime.get(Calendar.HOUR_OF_DAY), dateAndTime.get(Calendar.MINUTE), true).show();
dateAndTimeLabel=(TextView)findViewById(R.id.dateAndTime); updateLabel();
}
private void updateLabel() { dateAndTimeLabel.setText(fmtDateAndTime
.format(dateAndTime.getTime()));
} }
Select one:
a. app displays two buttons, where users can type in date and time
b. app takes current date and time and stores in two buttons
c. app displays two buttons to set date and time, then presents a dialog based on dates and time for user to select the numbers.
d. app displays date and time

The correct answer is: app displays two buttons to set date and time, then presents a dialog based on dates and time for user to select the numbers.

Question 28


In addition to height and width, what is the third metric when dealing with mobile images or screens?
Select one:
a. pixel ratio
b. coloring
c. contrast
d. optimization

The correct answer is: pixel ratio

Question 29


Which modifier allows us to validate an email address in a TextView?
Select one:
a. android:inputType="number|numberSigned|numberDecimal"
b. android:inputType="text|EmailAddress"
c. android:inputType="text|textMultiLine|textAutoCorrect"
android:minLines="3"
android:gravity="top"
d. android:inputType="text|textEmailAddress"

The correct answer is: android:inputType="text|textEmailAddress"

Question 30


What Android feature can tell your applications where the device is on the face of the Earth and display maps or otherwise take advantage of the location data, such as tracking a device's movements if the device has been stolen?
Select one:
a. Storage
b. Network
c. Multimedia
d. GPS

The correct answer is: GPS

Question 31


Which directory holds static files you wish to package with the application?
Select one:
a. AndroidManifest.xml
b. build.xml
c. layout/main.xml
d. assets/

The correct answer is: assets/

Question 32


Each platform defines its own visual style through color themes, icon styles, metaphors, and widget rendering. The use of a platform visual theme is more than an aesthetic choice. Platform themes establish user expectations that user interactions in the application will follow platform conventions.
Select one:
True
False

The correct answer is 'True'.

Question 33


On phones, constrained screen sizes, coupled with large interaction targets, result in fewer controls per panel. Fingers and hands also obscure much more of the screen on a UI than a mouse pointer icon.
Select one:
True
False

The correct answer is 'True'.

Question 34


To assign a value, Java uses a single “=” sign, as in x=5. What symbol is used to compare variables or values in an if statement?
Select one:
a. .=
b. =.
c. ++
d. ==

The correct answer is: ==

Question 35


Which HTML meta tag is used to control layout on mobile devices?
Select one:
a. cache
b. viewport
c. refresh
d. description

The correct answer is: viewport

Question 36


What is Error Recovery?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: User should never be allowed to make a mistake

Question 37


What does this app do?

Layout:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<WebView android:id="@+id/webkit"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</LinearLayout>

The Java code:
package com.commonsware.android.browser1;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
public class BrowserDemo1 extends Activity {
WebView browser;
@Override public void onCreate(Bundle icicle) {
super.onCreate(icicle); setContentView(R.layout.main); browser=(WebView)findViewById(R.id.webkit);
browser.loadUrl("http://commonsware.com"); }
}
Which line is the activity?
Select one:
a. Loads RSS feed
b. Displays SDK
c. Downloads services
d. Shows the commonsware.com website

The correct answer is: Shows the commonsware.com website

Question 38


The keyboard in an Android app can be modified as needed. There are six basic configurations for the keyboard through the ndroid:inputType attribute. Which one is missing from this list?
number
phone
datetime
date
time
Select one:
a. email
b. text
c. address
d. calculation

The correct answer is: text

Question 39


Process intended to run independent of an Activity to check for updates or to play music even if the operating Activity is no longer active:
Select one:
a. Activities
b. Content Providers
c. Services
d. Intents

The correct answer is: Services

Question 40


What allows you to package data files with your application, for things that do not change, such as icons or help files?
Select one:
a. Storage
b. Network
c. Multimedia
d. GPS

The correct answer is: Storage
The following code creates an app which does what?

Layout file:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView android:id="@+id/dateAndTime"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Button android:id="@+id/dateBtn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Set the Date"
/>
<Button android:id="@+id/timeBtn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Set the Time"
/>
</LinearLayout>
Java code:
public class ChronoDemo extends Activity { DateFormat fmtDateAndTime=DateFormat.getDateTimeInstance(); TextView dateAndTimeLabel; Calendar dateAndTime=Calendar.getInstance(); DatePickerDialog.OnDateSetListener d=new DatePickerDialog.OnDateSetListener()
{
} };
TimePickerDialog.OnTimeSetListener t=new TimePickerDialog.OnTimeSetListener()
{
} };
@Override public void onCreate(Bundle icicle) {
super.onCreate(icicle); setContentView(R.layout.main);
Button btn=(Button)findViewById(R.id.dateBtn);
btn.setOnClickListener(new View.OnClickListener() { public void onClick(View v) {
new DatePickerDialog(ChronoDemo.this, d,
public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
dateAndTime.set(Calendar.YEAR, year); dateAndTime.set(Calendar.MONTH, monthOfYear); dateAndTime.set(Calendar.DAY_OF_MONTH, dayOfMonth); updateLabel();
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
dateAndTime.set(Calendar.HOUR_OF_DAY, hourOfDay); dateAndTime.set(Calendar.MINUTE, minute); updateLabel();
} });
dateAndTime.get(Calendar.YEAR), dateAndTime.get(Calendar.MONTH), dateAndTime.get(Calendar.DAY_OF_MONTH)).show();
btn=(Button)findViewById(R.id.timeBtn);
btn.setOnClickListener(new View.OnClickListener() { public void onClick(View v) {
new TimePickerDialog(ChronoDemo.this, t,
} });
dateAndTime.get(Calendar.HOUR_OF_DAY), dateAndTime.get(Calendar.MINUTE), true).show();
dateAndTimeLabel=(TextView)findViewById(R.id.dateAndTime); updateLabel();
}
private void updateLabel() { dateAndTimeLabel.setText(fmtDateAndTime
.format(dateAndTime.getTime()));
} }
Select one:
a. app displays two buttons, where users can type in date and time
b. app takes current date and time and stores in two buttons
c. app displays two buttons to set date and time, then presents a dialog based on dates and time for user to select the numbers.
d. app displays date and time

The correct answer is: app displays two buttons to set date and time, then presents a dialog based on dates and time for user to select the numbers.

Question 2


To create an integer variable and assign a value, you would use:
Select one:
a. Int myNumber = 5;
b. myNumber = 5;
c. int myNumber; myNumber = 5;
d. 5 = myNumber;

The correct answer is: int myNumber; myNumber = 5;

Question 3


What is the name for the practice of detecting the type of the device, which is downloading your pages?
Select one:
a. spying
b. declaring
c. Multimedia
d. user agent sniffing

The correct answer is: user agent sniffing

Question 4


System messages, running around the inside of the device, notifying applications of various events:
Select one:
a. Activities
b. Content Providers
c. Services
d. Intents

The correct answer is: Intents

Question 5


Consider the following Java code:

class Student {
private String firstName;
private String lastName;
public Student(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
// Your code goes here
}

public class Main {
public static void main(String[] args) {
Student[] students = new Student[] {
new Student("Morgan", "Freeman"),
new Student("Brad", "Pitt"),
new Student("Kevin", "Spacey"),
};
for (Student s : students) {
s.printFullName();
}
}
}

What do we call printFullName() ?
Select one:
a. function
b. static
c. display feature
d. method

The correct answer is: method

Question 6


Given the Learning Activity 3.5 code, which line assigns a value to a variable?
Select one:
a. Int myNumber = 5;
b. myNumber = 5;
c. SecretNum = 0;
d. 5 = myNumber;

The correct answer is: SecretNum = 0;

Question 7


What is Learnability?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: An interface should be easy to use from the first time the user interacts with it

Question 8


What is the Widget created by this code in the layout file?
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/icon"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:adjustViewBounds="true"
android:src="@drawable/molecule"
/>
Select one:
a. image
b. android:id
c. ViewBounds
d. drawable/molecule

The correct answer is: image

Question 9


What is a basic unit of a Java program or an object?
Select one:
a. method
b. class
c. property
d. public

The correct answer is: class

Question 10


What is the property sent from the device browser to the server, along with the web page request, which tells us what type of device is used?
Select one:
a. http header
b. http-version
c. device-type
d. user-agent

The correct answer is: user-agent

Question 11


What is a valid property of a label widget?
Select one:
a. TextView
b. android:typeface
c. layout/main.xml
d. LabelView

The correct answer is: android:typeface

Question 12


Which element on a mobile platform is the key to web based apps?
Select one:
a. Settings app
b. Web browser app
c. Volume adjustment
d. Google Maps

The correct answer is: Web browser app

Question 13


What languages are used to develop native mobile apps?
Select one or more:
a. Cobol
b. Java
c. Objective-C
d. Android

The correct answers are: Java, Objective-C

Question 14


While file in the root contents of an Android project describes the application being build (components, activities, services)?
Select one:
a. AndroidManifest.xml
b. build.xml
c. layout/main.xml
d. assets/

The correct answer is: AndroidManifest.xml

Question 15


How many lines will this code display?

System.print(“Hello “);
System.print(“World”);
Select one:
a. 4
b. 3
c. 2
d. 1

The correct answer is: 1

Question 16


Which characteristic of mobile devices makes them challenging as web page clients?
Select one:
a. hardware characteristics
b. users
c. Services
d. Intents

The correct answer is: hardware characteristics

Question 17


Which modifier allows us to validate an email address in a TextView?
Select one:
a. android:inputType="number|numberSigned|numberDecimal"
b. android:inputType="text|EmailAddress"
c. android:inputType="text|textMultiLine|textAutoCorrect"
android:minLines="3"
android:gravity="top"
d. android:inputType="text|textEmailAddress"

The correct answer is: android:inputType="text|textEmailAddress"

Question 18


What Java code can be used on the checkbox Widget?

<?xml version="1.0" encoding="utf-8"?>
<CheckBox xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id="@+id/check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This checkbox is: unchecked" />
Select one:
a. getCheckMark()
b. isChecked()
c. setCheckMark()
d. getMark()

The correct answer is: isChecked()

Question 19


True or False: In Android, the Spinner is the equivalent of the drop-down selector.
Select one:
True
False

The correct answer is 'True'.

Question 20


Process intended to run independent of an Activity to check for updates or to play music even if the operating Activity is no longer active:
Select one:
a. Activities
b. Content Providers
c. Services
d. Intents

The correct answer is: Services

Question 21


The primitive types in Java are byte, short, int, long, float, double, char, boolean. Which one can be used to represent a word like “Hello”?
Select one:
a. char
b. none, the String object should be used
c. double
d. long

The correct answer is: none, the String object should be used

Question 22


What Android feature can tell your applications where the device is on the face of the Earth and display maps or otherwise take advantage of the location data, such as tracking a device's movements if the device has been stolen?
Select one:
a. Storage
b. Network
c. Multimedia
d. GPS

The correct answer is: GPS

Question 23


To assign a value, Java uses a single “=” sign, as in x=5. What symbol is used to compare variables or values in an if statement?
Select one:
a. .=
b. =.
c. ++
d. ==

The correct answer is: ==

Question 24


To assign a value, Java uses a single “=” sign, as in x=5. What symbol is used to compare variables or values in an if statement?
Select one:
a. .=
b. =.
c. ++
d. ==

The correct answer is: ==

Question 25


Which Widget can be used to create a time clock showing hours and minutes?
Select one:
a. clock_do
b. android:clock
c. getTime
d. AnalogClock

The correct answer is: AnalogClock

Question 26


If you need a user to type in a date, what Widget should you use? It will allow the user to select a date, which means you don't have to validate or explain the format like day/month/year or month/day/year, or four digit year 2013 or two digit year 13.
Select one:
a. TimePickerDialog
b. DatePicker
c. DatePicketDialog
d. Chrono

The correct answer is: DatePicker

Question 27


If the name of the Java class is: class MyProgram

What should be the name of the Java file?
Select one:
a. MyProgram
b. myProgram.java
c. MyProgram.java
d. program

The correct answer is: MyProgram.java

Question 28


Given the Learning Activity 3.5 code, which line makes external code available to our program?
Select one:
a. getCode();
b. import java.util.Scanner;
c. if
d. input.nextInt();

The correct answer is: import java.util.Scanner;

Question 29


The building blocks of the Android user interface are:
Select one:
a. Activities
b. Content Providers
c. Services
d. Intents

The correct answer is: Activities

Question 30


What makes mobile devices unique and somewhat challenging as clients to web pages?
Select one:
a. hardware characteristics
b. users
c. Services
d. Intents

The correct answer is: hardware characteristics

Question 31


The primitive types in Java are byte, short, int, long, float, double, char, boolean. Which one can be used to represent a word like “Hello”?
Select one:
a. char
b. none, the String object should be used
c. double
d. long

The correct answer is: none, the String object should be used

Question 32


A level of abstraction for any data stored on the device that is accessible by multiple applications:
Select one:
a. Activities
b. Content Providers
c. Services
d. Intents

The correct answer is: Content Providers

Question 33


To create an integer variable and assign a value, you would use:
Select one:
a. Int myNumber = 5;
b. myNumber = 5;
c. int myNumber; myNumber = 5;
d. 5 = myNumber;

The correct answer is: int myNumber; myNumber = 5;

Question 34


The keyboard in an Android app can be modified as needed. There are six basic configurations for the keyboard through the ndroid:inputType attribute. Which one is missing from this list?
number
phone
datetime
date
time
Select one:
a. email
b. text
c. address
d. calculation

The correct answer is: text

Question 35


Which technology holds great promise for web based mobile apps?
Select one:
a. WHATWG
b. HTML5
c. MySQL
d. W3C

The correct answer is: HTML5

Question 36


What is the mathematical ratio that describes how the width of a pixel in a digital image compares to the height of that pixel?
Select one:
a. pixel ratio
b. coloring ratio
c. pixel contrast
d. pixel optimization

The correct answer is: pixel ratio

Question 37


Many popular mobile devices use touch and gestural input.
Select one:
True
False

The correct answer is 'True'.

Question 38


Given the following code of the app, what is the app doing?

Layout file:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
> <TextView
android:id="@+id/selection"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<AutoCompleteTextView android:id="@+id/edit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:completionThreshold="3"/>
</LinearLayout>
The corresponding Java code is:

public class AutoCompleteDemo extends Activity
implements TextWatcher {
TextView selection;
AutoCompleteTextView edit;
String[] items={"lorem", "ipsum", "dolor", "sit", "amet",
"consectetuer", "adipiscing", "elit", "morbi", "vel",
"ligula", "vitae", "arcu", "aliquet", "mollis",
"etiam", "vel", "erat", "placerat", "ante",
"porttitor", "sodales", "pellentesque", "augue", "purus"};
@Override public void onCreate(Bundle icicle) {
super.onCreate(icicle); setContentView(R.layout.main); selection=(TextView)findViewById(R.id.selection); edit=(AutoCompleteTextView)findViewById(R.id.edit); edit.addTextChangedListener(this);

edit.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line,
items));
}
public void onTextChanged(CharSequence s, int start, int before, int count) {
selection.setText(edit.getText()); }
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
// needed for interface, but not used
}
public void afterTextChanged(Editable s) { // needed for interface, but not used
} }
Select one:
a. This application has an error and it will not run.
b. As the user types, matches are shown in a selection list that, like with Spinner, folds down from the field. The user can type in the suggested word.
c. As the user types, the text is comparing the entered text as a prefix against a list of previous entries. This is a spelling wizard.
d. As the user types, the text is treated as a prefix filter, comparing the entered text as a prefix against a list of candidates. Matches are shown in a selection list that, like with Spinner, folds down from the field. The user can either type out an entry (e.g., something not in the list) or choose an entry from the list to be the value of the field.

The correct answer is: As the user types, the text is treated as a prefix filter, comparing the entered text as a prefix against a list of candidates. Matches are shown in a selection list that, like with Spinner, folds down from the field. The user can either type out an entry (e.g., something not in the list) or choose an entry from the list to be the value of the field.

Question 39


Which XML element of the Android manifest indicates the guts of the application that the manifest describes?
Select one:
a. uses-permission
b. instrumentation
c. uses-sdk
d. application

The correct answer is: application

Question 40


Will this if statement work?
if (SecretNum = YourNumber )
Select one:
a. Yes
b. No

The correct answer is: No
If a method does not return any value, what type would it take?
Select one:
a. Integer
b. String
c. void
d. Intents

The correct answer is: void

Question 2


Consider the following Java code, then answer: Which line is the activity?

package com.commonsware.android.skeleton;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import java.util.Date;
public class Now extends Activity implements View.OnClickListener {
Button btn;
@Override public void onCreate(Bundle icicle) {
super.onCreate(icicle);
btn=new Button(this); btn.setOnClickListener(this); updateTime(); setContentView(btn);
}
public void onClick(View view) { updateTime();
}
private void updateTime() { btn.setText(new Date().toString());
} }
Select one:
a. super.onCreate(icicle);
b. btn.setOnClickListener(this);
c. public void onCreate(Bundle icicle)
d. public class Now extends Activity implements View.OnClickListener

The correct answer is: public class Now extends Activity implements View.OnClickListener

Question 3


The simplest Android Widget is a label. What is its name in the layout file?
Select one:
a. TextView
b. android-label
c. label.xml
d. LabelView

The correct answer is: TextView

Question 4


What Widgets are being created in this app:

Layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
> <TextView
android:id="@+id/selection"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Spinner android:id="@+id/spinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"
/>
</LinearLayout>
Java code:
public class SpinnerDemo extends Activity
implements AdapterView.OnItemSelectedListener {
TextView selection;
String[] items={"lorem", "ipsum", "dolor", "sit", "amet",
"consectetuer", "adipiscing", "elit", "morbi", "vel",
"ligula", "vitae", "arcu", "aliquet", "mollis",
"etiam", "vel", "erat", "placerat", "ante",
"porttitor", "sodales", "pellentesque", "augue", "purus"};
@Override public void onCreate(Bundle icicle) {
super.onCreate(icicle); setContentView(R.layout.main); selection=(TextView)findViewById(R.id.selection);
Which line is the activity?
Select one:
a. TextLabel, icicle
b. Label, List
c. List, Entry field
d. Spinner, Label

The correct answer is: Spinner, Label

Question 5


The following code creates the EditText Widget. What does this Widget look like in comparison to labels, images, or buttons?

<?xml version="1.0" encoding="utf-8"?>
<EditText xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id="@+id/field"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:singleLine="false"
/>
Select one:
a. large label
b. a drop down list
c. field to type something in
d. checkbox

The correct answer is: field to type something in

Question 6


What languages are used to develop web based mobile apps?
Select one or more:
a. C++
b. HTML
c. JavaScript
d. Objective-C

The correct answers are: HTML, JavaScript

Question 7


What allows you to package data files with your application, for things that do not change, such as icons or help files?
Select one:
a. Storage
b. Network
c. Multimedia
d. GPS

The correct answer is: Storage

Question 8


Given the code in the Java file and later in the layout file, what is the Widget being programmed and what is the event?
public void someMethod(View theButton) {
// do something useful here
}
<Button
android:onClick="someMethod"
...
/>
Select one:
a. Button, someMethod
b. theButton, click
c. someMethod, onClick
d. Button, onClick

The correct answer is: Button, onClick

Question 9


What programming development language and environment is used to develop Android apps?
Select one:
a. C++ with Visual Studio
b. Objective-C with XCode
c. Cobol with Borland IDE
d. Java with Eclipse

The correct answer is: Java with Eclipse

Question 10


What is Error Recovery?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: User should never be allowed to make a mistake

Question 11


Given the Learning Activity 3.5 code, which line generates a number between 1 - 1000?
Select one:
a. import java.util.Scanner;
b. SecretNum = (int) (Math.random()*1000);
c. Scanner input = new Scanner(System.in);
d. YourNumber = input.nextInt();

The correct answer is: SecretNum = (int) (Math.random()*1000);

Question 12


What mobile platforms are most common today?
Select one or more:
a. iOS
b. SQL Server
c. MySQL
d. Android

The correct answers are: iOS, Android

Question 13


What type of programming does Java implement?
Select one:
a. object oriented
b. procedural
c. no-SQL
d. relational

The correct answer is: object oriented

Question 14


Which XML element of the Android manifest indicates the code that should be invoked on key system events?
Select one:
a. uses-permission
b. instrumentation
c. uses-sdk
d. application

The correct answer is: instrumentation

Question 15


Note, that you can declare a variable and initialize it in one statement:
int SecretNum = 0;

What will display if you execute immediately after this line?
System.out.print(SecretNum);
Select one:
a. 3
b. 2
c. 1
d. 0

The correct answer is: 0

Question 16


What is Memorability?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: Interface should be easier to use each time the user interacts with it

Question 17


What Android feature allows the user to play back music, take pictures with the camera, or use the microphone for audio note-taking?
Select one:
a. Storage
b. Network
c. Multimedia
d. GPS

The correct answer is: Multimedia

Question 18


What web technologies can be used to develop web pages and also mobile web applications? (check all that apply)
Select one or more:
a. C++
b. HTML
c. JavaScript
d. Objective-C

The correct answers are: HTML, JavaScript

Question 19


True or False: Intents are ways of specifying something you want accomplished, then telling Android to go find something to accomplish it. Frequently, these are used to cause activities to spawn. For example, whenever you launch an application from the main Android application launcher, the launcher creates an Intent and has Android open up the activity associated with that Intent.
Select one:
True
False

The correct answer is 'True'.

Question 20


The SlidingDrawer should contain two things:
1. A handle, frequently an ImageView
and the second:
Select one:
a. large label
b. a drop down list
c. The contents of the drawer itself, usually some sort of container
d. checkbox

The correct answer is: The contents of the drawer itself, usually some sort of container

Question 21


Which element should you use in addition to TabHost and TabWidget in order to create a tabbed portion of a view?
Select one:
a. FrameLayout
b. android:id
c. ViewBounds
d. drawable/molecule

The correct answer is: FrameLayout

Question 22


A mobile interface designer needs to consider a number the unique challenges. It may be difficult for a mobile user to see the screen because of the screen size and obstruction of sight by fingers or hands.
Select one:
True
False

The correct answer is 'True'.

Question 23


How many equal signs “=” are needed to compare values ?
Select one:
a. -1
b. 0
c. 1
d. 2

The correct answer is: 2

Question 24


Why should specific size images be loaded on appropriate mobile devices, instead of the same large image downloaded to the device and then resized by the browser?
Select one:
a. Activities
b. image ratio
c. copyright
d. low or expensive bandwidth

The correct answer is: low or expensive bandwidth

Question 25


What is Learnability?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: An interface should be easy to use from the first time the user interacts with it

Question 26


This layout code will change the font of the entry field:
<TextView
android:text="monospace:"
android:layout_marginRight="4px"
android:textSize="20sp"
/>
Select one:
True
False

The correct answer is 'False'.

Question 27


Given the Learning Activity 3.5 code, which line defines the SecretNum variable as an integer number?
Select one:
a. int SecretNum;
b. integer SecretNum;
c. SecretNum = 0;
d. SecretNum == YourNumber

The correct answer is: int SecretNum;

Question 28


What language is used to develop native mobile apps on the Android platform?
Select one:
a. Cobol
b. Java
c. Objective-C
d. Android

The correct answer is: Java

Question 29


When using the keyword private before a variable or a method, it means only the class itself can access the variable or method. What designation would allow access to the variable or the method from any part of the Java program?
Select one:
a. void
b. Integer
c. everyone
d. public

The correct answer is: public

Question 30


Which files is an Ant script for compiling the application and installing on the device?
Select one:
a. AndroidManifest.xml
b. build.xml
c. layout/main.xml
d. assets/

The correct answer is: build.xml

Question 31


If a method does not return any value, what type would it take?
Select one:
a. Integer
b. String
c. void
d. Intents

The correct answer is: void

Question 32


What does this app do?

Layout:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<WebView android:id="@+id/webkit"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</LinearLayout>

The Java code:
package com.commonsware.android.browser1;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
public class BrowserDemo1 extends Activity {
WebView browser;
@Override public void onCreate(Bundle icicle) {
super.onCreate(icicle); setContentView(R.layout.main); browser=(WebView)findViewById(R.id.webkit);
browser.loadUrl("http://commonsware.com"); }
}
Which line is the activity?
Select one:
a. Loads RSS feed
b. Displays SDK
c. Downloads services
d. Shows the commonsware.com website

The correct answer is: Shows the commonsware.com website

Question 33


Java expects the start of the program to be in which method?
Select one:
a. private Main {}
b. private my Start(String[] args)
c. public void start()
d. public static void main(String[] args)

The correct answer is: public static void main(String[] args)

Question 34


Given the Learning Activity 3.5 code, which line prompts the user to enter a numerical value?
Select one:
a. YourNumber = input.nextInt();
b. import java.util.Scanner;
c. Scanner input = new Scanner(System.in);
d. SecretNum = (int) (Math.random()*1000);

The correct answer is: YourNumber = input.nextInt();

Question 35


Given the following code in the layout file, where will the text be displayed in the Android app?
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="You were expecting something profound?"
/>
Select one:
a. bottom left
b. bottom right
c. top left
d. top right

The correct answer is: top left

Question 36


Java expects the start of the program to be in which method?
Select one:
a. private Main {}
b. private my Start(String[] args)
c. public void start()
d. public static void main(String[] args)

The correct answer is: public static void main(String[] args)

Question 37


What Android features allows your application to initiate calls, send and receive SMS messages?
Select one:
a. Storage
b. Network
c. Multimedia
d. Phone services

The correct answer is: Phone services

Question 38


What provides Internet access at any level you wish, from raw Java sockets all the way up to a built-in WebKit-based Web browser widget?
Select one:
a. Storage
b. Network
c. Multimedia
d. GPS

The correct answer is: Network

Question 39


Which mobile application element is not found on desktop computers?
Select one:
a. Textboxes
b. Locality
c. Volume adjustment
d. Buttons

The correct answer is: Locality

Question 40


Which method shows words on a screen?
Select one:
a. System.out.println();
b. printnow();
c. screen();
d. GPS();

The correct answer is: System.out.println();
What mobile platforms are most common today?
Select one or more:
a. iOS
b. SQL Server
c. MySQL
d. Android

The correct answers are: iOS, Android

Question 2
Partially correct
Mark 0.50 out of 1.00



What languages are used to develop native mobile apps?
Select one or more:
a. Cobol
b. Java
c. Objective-C
d. Android

The correct answers are: Java, Objective-C

Question 3


What languages are used to develop web based mobile apps?
Select one or more:
a. C++
b. HTML
c. JavaScript
d. Objective-C

The correct answers are: HTML, JavaScript

Question 4
Correct
Mark 1.00 out of 1.00



Which element on a mobile platform is the key to web based apps?
Select one:
a. Settings app
b. Web browser app
c. Volume adjustment
d. Google Maps

The correct answer is: Web browser app

Question 5
Incorrect
Mark 0.00 out of 1.00



Which technology holds great promise for web based mobile apps?
Select one:
a. WHATWG
b. HTML5
c. MySQL
d. W3C

The correct answer is: HTML5

Question 6
Incorrect
Mark 0.00 out of 1.00



What is Mapping?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. What the user expects to happen when they interact with the interface is exactly what should happen

The correct answer is: What the user expects to happen when they interact with the interface is exactly what should happen

Question 7


Many popular mobile devices use touch and gestural input.
Select one:
True
False

The correct answer is 'True'.

Question 8
Correct
Mark 1.00 out of 1.00



On phones, constrained screen sizes, coupled with large interaction targets, result in fewer controls per panel. Fingers and hands also obscure much more of the screen on a UI than a mouse pointer icon.
Select one:
True
False

The correct answer is 'True'.

Question 9
Incorrect
Mark 0.00 out of 1.00



Each platform defines its own visual style through color themes, icon styles, metaphors, and widget rendering. The use of a platform visual theme is more than an aesthetic choice. Platform themes establish user expectations that user interactions in the application will follow platform conventions.
Select one:
True
False

The correct answer is 'True'.

Question 10
Incorrect
Mark 0.00 out of 1.00



Which mobile application element is not found on desktop computers?
Select one:
a. Textboxes
b. Locality
c. Volume adjustment
d. Buttons

The correct answer is: Locality

Question 11
Incorrect
Mark 0.00 out of 1.00



What is Learnability?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: An interface should be easy to use from the first time the user interacts with it

Question 12
Correct
Mark 1.00 out of 1.00



What is Efficiency?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: Number of steps it takes for a user to complete a task

Question 13
Incorrect
Mark 0.00 out of 1.00



What is Memorability?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: Interface should be easier to use each time the user interacts with it

Question 14
Incorrect
Mark 0.00 out of 1.00



What is Error Recovery?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: User should never be allowed to make a mistake

Question 15
Correct
Mark 1.00 out of 1.00



What is Simplicity?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Usual tasks should be easy and less common tasks should be possible
d. User should never be allowed to make a mistake

The correct answer is: Usual tasks should be easy and less common tasks should be possible
The building blocks of the Android user interface are:
Select one:
a. Activities
b. Content Providers
c. Services
d. Intents

The correct answer is: Activities

Question 2
Correct
Mark 1.00 out of 1.00



A level of abstraction for any data stored on the device that is accessible by multiple applications:
Select one:
a. Activities
b. Content Providers
c. Services
d. Intents

The correct answer is: Content Providers

Question 3
Correct
Mark 1.00 out of 1.00



Process intended to run independent of an Activity to check for updates or to play music even if the operating Activity is no longer active:
Select one:
a. Activities
b. Content Providers
c. Services
d. Intents

The correct answer is: Services

Question 4
Correct
Mark 1.00 out of 1.00



System messages, running around the inside of the device, notifying applications of various events:
Select one:
a. Activities
b. Content Providers
c. Services
d. Intents

The correct answer is: Intents

Question 5
Correct
Mark 1.00 out of 1.00



What allows you to package data files with your application, for things that do not change, such as icons or help files?
Select one:
a. Storage
b. Network
c. Multimedia
d. GPS

The correct answer is: Storage

Question 6
Incorrect
Mark 0.00 out of 1.00



What provides Internet access at any level you wish, from raw Java sockets all the way up to a built-in WebKit-based Web browser widget?
Select one:
a. Storage
b. Network
c. Multimedia
d. GPS

The correct answer is: Network

Question 7
Correct
Mark 1.00 out of 1.00



What Android feature allows the user to play back music, take pictures with the camera, or use the microphone for audio note-taking?
Select one:
a. Storage
b. Network
c. Multimedia
d. GPS

The correct answer is: Multimedia

Question 8
Correct
Mark 1.00 out of 1.00



What Android feature can tell your applications where the device is on the face of the Earth and display maps or otherwise take advantage of the location data, such as tracking a device's movements if the device has been stolen?
Select one:
a. Storage
b. Network
c. Multimedia
d. GPS

The correct answer is: GPS

Question 9
Correct
Mark 1.00 out of 1.00



What Android features allows your application to initiate calls, send and receive SMS messages?
Select one:
a. Storage
b. Network
c. Multimedia
d. Phone services

The correct answer is: Phone services

Question 10
Correct
Mark 1.00 out of 1.00



What programming development language and environment is used to develop Android apps?
Select one:
a. C++ with Visual Studio
b. Objective-C with XCode
c. Cobol with Borland IDE
d. Java with Eclipse

The correct answer is: Java with Eclipse

Mark 1.00 out of 1.00



Which characteristic of mobile devices makes them challenging as web page clients?
Select one:
a. hardware characteristics
b. users
c. Services
d. Intents

The correct answer is: hardware characteristics

Question 2
Correct
Mark 1.00 out of 1.00



Which HTML meta tag is used to control layout on mobile devices?
Select one:
a. table
b. viewport
c. span
d. element

The correct answer is: viewport

Question 3
Correct
Mark 1.00 out of 1.00



Since most mobile devices support the Touch event, what CSS pseudo class cannot be used on link objects?
Select one:
a. CSS :visited
b. CSS :link
c. CSS :hover
d. CSS :touch

The correct answer is: CSS :hover

Question 4
Correct
Mark 1.00 out of 1.00



Why should specific size images be loaded on appropriate mobile devices, instead of the same large image downloaded to the device and then resized by the browser?
Select one:
a. Activities
b. image ratio
c. copyright
d. low or expensive bandwidth

The correct answer is: low or expensive bandwidth

Question 5
Correct
Mark 1.00 out of 1.00



In addition to height and width, what is the third metric when dealing with mobile images or screens?
Select one:
a. pixel ratio
b. coloring
c. contrast
d. optimization

The correct answer is: pixel ratio

Question 6
Correct
Mark 1.00 out of 1.00



What API (application programming interface) is available on most mobile devices?
Select one:
a. development and connection
b. orientation and geolocation
c. device restart
d. linear-gradient

The correct answer is: orientation and geolocation

Question 7
Correct
Mark 1.00 out of 1.00



When developing Mobile Web pages for many devices, what is a good practice?
Select one:
a. rapid development
b. testing on desktop browsers
c. cross-browser development
d. use of Flash

The correct answer is: cross-browser development

Question 8
Correct
Mark 1.00 out of 1.00



What is the name for the practice of detecting the type of the device, which is downloading your pages?
Select one:
a. spying
b. declaring
c. Multimedia
d. user agent sniffing

The correct answer is: user agent sniffing

Question 9
Correct
Mark 1.00 out of 1.00



What is the property sent from the device browser to the server, along with the web page request, which tells us what type of device is used?
Select one:
a. http header
b. http-version
c. device-type
d. user-agent

The correct answer is: user-agent

Question 10
Correct
Mark 1.00 out of 1.00



What is the web browser used on iOS mobile devices?
Select one:
a. Web Toolkit
b. Chrome
c. Internet Explorer
d. Safari

The correct answer is: Safari
What is Simplicity?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Usual tasks should be easy and less common tasks should be possible
d. User should never be allowed to make a mistake

The correct answer is: Usual tasks should be easy and less common tasks should be possible

Question 2
Correct
Mark 1.00 out of 1.00



When mobile devices are rotated in the hands of the user, what feature allows the application to change dimensions?
Select one:
a. development and connection
b. orientation
c. device restart
d. linear-gradient

The correct answer is: orientation

Question 3
Correct
Mark 1.00 out of 1.00



What makes mobile devices unique and somewhat challenging as clients to web pages?
Select one:
a. hardware characteristics
b. users
c. Services
d. Intents

The correct answer is: hardware characteristics

Question 4
Correct
Mark 1.00 out of 1.00



What language is used to develop native mobile apps on the Android platform?
Select one:
a. Cobol
b. Java
c. Objective-C
d. Android

The correct answer is: Java

Question 5
Correct
Mark 1.00 out of 1.00



What is Learnability?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: An interface should be easy to use from the first time the user interacts with it

Question 6
Correct
Mark 1.00 out of 1.00



What is Memorability?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: Interface should be easier to use each time the user interacts with it

Question 7
Incorrect
Mark 0.00 out of 1.00



What is a significant performance consideration when downloading images on a mobile device?
Select one:
a. Activities
b. image ratio
c. copyright
d. low or expensive bandwidth

The correct answer is: low or expensive bandwidth

Question 8
Correct
Mark 1.00 out of 1.00



What is the mathematical ratio that describes how the width of a pixel in a digital image compares to the height of that pixel?
Select one:
a. pixel ratio
b. coloring ratio
c. pixel contrast
d. pixel optimization

The correct answer is: pixel ratio

Question 9
Correct
Mark 1.00 out of 1.00



What is the name of the process to determine the type of browser, which is viewing a page?
Select one:
a. spying
b. declaring
c. Multimedia
d. user agent sniffing

The correct answer is: user agent sniffing

Question 10
Correct
Mark 1.00 out of 1.00



What is the property sent from the device browser to the server, along with the web page request, which tells us what type of device is used?
Select one:
a. http header
b. http-version
c. device-type
d. user-agent

The correct answer is: user-agent

Question 11
Correct
Mark 1.00 out of 1.00



Click is an event present on workstations, while mobile devices use touch.
Select one:
True
False

The correct answer is 'True'.

Question 12
Correct
Mark 1.00 out of 1.00



What web browser is used on the iPhone, iPad, and Apple Mac products?
Select one:
a. Web Toolkit
b. Chrome
c. Internet Explorer
d. Safari

The correct answer is: Safari

Question 13
Correct
Mark 1.00 out of 1.00



What is Mapping?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. What the user expects to happen when they interact with the interface is exactly what should happen

The correct answer is: What the user expects to happen when they interact with the interface is exactly what should happen

Question 14
Correct
Mark 1.00 out of 1.00



What is Error Recovery?
Select one:
a. An interface should be easy to use from the first time the user interacts with it
b. Number of steps it takes for a user to complete a task
c. Interface should be easier to use each time the user interacts with it
d. User should never be allowed to make a mistake

The correct answer is: User should never be allowed to make a mistake

Question 15
Correct
Mark 1.00 out of 1.00



What mobile platform applies to iPad and iPhone devices?
Select one:
a. iOS
b. SQL Server
c. MySQL
d. Android

The correct answer is: iOS

Question 16
Correct
Mark 1.00 out of 1.00



Which HTML meta tag is used to control layout on mobile devices?
Select one:
a. cache
b. viewport
c. refresh
d. description

The correct answer is: viewport

Question 17
Correct
Mark 1.00 out of 1.00



When developing mobile web applications or web pages, what is the best practice?
Select one:
a. rapid development
b. testing on desktop browsers
c. cross-browser development
d. use of Flash

The correct answer is: cross-browser development

Question 18
Correct
Mark 1.00 out of 1.00



When a mouse lingers over an image or link on a desktop computer, it produces an event. Web developers will sometimes use the event to open popup messages or extend selections. This event is difficult to activate on a phone, where only touch is registered. What is this event?
Select one:
a. CSS :visited
b. CSS :link
c. CSS :hover
d. CSS :touch

The correct answer is: CSS :hover

Question 19
Correct
Mark 1.00 out of 1.00



A mobile interface designer needs to consider a number the unique challenges. It may be difficult for a mobile user to see the screen because of the screen size and obstruction of sight by fingers or hands.
Select one:
True
False

The correct answer is 'True'.

Question 20
Partially correct
Mark 0.50 out of 1.00



What web technologies can be used to develop web pages and also mobile web applications? (check all that apply)
Select one or more:
a. C++
b. HTML
c. JavaScript
d. Objective-C

The correct answers are: HTML, JavaScript
What type of programming does Java implement?
Select one:
a. object oriented
b. procedural
c. no-SQL
d. relational

The correct answer is: object oriented

Question 2
Correct
Mark 1.00 out of 1.00



What is a basic unit of a Java program or an object?
Select one:
a. method
b. class
c. property
d. public

The correct answer is: class

Question 3
Correct
Mark 1.00 out of 1.00



If a method does not return any value, what type would it take?
Select one:
a. Integer
b. String
c. void
d. Intents

The correct answer is: void

Question 4
Correct
Mark 1.00 out of 1.00



Java expects the start of the program to be in which method?
Select one:
a. private Main {}
b. private my Start(String[] args)
c. public void start()
d. public static void main(String[] args)

The correct answer is: public static void main(String[] args)

Question 5
Correct
Mark 1.00 out of 1.00



Which method shows words on a screen?
Select one:
a. System.out.println();
b. printnow();
c. screen();
d. GPS();

The correct answer is: System.out.println();

Question 6
Correct
Mark 1.00 out of 1.00



The primitive types in Java are byte, short, int, long, float, double, char, boolean. Which one can be used to represent a word like “Hello”?
Select one:
a. char
b. none, the String object should be used
c. double
d. long

The correct answer is: none, the String object should be used

Question 7
Correct
Mark 1.00 out of 1.00



To create an integer variable and assign a value, you would use:
Select one:
a. Int myNumber = 5;
b. myNumber = 5;
c. int myNumber; myNumber = 5;
d. 5 = myNumber;

The correct answer is: int myNumber; myNumber = 5;

Question 8
Correct
Mark 1.00 out of 1.00



To assign a value, Java uses a single “=” sign, as in x=5. What symbol is used to compare variables or values in an if statement?
Select one:
a. .=
b. =.
c. ++
d. ==

The correct answer is: ==

Question 9
Correct
Mark 1.00 out of 1.00



Consider the following Java code:

class Student {
private String firstName;
private String lastName;
public Student(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
// Your code goes here
}

public class Main {
public static void main(String[] args) {
Student[] students = new Student[] {
new Student("Morgan", "Freeman"),
new Student("Brad", "Pitt"),
new Student("Kevin", "Spacey"),
};
for (Student s : students) {
s.printFullName();
}
}
}

What do we call printFullName() ?
Select one:
a. function
b. static
c. display feature
d. method

The correct answer is: method

Question 10
Correct
Mark 1.00 out of 1.00



When using the keyword private before a variable or a method, it means only the class itself can access the variable or method. What designation would allow access to the variable or the method from any part of the Java program?
Select one:
a. void
b. Integer
c. everyone
d. public

The correct answer is: public
Given the Learning Activity 3.5 code, which line defines the SecretNum variable as an integer number?
Select one:
a. int SecretNum;
b. integer SecretNum;
c. SecretNum = 0;
d. SecretNum == YourNumber

The correct answer is: int SecretNum;

Question 2
Correct
Mark 1.00 out of 1.00



Given the Learning Activity 3.5 code, which line makes external code available to our program?
Select one:
a. getCode();
b. import java.util.Scanner;
c. if
d. input.nextInt();

The correct answer is: import java.util.Scanner;

Question 3
Correct
Mark 1.00 out of 1.00



If the name of the Java class is: class MyProgram

What should be the name of the Java file?
Select one:
a. MyProgram
b. myProgram.java
c. MyProgram.java
d. program

The correct answer is: MyProgram.java

Question 4
Correct
Mark 1.00 out of 1.00



How many lines will this code display?

System.print(“Hello “);
System.print(“World”);
Select one:
a. 4
b. 3
c. 2
d. 1

The correct answer is: 1

Question 5
Correct
Mark 1.00 out of 1.00



Given the Learning Activity 3.5 code, which line prompts the user to enter a numerical value?
Select one:
a. YourNumber = input.nextInt();
b. import java.util.Scanner;
c. Scanner input = new Scanner(System.in);
d. SecretNum = (int) (Math.random()*1000);

The correct answer is: YourNumber = input.nextInt();

Question 6
Correct
Mark 1.00 out of 1.00



Given the Learning Activity 3.5 code, which line generates a number between 1 - 1000?
Select one:
a. import java.util.Scanner;
b. SecretNum = (int) (Math.random()*1000);
c. Scanner input = new Scanner(System.in);
d. YourNumber = input.nextInt();

The correct answer is: SecretNum = (int) (Math.random()*1000);

Question 7
Correct
Mark 1.00 out of 1.00



Given the Learning Activity 3.5 code, which line assigns a value to a variable?
Select one:
a. Int myNumber = 5;
b. myNumber = 5;
c. SecretNum = 0;
d. 5 = myNumber;

The correct answer is: SecretNum = 0;

Question 8
Correct
Mark 1.00 out of 1.00



Note, that you can declare a variable and initialize it in one statement:
int SecretNum = 0;

What will display if you execute immediately after this line?
System.out.print(SecretNum);
Select one:
a. 3
b. 2
c. 1
d. 0

The correct answer is: 0

Question 9
Correct
Mark 1.00 out of 1.00



Will this if statement work?
if (SecretNum = YourNumber )
Select one:
a. Yes
b. No

The correct answer is: No

Question 10
Correct
Mark 1.00 out of 1.00



How many equal signs “=” are needed to compare values ?
Select one:
a. -1
b. 0
c. 1
d. 2

The correct answer is: 2
While file in the root contents of an Android project describes the application being build (components, activities, services)?
Select one:
a. AndroidManifest.xml
b. build.xml
c. layout/main.xml
d. assets/

The correct answer is: AndroidManifest.xml

Question 2
Correct
Mark 1.00 out of 1.00



Which files is an Ant script for compiling the application and installing on the device?
Select one:
a. AndroidManifest.xml
b. build.xml
c. layout/main.xml
d. assets/

The correct answer is: build.xml

Question 3
Correct
Mark 1.00 out of 1.00



Which file contains GUI layout information like a list of buttons, text boxes?
Select one:
a. AndroidManifest.xml
b. build.xml
c. res/layout/main.xml
d. assets/

The correct answer is: res/layout/main.xml

Question 4
Correct
Mark 1.00 out of 1.00



Which directory holds static files you wish to package with the application?
Select one:
a. AndroidManifest.xml
b. build.xml
c. layout/main.xml
d. assets/

The correct answer is: assets/

Question 5
Correct
Mark 1.00 out of 1.00



Which XML element of the Android manifest indicates security access your application will need to be allowed to function properly?
Select one:
a. uses-permission
b. instrumentation
c. uses-sdk
d. application

The correct answer is: uses-permission

Question 6
Correct
Mark 1.00 out of 1.00



Which XML element of the Android manifest indicates the version required for your application?
Select one:
a. uses-permission
b. instrumentation
c. uses-sdk
d. application

The correct answer is: uses-sdk

Question 7
Correct
Mark 1.00 out of 1.00



Which XML element of the Android manifest indicates the code that should be invoked on key system events?
Select one:
a. uses-permission
b. instrumentation
c. uses-sdk
d. application

The correct answer is: instrumentation

Question 8
Correct
Mark 1.00 out of 1.00



Which XML element of the Android manifest indicates the guts of the application that the manifest describes?
Select one:
a. uses-permission
b. instrumentation
c. uses-sdk
d. application

The correct answer is: application

Question 9
Correct
Mark 1.00 out of 1.00



Consider the following Java code, then answer: Which line is the activity?

package com.commonsware.android.skeleton;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import java.util.Date;
public class Now extends Activity implements View.OnClickListener {
Button btn;
@Override public void onCreate(Bundle icicle) {
super.onCreate(icicle);
btn=new Button(this); btn.setOnClickListener(this); updateTime(); setContentView(btn);
}
public void onClick(View view) { updateTime();
}
private void updateTime() { btn.setText(new Date().toString());
} }
Select one:
a. super.onCreate(icicle);
b. btn.setOnClickListener(this);
c. public void onCreate(Bundle icicle)
d. public class Now extends Activity implements View.OnClickListener

The correct answer is: public class Now extends Activity implements View.OnClickListener

Question 10
Correct
Mark 1.00 out of 1.00



In the code from
Question 9, which method is invoked when the activity is started?
Select one:
a. super.onCreate(icicle);
b. btn.setOnClickListener(this);
c. public void onCreate(Bundle icicle)
d. public class Now extends Activity implements View.OnClickListener

The correct answer is: super.onCreate(icicle);
Top of Form
To create an integer variable and assign a value, you would use:
Select one:
a. Int myNumber = 5;
b. myNumber = 5;
c. int myNumber; myNumber = 5;
d. 5 = myNumber;

The correct answer is: int myNumber; myNumber = 5;

Question 2
Correct
Mark 1.00 out of 1.00



When using the keyword private before a variable or a method, it means only the class itself can access the variable or method. What designation would allow access to the variable or the method from any part of the Java program?
Select one:
a. void
b. Integer
c. everyone
d. public

The correct answer is: public

Question 3
Correct
Mark 1.00 out of 1.00



If a method does not return any value, what type would it take?
Select one:
a. Integer
b. String
c. void
d. Intents

The correct answer is: void

Question 4
Correct
Mark 1.00 out of 1.00



What is a basic unit of a Java program or an object?
Select one:
a. method
b. class
c. property
d. public

The correct answer is: class

Question 5
Correct
Mark 1.00 out of 1.00



Which method shows words on a screen?
Select one:
a. System.out.println();
b. printnow();
c. screen();
d. GPS();

The correct answer is: System.out.println();

Question 6
Correct
Mark 1.00 out of 1.00



What type of programming does Java implement?
Select one:
a. object oriented
b. procedural
c. no-SQL
d. relational

The correct answer is: object oriented

Question 7
Correct
Mark 1.00 out of 1.00



Consider the following Java code, then answer: What do we call printFullName() ?

class Student {
private String firstName;
private String lastName;
public Student(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
// Your code goes here
}

public class Main {
public static void main(String[] args) {
Student[] students = new Student[] {
new Student("Morgan", "Freeman"),
new Student("Brad", "Pitt"),
new Student("Kevin", "Spacey"),
};
for (Student s : students) {
s.printFullName();
}
}
}
Select one:
a. function
b. static
c. display feature
d. method

The correct answer is: method

Question 8
Correct
Mark 1.00 out of 1.00



Java expects the start of the program to be in which method?
Select one:
a. private Main {}
b. private my Start(String[] args)
c. public void start()
d. public static void main(String[] args)

The correct answer is: public static void main(String[] args)

Question 9
Correct
Mark 1.00 out of 1.00



The primitive types in Java are byte, short, int, long, float, double, char, boolean. Which one can be used to represent a word like “Hello”?
Select one:
a. char
b. none, the String object should be used
c. double
d. long

The correct answer is: none, the String object should be used

Question 10
Correct
Mark 1.00 out of 1.00



To assign a value, Java uses a single “=” sign, as in x=5. What symbol is used to compare variables or values in an if statement?
Select one:
a. .=
b. =.
c. ++
d. ==

The correct answer is: ==
The simplest Android Widget is a label. What is its name in the layout file?
Select one:
a. TextView
b. android-label
c. label.xml
d. LabelView

The correct answer is: TextView

Question 2
Incorrect
Mark 0.00 out of 1.00



What is a valid property of a label widget?
Select one:
a. TextView
b. android:typeface
c. layout/main.xml
d. LabelView

The correct answer is: android:typeface

Question 3
Incorrect
Mark 0.00 out of 1.00



Given the following code in the layout file, where will the text be displayed in the Android app?
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="You were expecting something profound?"
/>
Select one:
a. bottom left
b. bottom right
c. top left
d. top right

The correct answer is: top left

Question 4


Given the code in the Java file and later in the layout file, what is the Widget being programmed and what is the event?
public void someMethod(View theButton) {
// do something useful here
}
<Button
android:onClick="someMethod"
...
/>
Select one:
a. Button, someMethod
b. theButton, click
c. someMethod, onClick
d. Button, onClick

The correct answer is: Button, onClick

Question 5
Incorrect
Mark 0.00 out of 1.00



What is the Widget created by this code in the layout file?
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/icon"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:adjustViewBounds="true"
android:src="@drawable/molecule"
/>
Select one:
a. image
b. android:id
c. ViewBounds
d. drawable/molecule

The correct answer is: image

Question 6
Correct
Mark 1.00 out of 1.00



The following code creates the EditText Widget. What does this Widget look like in comparison to labels, images, or buttons?

<?xml version="1.0" encoding="utf-8"?>
<EditText xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id="@+id/field"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:singleLine="false"
/>
Select one:
a. large label
b. a drop down list
c. field to type something in
d. checkbox

The correct answer is: field to type something in

Question 7
Incorrect
Mark 0.00 out of 1.00



What Java code can be used on the checkbox Widget?

<?xml version="1.0" encoding="utf-8"?>
<CheckBox xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id="@+id/check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This checkbox is: unchecked" />
Select one:
a. getCheckMark()
b. isChecked()
c. setCheckMark()
d. getMark()

The correct answer is: isChecked()

Question 8


Given the following code of the app, what is the app doing?

Layout file:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
> <TextView
android:id="@+id/selection"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<AutoCompleteTextView android:id="@+id/edit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:completionThreshold="3"/>
</LinearLayout>
The corresponding Java code is:

public class AutoCompleteDemo extends Activity
implements TextWatcher {
TextView selection;
AutoCompleteTextView edit;
String[] items={"lorem", "ipsum", "dolor", "sit", "amet",
"consectetuer", "adipiscing", "elit", "morbi", "vel",
"ligula", "vitae", "arcu", "aliquet", "mollis",
"etiam", "vel", "erat", "placerat", "ante",
"porttitor", "sodales", "pellentesque", "augue", "purus"};
@Override public void onCreate(Bundle icicle) {
super.onCreate(icicle); setContentView(R.layout.main); selection=(TextView)findViewById(R.id.selection); edit=(AutoCompleteTextView)findViewById(R.id.edit); edit.addTextChangedListener(this);

edit.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line,
items));
}
public void onTextChanged(CharSequence s, int start, int before, int count) {
selection.setText(edit.getText()); }
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
// needed for interface, but not used
}
public void afterTextChanged(Editable s) { // needed for interface, but not used
} }
Select one:
a. This application has an error and it will not run.
b. As the user types, matches are shown in a selection list that, like with Spinner, folds down from the field. The user can type in the suggested word.
c. As the user types, the text is comparing the entered text as a prefix against a list of previous entries. This is a spelling wizard.
d. As the user types, the text is treated as a prefix filter, comparing the entered text as a prefix against a list of candidates. Matches are shown in a selection list that, like with Spinner, folds down from the field. The user can either type out an entry (e.g., something not in the list) or choose an entry from the list to be the value of the field.

The correct answer is: As the user types, the text is treated as a prefix filter, comparing the entered text as a prefix against a list of candidates. Matches are shown in a selection list that, like with Spinner, folds down from the field. The user can either type out an entry (e.g., something not in the list) or choose an entry from the list to be the value of the field.

Question 9
Incorrect
Mark 0.00 out of 1.00



What Widgets are being created in this app:

Layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
> <TextView
android:id="@+id/selection"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Spinner android:id="@+id/spinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"
/>
</LinearLayout>
Java code:
public class SpinnerDemo extends Activity
implements AdapterView.OnItemSelectedListener {
TextView selection;
String[] items={"lorem", "ipsum", "dolor", "sit", "amet",
"consectetuer", "adipiscing", "elit", "morbi", "vel",
"ligula", "vitae", "arcu", "aliquet", "mollis",
"etiam", "vel", "erat", "placerat", "ante",
"porttitor", "sodales", "pellentesque", "augue", "purus"};
@Override public void onCreate(Bundle icicle) {
super.onCreate(icicle); setContentView(R.layout.main); selection=(TextView)findViewById(R.id.selection);
Which line is the activity?
Select one:
a. TextLabel, icicle
b. Label, List
c. List, Entry field
d. Spinner, Label

The correct answer is: Spinner, Label

Question 10
Correct
Mark 1.00 out of 1.00



True or False: In Android, the Spinner is the equivalent of the drop-down selector.
Select one:
True
False

The correct answer is 'True'.
Bottom of Form

 

Get Free Quote!

316 Experts Online