CS 399 Online Quiz and Activity Questions

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

_______ is a valid value for the orientation attribute of Linear Layout. "@+id/MyLinearLayout" "vertical" "wrap_content" None of the options is correct

"vertical"

In Android Studio the number of layout files created for the Empty Activity template is: 0 1 2 3

1

How many <key, value> pairs are needed to store 3 properties of an Android Activity class instance? 1 3 6 0

3

An instance of a binary three with three internal nodes and four leaf node will be of hight. 3 or 4 3 4 More than 4

3 or 4

Which Android Studio tool is used for creating a device emulator? SDK Manger AVD Manager Layout Manager Configuration Manager

AVD Manager

The Saved Instance State Bundle allows saving and restoring of the Android ____________ class instances. Manifest Constraint Layout Activity TextView

Activity

Which one of the statements are/is true about the following Kotlin expression. Expression: getOrElse (dice[i]) {0} It is a lambda expression It returns a 0 if the index 'I' exceeds the array boundaries It returns the value of 'dice[I]" if 'I' is within the array boundaries All of the options are correct.

All of the options are correct.

Which one of the following is an example of a configuration change for an Android phone? Changing orientation of mobile phone Starting and stopping network connectivity Starting and stopping video buffering All of the options are valid

All of the options are valid

Which one of the followings may not be used as an affordance in software UI? Texture Shadow Button All options listed can be used as affordance.

All options listed can be used as affordance.

An IOT Android app is an example of: An Android application with only one activity An Android application that might not have a visual component Both options are correct Both option are incorrect

An Android application that might not have a visual component

Which one of the followings is not a way for View object to communicate its size to its parent object? match_parent wrap_content An exact number All options are a valid way

An exact number

Two aspects of keeping your installed version of Android Studio up-to-date are keeping the version of Android Studio software and _______ up-to-date, Android Studio Libraries Android Studio Plugins Android Studio Tools None of the above

Android Studio plugins

Which one of the followings is not true regarding Null Safty feature of Kotlin Programing language? Variables are assumed to be non-nullable. Non-nullable variables can not be assigned null value. Variables can be declared to be nullable. Because of this feature you never have null pointer exception.

Because of this feature you never have null pointer exception.

In Android Studio to run a program on an emulator the following selections are required. The SDK version The Virtual Device Both SDK version and the Virtual Device No selection is required

Both SDK version and the Virtual Device

In Android Studio a layout file may be edited using: Design tool Text tool Both design tool and text tool may be used Any text editor

Both design tool and text tool may be used

An activity is popped from the stack when: Back button on the device or on the UI is pushed. When the finish function is called. Both options are correct. Both options are incorrect.

Both options are correct.

Select the list of Android Architecture Concepts (C1 to C8) that are related to monitoring Lifecycle events. C1: Activity Lifecycle Event Handler Functions, C3: LifecycleOwner Interface & C5: savedInstanceState C1: Activity Lifecycle Event Handler Functions, C2: LifecycleObserver Interface & C3: LifecycleOwner Interface C4: Kotlin Companion object & C2: LifecycleObserver Interface C5: savedInstanceState & C6: ViewModel

C1: Activity Lifecycle Event Handler Functions, C2: LifecycleObserver Interface & C3: LifecycleOwner Interface

This feature of Android platform provides a mechanism to store the state of an Activity as <key, value> pairs when the activity is being destroyed. You can use the stored information to restore the state of Activity upon recreation. C4: Kotlin Companion object C5: savedInstanceState C7: Synthetic View Binding C8: FindViewById

C5: savedInstanceState

If you use _______________ for accessing components in the layout files you do not need synthetic view binding imports in your Kotlin file. C4: Kotlin Companion object C5: savedInstanceState C7: Synthetic View Binding C8: FindViewById

C8: FindViewById

This Android Studio Channel is a version of the software with all the latest features and bug fixes but may not be fully ready for production. Canary Channel Dev Channel Stable Channel Beta Channel

