wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AMAD Exam

Total questions: 30

Worksheet time: 39mins

Name
Class
Date
1.

What is the key advantage of Jetpack Compose over traditional Android development?

a)
Jetpack Compose does not support animations or transitions.
b)
Jetpack Compose is only compatible with older Android versions.
c)
Jetpack Compose requires more boilerplate code than traditional methods.
d)
The key advantage of Jetpack Compose is its declarative UI approach, which simplifies UI development and enhances code readability.
2.

What is the first step in creating a new Jetpack Compose project?

a)
Open Android Studio and select 'New Project'.
b)
Download Jetpack Compose from the internet.
c)
Create a new file in the project directory.
d)
Select 'Open Existing Project' in Android Studio.
3.

Which layout file is used in the Jetpack Compose project?

a)

activity_main.xml

b)

content_main.xml

c)

main_layout.xml

d)

None of the choices

4.

What is the equivalent of a TextView in Jetpack Compose?

a)
Text
b)
Label
c)
Button
d)
TextField
5.

How is the text "Hello World" displayed on the screen?

a)

By using a TextView element

b)

By calling the setText() method

c)

By passing the string "Hello World" to the Text() composable

d)

By defining a string variable with the value "Hello World"

6.

What composable is used to arrange UI elements in a horizontal line?

a)
Grid
b)
Row
c)
Column
d)
Stack
7.

What composable is used to arrange UI elements in a vertical line?

a)
Row
b)
Grid
c)
Column
d)
Box
8.

What is the equivalent of a Button in Jetpack Compose?

a)
Button
b)
Switch
c)

ButtonView

d)

Clickable

9.

What is the purpose of the setcontent() method?

a)
To set the content of a message or object.
b)
To delete the content of a message or object.
c)
To retrieve the content of a message or object.
d)
To initialize a message or object with default content.
10.

What is the main advantage of using Jetpack Compose for UI development?

a)

It allows for more complex UI designs.

b)
It requires extensive XML layout files.
c)
It is only compatible with older Android versions.
d)

It simplifies UI development and makes it more efficient.

11.

What is the purpose of the Modifier object in Jetpack Compose?

a)
To create new UI components in Jetpack Compose.
b)
To handle user input events in Jetpack Compose.
c)
To manage state in Jetpack Compose.
d)

To apply styling and layout properties to composables

12.

Which composable is used for the email and password input fields?

a)

TextField

b)

OutlinedTextField

c)

InputBox

d)

Text

13.

How is the spacing between the social media login icons managed?

a)

By using the spaceAround modifier

b)

By using the spaceBetween modifier

c)

By using the spaceEvenly modifier

d)

By manually setting margins on each icon

14.

What is the purpose of the remember function in Jetpack Compose?

a)

To store data that persists across recompositions

b)

To define animations for UI elements

c)

To handle user input events

d)

To create reusable UI components

15.

How are the values entered in the email and password fields stored?

a)

In global variables

b)

In local variables within the composable function

c)

In a database

d)

In MutableState objects

16.

What is the key component responsible for managing navigation in Jetpack Compose?

a)
NavDestination
b)
NavController
c)
NavHost
d)
NavGraph
17.

Which function is used to create a new NavController instance within a composable?

a)
initializeNavController()
b)
createNavController()
c)
rememberNavController()
d)
newNavController()
18.

How are arguments passed from one screen to another during navigation?

a)

By using the putExtra() method

b)

By appending them to the route string

c)

By using shared preferences

d)

By passing them as function parameters

19.

What is the purpose of the onClick parameter in the Button composable?

a)

To define the action to be performed when the button is clicked

b)

To set the text displayed on the button

c)

To change the color of the button

d)

To disable the button

20.

What is the purpose of the Text composable in Jetpack Compose?

a)
To display and customize text in a Jetpack Compose UI.
b)
To create animations in Jetpack Compose.
c)
To manage state in a Jetpack Compose application.
d)
To handle user input in Jetpack Compose.
21.

Which of the following variable declarations is valid?

a)

var hello: Int? = ""

b)

String "hello" = hello

c)

val hello = "hello"

d)

hello: String = "hello"

22.

It is considered best practice to declare a variable that will not change using var instead of val.

a)
True
b)
False
23.

Which of the following are valid ways to update a variable? (Choose as many answers as you see fit.)

a)


total++

b)

total - 1

c)

total--

d)

total = total + 1

24.

In Kotlin, comments can be single or multi-line and are ignored by the compiler.

a)

True

b)

False

25.

Which of the following is not a data type in Kotlin?

a)

String

b)

Decimal

c)

Int

d)

Boolean

26.

Float also represents a decimal, but is less precise than Double.

a)

True

b)

False

27.

In Kotlin, the entrypoint of a program is the ___.

a)

println() statement

b)

val variable

c)

return statement

d)

main() function

28.

Which of the following are true about function return values?

(Choose as many answers as you see fit)

a)


If a function does not specify a return type, the return type is Unit.

b)

A return value can be stored in a variable.

c)


Functions with a return type of Unit must include a return statement.

d)

A return value's type must match the return type of a function.

29.

Which of the following are true about functions?

(Choose as many answers as you see fit)

a)


Functions can take parameters, or variables as inputs.

b)


Function parameters are required to have default arguments.

c)

When calling a function with parameters, the values passed in are called arguments.

d)

Breaking up your code into separate functions makes your code easier to maintain.

30.

With named arguments, you can change the order in which you pass arguments into a function.

a)
False
b)
True