AR 18
GIET MAIN CAMPUS AUTONOMOUS GUNUPUR – 765022
B. Tech Degree (6th Semester)
Sub. Code – Sub. Name AAD (Branch Name)
UNIT - I
PART – A: (Multiple Choice Questions) (1 Mark)
[CO#] [PO#]
a. Which file extension is used to save Kotlin files.
(i) .java (ii) .kot
(iii) .kt or .kts (iv) .andriod
b. What is correct way to create an arraylist in Kotlin?
(i) val map = hashMapOf(1 to "one", 2 (ii) enum class Color {RED, GREEN,
to BLUE}
"two", 3 to "three")
(iii) val list = arrayListOf(1, 2, 3) (iv) val set = hashSetOf(1, 2, 3)
c. Which of the following constructors are available in Kotlin?
(i) Primary constructor (ii) Secondary constructor
(iii) Both 1 & 2 (iv) None of the above
d. How to make a multi lined comment in Kotlin?
(i) // (ii) /* multi line comment */
(iii) / multi line comment / (iv) None of the above
e. Which of the following is not the basic data types in Kotlin?
(i) Numbers (ii) Strings
(iii) Arrays (iv) Lists
f. Which of following option is used to handle null exceptions in Kotlin?
(i) Range (ii) Elvis Operator
(iii) Sealed Class (iv) Lambda function
g. Does Kotlin have the static keyword?
(i) Yes (ii) No
h. Kotlin is a .................... programming language, specially designed for developing
mobile
applications.
(i) cross platform (ii) statically typed
(iii) general-purpose (iv) All of the above
i. Which of the following is used to make an abstract class?
(i) Declaring it abstract using (ii) Declaring it abstract using static
virtual keyword.
keyword.
(iii) Making at least one member (iv) Making at least one member
function as virtual function. function as pure virtual function.
j. Which of the following is not a basic datatype in kotlin?
(i) Numbers (ii) Strings
(iii) Arrays (iv) List
PART – B: (Short Answer Questions) (2 Marks)
[CO#] [PO#]
a. How do you declare variables in Kotlin? How does the declaration differ from the
Java
counterpart?
b. Explain about types of Functions in Kotlin?
c. Why is Kotlin preferred over Java?
d. State the advantages of Kotlin?
e. Write a program in kotlin using Lambda function for addition of two numbers?
f. Define null safety in kotlin.
g. Explain about Getters and Setters in Kotlin?
h. Define data class.
i. What is Ranges operator in Kotlin?
j. What is Elvis operator?
PART – C: (Long Answer Questions) (10 Marks)
Marks [CO#] [PO#]
1. a. Create a class for Employee, write a user defined function to accept the 5
attributes of
employee and display the attribute in kotlin.
b. Explain setter and getter function with suitable example in Kotlin. What 5
do you mean by
ternary operator? Explain how if statement is used as ternary operator in
Kotlin?
2. a. Explain with suitable example interface in Kotlin? 5
b. Write the features of Kotlin? 5
3. a. Write a Kotlin function to display all the prime numbers between 1 to 5
100.
b. Explain with suitable example interface in Kotlin? 5
4. a. Write the difference between interface and class in kotlin. 5
b. What are the different types of variables in Kotlin? Explain with 5
examples.
5.a. What are data classes in Kotlin? Explain with a proper example. 5
b. Explain the concept of null safety in Kotlin with suitable example. 5
6.a. Write in detail with example about construct in kotlin. 5
b. Explain about the “when” keyword in the context of Kotlin. 5
UNIT – II
PART – A: (Multiple Choice Questions) (1 Mark)
[CO#] [PO#]
a. android.view : This library contains the basic classes used for developing graphical
user interface and for handling the user’s interaction with the user interface
(i)True (ii)False
b. The following image shows part of the content inside file activity_main.xml in an
Android application:
Which of the following options is correct?
(i) The app user can select one radio button (ii) The app user can select the two radio
only at a time. buttons
at the same time.
(iii) The only purpose of RadioGroup tag is (iv) This is not an XML code; it is a Kotlin code.
adding a group of colors to the inside of the
radio
buttons.
c The.................................... arranges widgets in positions relative to each other.
.
(i) RelativeLayout (ii) Linear Layout
(iii) ConstraintLayout (iv) Table Layout
d Adding a new color to the colors.xml file in Android Studio (/res/values/colors.xml ) helps
. the app developers to use this new color as attribute value for the ..................... attribute in all
these app layouts.
(i) android:textColor (ii) Kotlin:textcolor
(iii) Java:textcolor (iv) color:textformat
e The following Android code displays a Toast message. Which of the following is the correct
. parameter to replace Toast.xyz in this line of code?
Toast.makeText(this,”Message saved as draft”,Toast.xyz).show( )
(i) Toast.LENGTH_LONG (ii) Toast.shortTime
(iii) Toast.sec.4 (iv) Toast.Time.4s
f. Which of the following files has the correct name for a layout design file of an activity in an Android
app?
(i)MainActivity.java or MainActivity.kt (ii) activity_main.xml
(iii) Sample.class (iv) Gradle.sql
g Which of the following is true about the following line of code:
. button.setOnClickListener({ })
(i) It only saves changes in a text field. (ii) It sets the number of clicks the user presses
to run the application.
(iii) The system executes the code you write in (iv) It sets the time and date of run process.
setOnClickListener({ }) after the user presses
the button.
h The following image displays an AndroidManifest.xml file for an Android app. Which of the
. following choices is correct about this file?
(i) This app consists of three activities and (ii) This app consists of two activities and
MainActivity is the launcher activity. Second is the launcher activity.
(iii) This app consists of one activity and (iv) This app consists of two activities and
MainActivity is the launcher activity. MainActivity is the launcher activity.
i Which of the following Android classes can be defined by this statement?
. The user can touch by thumb and drag it left or right to set the current progress level.
(i) Progressbar (ii) TimePickerDialog
(iii) TunnerYbar (iv) SeekBar
j If you want to configure a link between two Android activities in the same Android
. application, you need to use:
(i) Intent (ii) . Gradle
(iii) Toast (iv) Progressbar
PART – B: (Short Answer Questions) (2 Marks)
[CO#] [PO#]
a. What is Android?
b. What Is the Google Android SDK?
c. What is the Android Architecture?
d. Describe the Android Framework.
e. What is AAPT?
f. What is the importance of having an emulator within the Android environment?
g. What is the use of an activityCreator?
h. Describe Activities.
i. What are Intents?
j. What items are important in every Android project?
PART – C: (Long Answer Questions) (10 Marks)
Marks [CO#] [PO#]
1. a. Explain the activity life cycle and callback functions in Android 5
Application.
b. With neat diagram explain the framework architecture of Android? 5
2. a. Explain core building blocks of Android application? 5
b. Write the code for dynamics textview and provide action to the textview in 5
android?
3. Write an android programming to change the layout background color using 10
radio button
(use minimum 3 buttons).
4. Design a simple calculator in android programming which contains 10
buttons(0-9,+,-
,*,÷,=).
5. Create an android application with a login page and a profile page, Perform 10
the following validation
• If username should be
[email protected] HYPERLINK
"mailto:
[email protected]" and password is giet@123
• Username and password should not be blank
On successful validation, the profile page will open with a message
“Welcome : GIET”
6.a. Write an android programming to create an edittext and imagebutton for 5
searching in web
view.
b. Illustrate in detailed about dynamic view in android programming. 5
7.a With neat diagram explain the framework architecture of Android? 5
b. Explain the activity life cycle and callback functions in Android 5
Application.
UNIT – III
PART – A: (Multiple Choice Questions) (1 Mark)
[CO [PO
#] #]
a The SharedPreferences class provides a general framework that lets you save and
. retrieve persistent key-value pairs of primitive data types.
(i) True (ii) False
b Check the following image which is a part of AndroidManifest.xml file, then select which
. of the following choices is the correct description of the gray highlighted color of
this code?
(i) This permission tag allows this app to (ii) This permission tag allows other
connect to the Internet. apps to make remote connection to
this app.
(iii) This permission tag allows this app to (iv) This permission tag has been
connect to its SQLite database. written in the wrong location, it must
be written inside
<application> tag.
c If your Android application creates a SQLite database, which of the following is the
. default directory to save this database file?
(i)/data/data/APP_NAME/databases/DATABASE (ii)dataSQL/data/APP_NAME/datab
_FILE. ases/DATABASE_FILE
(iii)/database/data/APP_NAME/databases/D (iv)/database/SQLite_Data/APP_NA
ATABASE_FILE_SQLApp. ME/databases/DATABASE_FILE.
d. Which of the following classes has methods to create, delete, execute SQLite
commands and perform other common SQLite database management tasks?
(i) SQLiteOpenHelper (ii) SQLiteDatabase
(iii) Cursor (iv) Progressbar
e. What is the main role of adding the following permission tag to AndroidManifest.xml
file in an Android app?
<uses-permission
android:name=”android.permission.ACCESS_FINE_LOCATION”/>
(i) Allow the Android app to access the user’s (ii) Allow the Android app to
precise (exact) location. download Google map database.
(iii) Allow this app to share internal Google (iv) This tag is not enough; you still
map database with another applications need to add another tag which
includes the user name and
password to upload the user’s
location
coordinates to Google map
database.
f Is new a keyword in kotlin
(i) Yes (ii) No
PART – B: (Short Answer Questions) (2 Marks)
[CO#] [PO#]
a. What are content providers
b. How to create tables in SQLite database
c. What are different types of layouts
d. What is a fragment
e. What are fragments Lifecycle states
f. What do you mean by adapter
g. Write down the differences between ListView and RecylerView
h. What is lateinit in Kotlin and when would you use it
i. What is a purpose of Companion Objects in Kotlin?
j. What is the Kotlin double-bang !! operator?
PART – C: (Long Answer Questions) (10 Marks)
Marks [CO#] [PO#]
1. Create an application to display the employee data, stored in SQlite 10
database.
2. Create an application to display the employee details in RecyclerView 10
3. Create an android application to navigate a layout by clicking a button 10
with help of
fragment.
4. a. Create an android application to create 3 buttons with label red,green 5
and blue. On
clicking any button, a textview “Welcome” will be displayed in the
specified colour.
b. Explain the procedure of database connection using sqlite. 5
5.a. Write down the difference between LinearLayout and RelativeLayout. 5
Describe with
example.
b. Explain the procedure to connect to network and what are resources can
utilized , give an
example
UNIT – IV
PART – A: (Multiple Choice Questions) (1 Mark)
[CO#] [PO#]
a. APK stands for -
(i) Android Phone Kit (ii) Android Page Kit
(iii) Android Package Kit (iv) None of the above
b. What does API stand for?
(i) Application Programming Interface (ii) Android Programming Interface
(iii) Android Page Interface (iv) Application Page Interface
c. What is the use of content provider in Android?
(i) For sharing the data between (ii) For sending the data from an
applications application
to another application
(iii) For storing the data in the database (iv) None of the above
d. Which of the following is the built-in database of Android?
(i) SQLite (ii) MySQL
(iii) Oracle (iv) None of the above
e. Which of the following android library provides access to the database?
(i) android.content (ii) android.database
(iii) android.api (iv) None of the above
f. Which of the following method in android is used to log debug messages?
(i) Log.r() (ii) Log.R()
(iii) Log.d() (iv) Log.D()
h. Which Broadcast In Android Includes Information About Battery State Level
(i)Android.intent.action.BATTERY_CHANGED (ii)Android.intent.action.BATTERY_LOW
(iii) Android.intent.action.BATTERY_OKAY (iv)Android.intent.action.CALL_BUTTON
PART – B: (Short Answer Questions) (2 Marks)
[CO#] [PO#]
a. What is portable wi-fi hotspot?
b. What composes a typical Android application project?
c. What is a Fragment. How it is different from Activity ?
d. What is the use of an activity Creator?
e. What is the AndroidManifest.xml?
f. What do you mean by gradle ?
g. What is the role of AVD ?
PART – C: (Long Answer Questions) (10 Marks)
Marks [CO#] [PO#]
1. a. Explain with suitable example use of shared preference in android 5
programming.
b. Write an android program to display a list of data from SQLite database 5
2. a. Explain various classes and functions required for SQLite connection. 5
b. Describe how to use shared preference with an example 5
3. a. Explain the process of storing and retrieve data from SQLite database. 5
b. Describe the way to persist information in an android device
4. a. Explain the process of storing and retrieve data from Firebase database. 5
b. Explain with suitable example for navigation using map API. 5
--- End of Paper ---