Canary Channel

Which Android Studio feature you can use in a constraint layout to evenly distribute 3 widgets? Organize Chain Align Center

Chain

To separate business logic from view controller logic the following Kotlin programing language construct may be used. Synthetic View Binding Companion Object Auto Casting None of the options is correct

Companion Object

In a Kotlin based Android applications this object is the object that provides access to Android application resources in Kotlin code? This it Context None of the options are correct

Context

Which one of the following options below is the selection(s) that must be made when creating an emulator in Android Studio. Device Device and API level API Level HAXM

Device and API level

In the Dice Roll application implementation using the ViewModel architecture the __________ component is responsible for storing application data and performiong operations on its data. DiceViewModel MainActivity Activity_main.xml Content_main.xml

DiceViewModel

In the Dice Roll application implementation using the ViewModel architecture the __________ component publishes application data updates to all subscribers. DiceViewModel MainActivity activity_main.xml content_main.xml

DiceViewModel

In the Dice Roll application implementation using the ViewModel architecture the initialization of the application data (dice and headline) at the start of application is performed in: DiceViewModel MainActivity activity_main.xml content_main.xml

DiceViewModel

You can use _______ as an alternative technique to Kotlin Synthetic Binding feature.

FindViewById

The physical button on your car radio is a ______. Perceived Affordance Bad Affordance Good Affordance All options are incorrect

Good Affordance

Which one of the followings is correct regarding Kotlin language Type system? Select the best option that applies. Kotlin is a dynamic type language Kotlin is a static type language Kotlin is a dynamic type language with type inference. Kotlin is a static type language with type inference.

Kotlin is a static type language with type inference.

Kotlin programming language provides three editions supporting execution of Kotlin programs on three different platforms. Which one of the followings is not among the three editions supported by Kotlin? Kotlin/JVM Kotlin/JS Kotlin/Native Kotlin/Unix

Kotlin/Unix

In the Dice Roll application implementation using the ViewModel architecture the __________ component includes the logic for reflecting data changes in the UI. DiceViewModel MainActivity Activity_main.xml Content_main.xml

MainActivity

In the Dice Roll application implementation using the ViewModel architecture the __________ component mediates between the state of application and the UI. DiceViewModel MainActivity Activity_main.xml Content_main.xml

MainActivity

In the Dice Roll application implementation using the ViewModel architecture the __________ component subscribes to the application data. The subscription notifies the component on the updates to the data. DiceViewModel MainActivity activity_main.xml content_main.xml

MainActivity

Which one of the items below holds a reference to the DiceViewModel. MainActivity activity_main.xml content_main.xml None of the items listed

MainActivity

The Android LifecycleObserver architectural component is based on ___________ GOF pattern. Composite Decorator Observer All options are invalid

Observer

Which one of the followings show the correct sequence of Android Activity object state transitions after a configuration change? Pause, Stop, Destroy, Start, Create, Resume Pause, Stop, Destroy, Create, Start, Resume Pause, Stop, Destroy Pause, Stop, Start, Resume

Pause, Stop, Destroy, Create, Start, Resume

Supports for changing the language of your Android App for internationalization is provided by: Resource values colors component Resource values strings component Resource mipmap component Resource values styles component

Resource values strings component

When an Android application is active on the device it is in ________ activity lifecycle state: Created Started Resumed Paused

Resumed

Methods defined in a Kotlin class companion object are similar to the ________ methods in Java. Private Protected Public Static

Static

For an Android Activity to receive updates on a particular data in a ViewModel it must: i. Have a reference to the ViewModel instance. ii. ___________ the data in the ViewModel. Subscribe to Publish Explicitly access Wait for the next cycle to get

Subscribe to

Activities are grouped into __________ and managed on a last-in first-out basis: States Tasks Container Groups

Tasks

Which one of the followings is not supported by Kotlin built-in types? Numeric Character TextView Array

