COURSE 11: ANDROID APP CAPSTONE QUIZ ANSWER
Week 3: Project Assessment
Meta Android Developer Professional Certificate
Complete Coursera Answers & Study Guide
Click to Enroll in Coursera Meta Front-End Professional Certificate
TABLE OF CONTENT
Project Assessment INTRODUCTION
In this module you will be assessed on the fundamental skills covered as you build the Capstone Project’s functionality. You’ll participate in a peer review, as well as work through a solution to some of the most challenging parts of the Capstone Project. At the end of this module, you’ll complete a graded assessment.
Learning Objectives
- Synthesize the skills from this course and evaluate other learners
- Reflect on the course project’s content and on the learning path that lies ahead
PROJECT SELF-REVIEW
1. Have you completed all the exercises in this course?
- Yes (CORRECT)
- No
Congratulations on completing this part of the capstone project!
2. Have you check and tested all the code in the capstone project?
- Yes (CORRECT)
- No
Congratulations on completing this part of the capstone project!
3. Did you add your final commit and push the final code changes to GitHub?
- Yes (CORRECT)
- No
Congratulations on completing this part of the capstone project!
4. Which of the following functions will filter menu items with fish in the menu item tile?
- items.filter { it.title.contains(“fish”) } (CORRECT)
- items.filterTitle { it.title.contains(“fish”) }
That’s correct. This function will filter menu items with fish in the title.
5. The following function will filter menu items by the title attribute?
- items.filter { it.title.contains(“Lemon”) }
- True
- False (CORRECT)
That’s correct. The filter function allows to filter by a given attribute.
6. In this course, you have been asked to create a Profile screen. What content does the Profile screen contains? Select all that apply.
- Login button
- Log out button (CORRECT)
- User details (CORRECT)
- Register button
That’s correct. This button is present on the Profile screen.
That’s correct. All user details including first name, last name and email are present on the Profile screen.
7. Which annotations are used to decode the JSON file?
- @Serializable (CORRECT)
- @SerialName (CORRECT)
- @SerialProperty
- @KotlinSerializable
That’s correct. The Serializable name annotation is used for the Kotlin class.
That’s correct. The SerialName name annotation is used for the Kotlin property.
FINAL GRADED QUIZ
1. When would you choose to use Room instead of SharedPreferences?
- When the data structure is complex (CORRECT)
- When you want data to be persisted on device restart
- When you want better performance
That’s correct. Room is more appropriate when the data structure is complex.
2. Navigation in Compose is performed using _____.
- Compose Navigate
- Intent
- The Navigation component (CORRECT)
That’s correct. Navigation in Compose is performed using the Navigation component.
3. Consider the following snippet:
listOf("John", "George", "Paul", "Ringo").map { "Beatle $it" }
What elements would this code return?
- “John”, “George”, “Paul”, “Ringo”
- “Beatle John”, “George”, “Paul”, “Ringo”
- “Beatle”, “Beatle”, “Beatle”, “Beatle”
- “Beatle John”, “Beatle George”, “Beatle Paul”, “Beatle Ringo” (CORRECT)
That’s correct. This is the result of map applying the provided transformation to all elements.
4. What will the following code snippet render on the screen if name = “James”?
@Composable
fun Greeting(name: String) {
Text("Hi $name")
}
- The text “Hi James” (CORRECT)
- The text “Hi $name”
- The text “Greeting James”
That’s correct. Greeting will pass “Hi James” to the Text Composable, which will display that string.
5. What is the result of calling Ktor’s httpClient.get()?
- A parsed JSON
- A response body
- An HttpResponse (CORRECT)
That’s correct. Calling get returns an HttpResponse, out of which the body of the response can be obtained.
6. What database type does Room use?
- A key/value database
- CSV
- SQL (CORRECT)
- A document database
That’s correct. Room uses SQLite, which is a SQL database.
7. What does remember do in Jetpack Compose?
- Store a value in memory (CORRECT)
- Makes the state mutable
- Shares the state with other Composables
That’s correct. remember caches a value in memory.
8. A collection that allows adding, deleting and updating elements is a _____ collection.
- Fixed
- Immutable
- Dynamic
- Mutable (CORRECT)
That’s correct. A mutable collection allows modifications while an immutable one does not.
9. Fill in the blank: extension functions allow you to extend __________.
- Classes (CORRECT)
- Any function
- Variables
- Interfaces (CORRECT)
That’s correct. Extension functions allow you to extend classes.
That’s correct. Extension functions allow you to extend interfaces.
10. To navigate in Compose, you call navigate. On what component do you call navigate?
- NavHost
- Intent
- NavController (CORRECT)
That’s correct. NavController is responsible for navigating when you call navigate.
11. Consider the following snippet. How will it look on the screen?
@Composable
fun TwoTexts() {
Column {
Text("First text")
Text("Second text")
}
}
- “First text” and under it “Second text” (CORRECT)
- “First text” on the left and “Second text” on the right
- “First text” and “Second text” overlapping each other
That’s correct. Column organizes its nested Composables vertically. If you wanted to organize them horizontally, you could use Row.
12. What is a common attribute of SharedPreferences and Room?
- They both store data (CORRECT)
- Their persisted data survives device restarts (CORRECT)
- They are designed to persist simple data
- They are designed to persist complex data
That’s correct. Both SharedPreferences and Room are used to store data.
That’s correct. Both SharedPreferences and Room are designed to persist data across device restarts.
13. How is navigation performed in Compose?
- Using the Navigation component (CORRECT)
- Using Intent
- Using Compose Navigate
That’s correct. Navigation in Compose is performed using the Navigation component.
14. What is a Composable?
- A function that emits a UI element (CORRECT)
- A class that describes a UI element
- A block of data describing a UI element
That’s correct. A Composable is a function annotated with @Composable that emits a UI element.
15. Fill in the blank: Room is built on top of _______.
- MongoDB
- MySQL
- SQLite (CORRECT)
That’s correct. Room is built on top of SQLite.
16. How do you store a value in memory in Jetpack Compose?
- store
- cache
- remember (CORRECT)
- save
That’s correct. remember caches a value in memory.
17. Select all the valid Kotlin collection types below:
- Grid
- List (CORRECT)
- Set (CORRECT)
- Map (CORRECT)
That’s correct. List is a valid Kotlin collection.
That’s correct. Set is a valid Kotlin collection.
That’s correct. Map is a valid Kotlin collection.
18. How can you extend a final class?
- By creating a class that implements it
- Using an extension function (CORRECT)
That’s correct. Extension functions allow you to extend classes.
19. In JUnit4, what annotation do you use before each test function?
- @Test (CORRECT)
- @Mock
- @Case
- @RunWith
That’s correct. @Test is used before each test function in JUnit4.
Subscribe to our site
Get new content delivered directly to your inbox.
Quiztudy Top Courses
Popular in Coursera
- Meta Marketing Analytics Professional Certificate.
- Google Digital Marketing & E-commerce Professional Certificate.
- Google UX Design Professional Certificate.
- Meta Social Media Marketing Professional Certificate
- Google Project Management Professional Certificate
- Meta Front-End Developer Professional Certificate
Liking our content? Then, don’t forget to ad us to your BOOKMARKS so you can find us easily!