-
Thông tin
-
Hỏi đáp
Đề thi giữa kỳ IT4785E| Môn Phát triển ứng dụng cho thiết bị di động| Trường Đại học Bách Khoa Hà Nội
Đề thi giữa kỳ IT4785E| Môn Phát triển ứng dụng cho thiết bị di động| Trường Đại học Bách Khoa Hà Nội. Tài liệu gồm 13 trang giúp bạn ôn tập và đạt kết quả cao trong kỳ thi sắp tới. Mời bạn đọc đón xem.
Môn: Phát triển ứng dụng cho thiết bị di động
Trường: Đại học Bách Khoa Hà Nội
Thông tin:
Tác giả:
Preview text:
12/6/23, 5:50 PM
Exam | 20231_MobileProgramming_Midterm_Exam | IT4785E Courseware | MOOC daotao.ai End My Exam 0:45:02
You are taking "20231_MobileProgramming_Midterm_Exam" as a timed exam. The timer on the right shows the time remaining in the exam.
To receive credit for problems, you must select "Submit" for each problem before you select "End My Exam". Show Less
Course Exams 20231_MobileProgramming_Midterm_Exam Exam
This section is a prerequisite. You must complete this section in order to unlock additional content. Exam
Midterm Exam due Dec 6, 2023 19:00 +07 Question #674b3e 1/1 point (graded)
What is the intent action to open a web page? Intent.ACTION_ACCESS_INTERNET Intent.ACTION_WEB_VIEW Intent.ACTION_MAIN Intent.ACTION_GET_CONTENT Intent.ACTION_VIEW Submit Correct (1/1 point) Question #865 e 1/1 point (graded)
Which of following is wrong about implicit intent?
To call implicit, you have to know the class name of the destination activity
Android runtime will open the app chooser if there exists more than one candidate for the implicit intent
Android runtime receive the requests and try to nd the matched application
Android runtime keeps list of application registering to run the implicit intent Submit Correct (1/1 point) Question #f1db78 1/1 point (graded)
An activity contains the following code in onCreate(). What will happen when this code is executed, if the intent property is null?
val message = intent.extras?.getString("message").toString()
The app will not crash because the extras property is accessed safely using ?.
The app will crash because it attempted to access a null object.
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/ca45ed1bed614e53ad1264647f7bb919/?activate_block_id=block-v1%3ASoICT%2BIT… 1/13 12/6/23, 5:50 PM
Exam | 20231_MobileProgramming_Midterm_Exam | IT4785E Courseware | MOOC daotao.ai
The app will not crash because the extras property is accessed unsafely using ?. 0:45:02 T Y h o e u a a p rep t w a i k lil n c gr a " s 2 h 0 b 2 e 31ca _ u M s o e b iilt e a P trte o m gr p a t med mi t n o g a _ c Mc i e d s t s er th m e _ e E x x t a ra m"s p asr o a p t e i rt m y e o d n e xa nu m. ll T o h b e je ti ct
m .er on the right shows the time remaining in the exam.
To receive credit for problems, you must select "Submit" for each problem before you select "End My Exam". Submit Correct (1/1 point) Question #f1d872 1/1 point (graded)
What is the purpose of implicit intent?
to close an activity in other application
to open an service in current application
to open an activity in other application
to open an activity in current application Submit Correct (1/1 point) Question #3811af 1/1 point (graded)
Overdiding the callback onSaveInstanceState is not suitable in which situation?
save some states of Activity and restore latter when there is a device con guration changed
save some states of Activity and restore latter when user rotates the device screen
save some states of Activity and restore latter when user changes the language of the device
store data into SD card to permanently use latter Submit Correct (1/1 point) Question #7df36e
1 point possible (graded, results hidden)
Which is a possible way/language to develop Android application? Native approach: Java/Kotlin Web-based approach
Universal Windows Platform (UWP) approach Object C Flutter
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/ca45ed1bed614e53ad1264647f7bb919/?activate_block_id=block-v1%3ASoICT%2BIT… 2/13 12/6/23, 5:50 PM
Exam | 20231_MobileProgramming_Midterm_Exam | IT4785E Courseware | MOOC daotao.ai Submit 0:45:02
You are taking "20231_MobileProgramming_Midterm_Exam" as a timed exam. The timer on the right shows the time remaining in the exam.
To receive credit for problems, you must select "Submit" for each problem before you select "End My Exam". Answer submitted. Question #85f45a 1 point possible (graded)
Which of the following are true about abstract classes?
They can be extended by subclasses and implementations can be provided for abstract members of the class.
They have an implementation for all of their properties and functions.
They may have abstract properties or abstract functions. They can be instantiated.
They are not fully implemented and cannot be instantiated.
They need to be marked with the open keyword to be extended. Submit Question #2d341d 1 point possible (graded)
Both Toast and Logcat can be used to debug the program, which expression bellow is wrong?
Toast displays information at device while Logcat displays information at the host
Logcat only display information that developer logs out
Logcat can not be shown on computer without connection between the computer and the Android device
Toast can be used to display some guidelines for user Submit Question #8293fe 1 point possible (graded)
Which of the following is a bene t of using fragments?
Navigation between fragments allows for more sophisticated user interface patterns, such as tab bars.
Using multiple fragments within an activity allows for an adaptive layout across multiple screen sizes.
The same fragments can be reused across multiple activities.
Frragment is more lightweight than ACtivity sothat we should use Fragment rather than Submit Question #a55108 1 point possible (graded)
What is the advantage of Android development environment compare to iOS development environment? the UI experience is better
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/ca45ed1bed614e53ad1264647f7bb919/?activate_block_id=block-v1%3ASoICT%2BIT… 3/13 12/6/23, 5:50 PM
Exam | 20231_MobileProgramming_Midterm_Exam | IT4785E Courseware | MOOC daotao.ai
can develop app on several operating systems 0:45:02 e Y a o s u ie a r t e o t t a e kisnt go"n 2 re 0 a 2 l 3 d 1 e _ v M ic o e bi s
leProgramming_Midterm_Exam" as a timed exam. The timer on the right shows the time remaining in the exam.
To receive credit for problems, you must select "Submit" for each problem before you select "End My Exam".
can use several IDEs for app development Submit Question #b0491d 1 point possible (graded)
Which of the following is true about Gradle?
Gradle is an automated build system used by Android Studio to build your apps.
Gradle handles installing your app on a device
Your app’s build.gradle le is written in XML.
You can con gure Android-speci c options for your project in your app’s build.gradle le.
The gradle con guration for your project cannot change after you initially create the project. Submit Question #febc95 1 point possible (graded)
Which of the following statements about app icons are true?
It is su cient to provide a single bitmap image of your app icon in your project to make it appear high quality on a range of Android devices.
mdpi, hdpi, xhdpi, xxhdpi, and xxxhdpi are density quali ers for resource directories to indicate that these are resources to be used on
devices with a speci c screen density.
Adaptive icons are made up of a foreground and background layer, and an OEM mask will be applied on top of them.
Vector drawables only work for a certain screen density and should not be scaled. Submit Question #8ba9db 1 point possible (graded)
Suppose we have an image named "mobile.png" in the res/drawable folder, and we have an ImageView in the activity layout, which method could
be used to set the image source for the ImageView as the image mobile.png setImageResource(R.id.mobile)
setImageResource(R.drawable.mobile)
setImageDrawable(R.drawable.mobile)
setImageResource(R.drawable.mobile.png) Submit Question #05bb2f 1 point possible (graded)
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/ca45ed1bed614e53ad1264647f7bb919/?activate_block_id=block-v1%3ASoICT%2BIT… 4/13 12/6/23, 5:50 PM
Exam | 20231_MobileProgramming_Midterm_Exam | IT4785E Courseware | MOOC daotao.ai
Which value of the property scaleType of the ImageView allows us to keep remaining the aspect ratio (the image will not be croped)? 0:45:02
You are taking "20231_MobileProgramming_Midterm_Exam" as a timed exam. The timer on the right shows the time remaining in the exam. centerInside
To receive credit for problems, you must select "Submit" for each problem before you select "End My Exam". tXY centerCrop center Submit Question #d7c1b1 1 point possible (graded)
Which of the following is not a challange for Android application development?
The deverloper may have to use di erent development tools in di erent OS
The application must have compatibility with several di erent versions of Android
The application mus be designed for multiple resolutions
Source code and user's data must be secured Submit Question #c4ad85 1 point possible (graded)
Which of the following tasks can be performed in onCreate() ?
Con guring views, such as setting the layout manager of a recycler view
Determining the items to be shown in the options menu.
Setting the onClickListener for items in the options menu.
Getting extras from the intent that launched the activity. Submit Question #aaaa37 1 point possible (graded)
The ( ll in the blank with case sensitive) Answer:
method needs to be overridden in the host activity to ensure your app’s fragment-based navigation responds to the app’s "Up" button? Submit Question #1e1bf6 1 point possible (graded)
The 'when' statement in Kotlin is similar to which statement in other programming languages? continue
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/ca45ed1bed614e53ad1264647f7bb919/?activate_block_id=block-v1%3ASoICT%2BIT… 5/13 12/6/23, 5:50 PM
Exam | 20231_MobileProgramming_Midterm_Exam | IT4785E Courseware | MOOC daotao.ai break 0:45:02 s Yw o i u t c a h
re taking "20231_MobileProgramming_Midterm_Exam" as a timed exam. The timer on the right shows the time remaining in the exam.
To receive credit for problems, you must select "Submit" for each problem before you select "End My Exam". if Submit Question #226241 1 point possible (graded)
If you activity has the name: SampleActivity, what is the name of the binding class which is generated automatically by Android when you
con gure your application as data binding enable? sample_activity_binding ActivitySampleBinding activity_sample_binding SampleActivityBinding Submit Question #10afe5 1 point possible (graded)
The RadioGroup class is directly inherited from which class? LinearLayout RelativeLayout android.widget.view ConstrainLayout ViewGroup Submit Question #8e524e 1 point possible (graded)
In the fragment lifecycle, which of the following tasks should be performed in onViewCreated() ? Inflating the layou
Binding view objects to properties in your fragment Con guring the options menu
Setting properties of individual views, such as a recycler view’s adapter Submit Question #a5de4f 1 point possible (graded)
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/ca45ed1bed614e53ad1264647f7bb919/?activate_block_id=block-v1%3ASoICT%2BIT… 6/13 12/6/23, 5:50 PM
Exam | 20231_MobileProgramming_Midterm_Exam | IT4785E Courseware | MOOC daotao.ai
If you override onCreateOptionMenu callback in your activity, which menu are you going to create? 0:45:02
You are taking "20231_MobileProgramming_Midterm_Exam" as a timed exam. The timer on the right shows the time remaining in the exam. Popup Menu
To receive credit for problems, you must select "Submit" for each problem before you select "End My Exam". ActionBar Menu Context Menu Navigation Drawer Menu Submit Question #abf1d1 2 points possible (graded)
Given following code, select the correct : val address =
Select an option Answer:
.parse("https://soict.hust.edu.vn")
val intent:Intent = Intent(Intent.ACTION_VIEW, Select an option Answer: ) startActivity(intent) Submit Question #d757ef 1 point possible (graded)
What is the language to program Android natively (select all correct answers)? Java HTML, CSS, Javascript Kotlin C/C++ Submit Question #52b8a6 1 point possible (graded)
Suppose we write an application to survey the hobby of people (there are 5 hobbies to be surveyed), one person may have several hobbies. Which
input controls is suitable for this purpose? RadioButton Recycler View DropDownList ListView
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/ca45ed1bed614e53ad1264647f7bb919/?activate_block_id=block-v1%3ASoICT%2BIT… 7/13 12/6/23, 5:50 PM
Exam | 20231_MobileProgramming_Midterm_Exam | IT4785E Courseware | MOOC daotao.ai Checkbox 0:45:02
You are taking "20231_MobileProgramming_Midterm_Exam" as a timed exam. The timer on the right shows the time remaining in the exam.
To receive credit for problems, you must select "Submit" for each problem before you select "End My Exam". Submit Question #ccbe41 1 point possible (graded) Fill in the blank The Answer:
is called when you create an instance of a class. Submit Question #adfc6e 1 point possible (graded)
When is the current Activity reset, i.e., the onCreate callback is called again? user rotates the phone
user changes the language of the phone
user presses the home button and opens another app
the phone is going to out of battery Submit Question #bd37a0 1 point possible (graded)
Android typically takes name of some popular cakes to name the Android version.
From which version, cakes' name is not taken for Android version? Android 11 Android 9 Android 10 Android 8 Submit Question #8faed3 1 point possible (graded)
How to shutdown/ nish an activity? destroy() nish()
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/ca45ed1bed614e53ad1264647f7bb919/?activate_block_id=block-v1%3ASoICT%2BIT… 8/13 12/6/23, 5:50 PM
Exam | 20231_MobileProgramming_Midterm_Exam | IT4785E Courseware | MOOC daotao.ai dispose() 0:45:02 Y n o ius h a A r c e t t i avkity n (
g )"20231_MobileProgramming_Midterm_Exam" as a timed exam. The timer on the right shows the time remaining in the exam.
To receive credit for problems, you must select "Submit" for each problem before you select "End My Exam". Submit Question #e5a25 1 point possible (graded)
Which widget view could be used to make a clickable object with image content? Button ImageButton ImageView Image TextView Submit Question #0c26 1 point possible (graded)
If we have some buttons in one Activity, and all the buttons set the event onClickListener to the Activity by calling setOnClickListener(this) . So, in
the callback function onClick of the Activity, how do you know which button is clicked?
based on the order of buttons inside the xml layout le
based on the name of each button
based on the position of each button based on the id of each button Submit Question #51f 1 point possible (graded)
Which is the direct parent class of the Button class? android.widget.View android.view.TextView android.view.View android.widget.TextView Submit Question #c7 1 point possible (graded)
Which of following components belong to android native library?
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/ca45ed1bed614e53ad1264647f7bb919/?activate_block_id=block-v1%3ASoICT%2BIT… 9/13 12/6/23, 5:50 PM
Exam | 20231_MobileProgramming_Midterm_Exam | IT4785E Courseware | MOOC daotao.ai 1) Webkit 0:45:02 2) Op Y e o n u G aL
re taking "20231_MobileProgramming_Midterm_Exam" as a timed exam. The timer on the right shows the time remaining in the exam.
To receive credit for problems, you must select "Submit" for each problem before you select "End My Exam". 3) SQLite 4) Dalvik 5) OpenUI 1,3,4 1,2,3 1,2,5 3,4,5 Submit Question #7 1 point possible (graded)
What are correct callback functions of Android activity life cycle?
onCreate(), onInit(), onStart(), onPause(), onStop(), onDestroy(), onResume()
onCreate(), onStart(), onResume(), onPause(), onStop(), onRestart(), onDestroy()
onCreate(), onStart(), onPause(), onResume(), onFinish(), onStop(), onDestroy()
onCreate(), onStart(), onActivityStarted(), onResume(), onPause(), onStop(), onActivityDestroy(), onDestroy() Submit Question #955737 1 point possible (graded)
To make the EditText allows password characters (e.g., display * instead of the real character), you have to set the value of the inputType property
as (type your answer with case sensitive) Answer: Submit Question #30a624 1 point possible (graded)
Why use the Material Components for Android library?
It provides widgets that follow the Material Design guidelines such as text elds and switches.
It makes your code compile faster.
It provides default Material themes that you can use directly or extend and then customize.
It automatically suggests ways for your app to look better.
It helps you more quickly build beautiful user experiences.
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/ca45ed1bed614e53ad1264647f7bb919/?activate_block_id=block-v1%3ASoICT%2BI… 10/13 12/6/23, 5:50 PM
Exam | 20231_MobileProgramming_Midterm_Exam | IT4785E Courseware | MOOC daotao.ai Submit 0:45:02
You are taking "20231_MobileProgramming_Midterm_Exam" as a timed exam. The timer on the right shows the time remaining in the exam.
To receive credit for problems, you must select "Submit" for each problem before you select "End My Exam". Question #39be58 1 point possible (graded) Given following code:
val intent = Intent([ ], Uri.parse("123456789"))
intent.putExtra("sms_body", "hello") startActivity(intent) what could be lled in the [ ]? Intent.ACTION_SEND_SMS Intent.ACTION_SEND Intent.ACTION_SEND_MULTIPLE Intent.ACTION_SENDTO Submit Question #da65fd 1 point possible (graded)
What is the flexible point of Android devices compare to iOS ones? user data is more secured
can connect to multiple peripheral devices such as mouse or keyboard
backup and restore data easily with cloud services
allow to install apps from third party sources (not from Google play store) Submit Question #1f9817 1 point possible (graded)
Which kind of menu will be opened if user presses and hold for a while? Instant Menu Context Menu Drawer Menu Option Menu Submit Question #7ae844 1 point possible (graded)
True or False: onCreateView() is only called once for a fragment’s entire lifecycle?
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/ca45ed1bed614e53ad1264647f7bb919/?activate_block_id=block-v1%3ASoICT%2BI… 11/13 12/6/23, 5:50 PM
Exam | 20231_MobileProgramming_Midterm_Exam | IT4785E Courseware | MOOC daotao.ai true 0:45:02 fa Yols u e
are taking "20231_MobileProgramming_Midterm_Exam" as a timed exam. The timer on the right shows the time remaining in the exam.
To receive credit for problems, you must select "Submit" for each problem before you select "End My Exam". Submit Question #21d578 1 point possible (graded)
What is the function to open new activity from the current activity? newActivity beginActivity startActivity openActivity Submit Question #b3debb 1 point possible (graded)
The res folder does not include which following resources?
le to de ne dependence libraries used in project
le to de ne strings, colors used in project
le to de ne demensions used in project
le to de ne the menu structure used in project Submit Question #28779a 1 point possible (graded) What are lambdas in Kotlin?
A lambda is an expression that describes a function. But instead of declaring a named function, you declare a function that has no name
A lambda is a Class type in Kotlin
A lambda is an Interface in Kotlin
A lambda is a Data Type in Kotlin Submit Question #a5ec76 1 point possible (graded)
Where to con gure the home activity - the rst activity to be run in your application? in the AndroidManifest.xml in the project level gradle le
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/ca45ed1bed614e53ad1264647f7bb919/?activate_block_id=block-v1%3ASoICT%2BI… 12/13 12/6/23, 5:50 PM
Exam | 20231_MobileProgramming_Midterm_Exam | IT4785E Courseware | MOOC daotao.ai in the MainActivity.kt 0:45:02 in Y o tuh e a rm e o t d a u ki le n gle " v 2 e 0 l 2g 3r1ad _ l Me ob lie
l Programming_Midterm_Exam" as a timed exam. The timer on the right shows the time remaining in the exam.
To receive credit for problems, you must select "Submit" for each problem before you select "End My Exam". Submit Question #d453f0 1 point possible (graded)
What is the default return type of any functions de ned in Kotlin?
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/ca45ed1bed614e53ad1264647f7bb919/?activate_block_id=block-v1%3ASoICT%2BI… 13/13