TextView

The first activity that is added to a task is: The activity with the highest priority The activity that is marked as the LAUNCHER activity in the application manifest The activity that is loaded in the onCreate method of the MainActivity class None of the options are correct

The activity that is marked as the LAUNCHER activity in the application manifest

Which one of the followings is the most critical in the design and implementation of Android application User Interface? UI should be designed to adjust to varying screen size UI should use an appropriate theme (style) UI should be based on new packages supporting UI widgets and functionality None of the items listed are critical

UI should be based on new packages supporting UI widgets and functionality

Versions of Android SDK are uniquely identified by: Version Number Version Name API Level Version Name, Version Number and API Level all uniquely identify a version of SDK.

Version Name, Version Number and API Level all uniquely identify a version of SDK.

Which Android architectural component manages data at runtime? LifecycleObserver Companion Object ViewModel Lmbda Expression

ViewModel

Which architectural component should be used for data management logic? ViewModel LifecycleObserver Android Resource Manifest File

ViewModel

List all the Interfaces that ViewGroup implements.

ViewParent, ViewManager

In the Dice Roll application implementation the UI component that is used by the application user to interact with the application is defined in: MainActivity activity_main.xml content_main.xml None of the items listed

activity_main.xml

Android Studio can be configured to watch for updates through: Dev Channel Beta Channel Stable Channel All channels including: Canary. Dev, Beta and Stable

all

Which statement below is true about virtual machines? Code that runs on a virtual machine is portable across various platforms. Virtual machines provide an isolated environment for execution of programs. Virtual machine code is translated to a physical machine code before execution. All three statements are correct.

all

Which one of the following can be used in Kotlin code to access an Android Studio UI object? The class name android:id attribute android:ems attribute android.name attribute

android:id attribute

Which one of the followings is not a component of the Android project resource module? values mipmap androidManifest layout

androidManifest

Which one of the options below is the library you need to use for the ViewModel Android architectural component? androidx.core:core-ktx androidx.lifecycle:lifecycle-extensions androidx.appcompat:appcompat androidx.appcompat:appcompat

androidx.lifecycle:lifecycle-extensions

Which one of the options below is the library you need to use the ViewModel Android architectural component? com.google.android.material:material androidx.core:core-ktx androidx.lifecycle:lifecycle-extensions androidx.appcompat:appcompat

androidx.lifecycle:lifecycle-extensions

Which one of the software layers below is below the application layer in the Android SW Stack? Drivers Linux Kernel Android Runtime and Libraries Application Framework

application framework

This Kotlin programming language construct can be used to separate the business logic form the visual presentation of Android application. C5: savedInstanceState C7: Synthetic View Binding C8: FindViewById C4: Kotlin Companion object

c4

It is a good practice to the keep all application logic in the view controller (MainActivity) t/f

f

To call a method defined in a companion object you must instantiate the companion object class. t/f

f

Ui is the same as UX. t/f

f

Use of negative affordance is bad design. t/f

f

You cannot change the type of a EditText component at runtime. t/f

f

In Android Studio for each application there is one Gradle build script file that defines the build process. (t/f)

false

You cannot change the orientation of a Linear Layout at runtime.)(t/f)

false

You can add View objects to a Layout View object at runtime.(t/f)

flase

Hardware drivers are part of the which layer in the Android SW Stack? Linux Kernel Android Runtime and Libraries Application Framework Android Runtime

linux kernal

Which one of the software layers below is at the bottom of the Android SW Stack? Application Linux Kernel Android Runtime and Libraries Application Framework

linux kernal

Which one of the following Activity methods is used to restore Android Activity instance properties using the Saved Instance State Bundle?. onSaveInstanceState onCreate onResume onStart

onCreate

Which one of the following Activity methods is used to save the Saved Instance State Bundle? onSaveInstanceState onCreate onDestroy onStart

onSaveInstanceState

