01 November 2022

Android Basics with Compose

Build a scrollable list

 

1.      Adaptive launcher icons for Android apps consist of a foreground and background vector drawable.

Correct!

2.      When building a UI that requires a scrolling list with a variable number of items, which Composable should you use?

3.      What file type is used for the launcher icon foreground and background vectors?

Correct!

4.     

Which Composable should you use to create a vertically scrollable grid with an undetermined number of items?

Correct!

5.      The Column composable is not a good option for a list of items of unknown quantity because ___.

6.     

The ___ method is used to add content to a LazyColumn Composable.

7.      Which Composable arranges items horizontally?

8.     

Which Composable arranges items vertically?

31 Oktober 2022

Android Basics with Compose

Interact with UI and state

 

1.      Jetpack Compose runs your composables for the first time, during ___ it will keep track of the composables that you call to describe your UI.

2.      The only way to modify a Composition is through recomposition.

Correct!

3.      ___ is when Jetpack Compose re-executes the composables that may have changed in response to data changes.

Correct!

4.      ___ in an application is any value that can change over time.

5.      ___ is a pattern of moving state up to make a component stateless.

6.      Which KeyboardAction property is used to move the focus to the next composable?

7.      Which of the following Kotlin functions is used to round up a Double or Float?

30 Oktober 2022

Android Basics with Compose

 

More Kotlin fundamentals

1.      Which of the following is a valid way to define a data class in Kotlin?

2.      When using a sealed class, all direct subclasses must be in the same package.

Correct!

3.      When using generics, the generic data type goes inside ___.

4.     

A(n) ___ class is useful when you have a fixed set of values.

Correct!

5.      To create a list object that has the ability to change its size, you would call ___.

Correct!

6.     

Which of the following are higher-order functions?

Choose as many answers as you see fit.

Partially Correct.

Correct!

Correct!

7.      Given the following line of code, which of the following commands will print Blue? (Hint: If you are not sure, try running the code in the Kotlin Playground.)

val colors = listOf("Red", "Green", "Blue")

Choose as many answers as you see fit.

Partially Correct.

Correct!

Correct!

8.      The programming concept of a class that has only one instance is called a ___.

Correct!

9.      Which of the following statements is true regarding sets and maps?

10.  If you have a variable named records, which is a collection, to determine the number of items it contains, you can call ___.

29 Oktober 2022

Android Basics with Compose

 

 

  1. The following code will print "Divisible by 5" if number is equal to 25.

if (number % 10 == 0) {
  println("Divisible by 10")
} else if (number == 5) {
  println("Divisible by 5")
}

.

false

  1. Which of the following conditions are satisfied when x = 5?

Choose as many answers as you see fit.

x == 5

Correct!

x in 1..5

Correct!

x is Int

Correct!

  1. Which is not a basic concept of object-oriented programming

Readability

  1. Which are the four visibility modifiers in Kotlin?

private, protected, public, internal

public, protected, static, internal

  1. The ___ keyword is used to call a method from the parent class.

super

Correct!

  1. A(n) ___ defines properties or methods that a class needs to implement.

Interface

  1. Which of the following is best represented by a nullable type?

An optional profile picture.

A unique ID given to every user.

  1. The ___ operator allows you to call a method only if the object is non-null.

?.

  1. Which is not true of functions in Kotlin?

A function can be changed to another data type, and vice versa.

  1. A function literal is another name for a ___

Lambda expression

Function reference

 

#QUIZ Faktor bentuk

  Faktor bentuk Class ukuran jendela ditentukan oleh seluruh layar fisik untuk multitasking atau segmentasi lainnya. Benar Salah Class ukura...