In Android applications the following function is used for specifying the layout xml file for the initial screen displayed by the activity. Snackbar.make onOptionsItemSelected setContentView None of the listed functions

setContentView

A ViewModel may be subscribed to by multiple subscribers. t/f

t

Android Runtime (ART) includes core libraries and the Virtual Machine. (t/f)

t

Each Activity in your application can have its own ViewModel. t/f

t

Each Activity in your application can subscribe to more than one ViewModel. t/f

t

Each Activity or Fragment in your application can have its own ViewModel. t/f

t

Lambda expressions enable you to treat functionality as method argument, or code as data. t/f

t

Snackbar message works most reliably with Coordinator Layout as the root UI element of the activity. t/f

t

The Kotlin "'when' construct can be used as a statement or as an expression. t/f

t

The TextInputLayout widget at runtime shows a floating label when the hint is hidden due to user inputting text. t/f

t

Those who work on UX (UX designers) study and evaluate how users feel about a system. t/f

t

To use Synthetic Binding in an Activity class implementation for accessing the view components defined in a layout file, the following conditions must be met. t/f

t

To use the LifecycleObserver Android Architectural Component you must declare a class that implements the LifecycleObserver interface. t/f

t

UX design is the practice of crafting the human touch points of products and services to create useful, meaningful and delightful experiences for users, and business value for the company and customers. t/f

t

Using Snackbar message instead of Toast message makes your application independent of the messaging service provided by Android platform. t/f

t

When subscribing to a data in a ViewModel the subscriber also declares the operation to be performed on the data as part of the subscription. t/f

t

You can have more than one version of Android Studio installed at one time.(t/f)

t

A binary tree data structure can be implemented using Composite Design Pattern where leaf and internal node components in the binary tree respectively map to the leaf and composite class in the GOF composite Pattern structure.(t/f)

true

Android applications can work together to create a user experience.(t/f)

true

Android responds to different screen sizes by adjusting the UI display and provides the best user experience for every screen size for mobile phones and tablets.(t/f)

true

Each Android application in Android Studio has an AndroidManifest.xml file which includes all the components of the application.(t/f)

true

In Android Studio after installation of a new version of Kotlin plugin configuration of applications that were built using older versions of the plugin must be changed to use the new version of the plugin.(t/f)

true

In Android Studio choosing the Project View (instead of Android View) shows the project directory structure as it is stored on the disk.(t/f

true

Kotlin code is first translated to JavaByteCode and then JavaByteCode is translated to DaxByteCode. (t/f)

true

Which one of the Kotlin variable declarations is invalid? var myNum: Int = 5; val myNum: Int = 5 var myNum = 5 var myNum

var myNum

Explain the use of class in the object-oriented paradigm. How does it relate to objects (class instances)?

· A class or abstract class factor out commonalities (property, behavior and interfaces) for inheritance by subclasses. · A class is used as a template for creating objects (instance of the class)

Elaborate on the meaning of a subclass/superclass relationship.

· A subclass inherits all characteristics and behavior of its super class. An instance of a subclass is also an instance of all classes that appear in the class hierarchy of the subclass

4. Explain the use of interface in object-oriented programming languages. How does it relate to objects (class instances)?

· Form of abstraction supported by many object-oriented languages · Declares a set of methods for a class to implement · Does not include any functionality

The ViewGroup class is a subclass of the View class. Does this imply that instances of a ViewGroup class includes instances of View?

· No.


संबंधित स्टडी सेट्स

MTSA 2016, Pediatrics/PACU, Exam #3

View Set

Pharmacology study guide WITH RATIONALE

View Set

Refererad smärta - huvud, nacke

View Set

Nutrition; Fifth Edition; Chapter 2; Nutrition Guidelines and Assessment

View Set

Principles of Micro-Economics (ECON 2113) EXAM 2

View Set

Anatomy and Physiology Bone Muscle Lecture Test

View Set