100% found this document useful (1 vote)
546 views

Cit 3211 Computer Application Programming Question Paper-1

The document contains questions for a mobile application programming exam, focusing on Android development. It includes questions about: - Key aspects of the Android operating system like its origins at Google, the Open Handset Alliance, and different Android OS versions. - Common Android UI elements like scroll views, layouts, screen orientations, and widgets. - Using Android tools like the SDK and emulator. - Core Android app development topics - activities, intents, permissions, and architecture. - Examples of building lists and using intents to make phone calls and open URLs.

Uploaded by

Sammy Kipkosgei
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
546 views

Cit 3211 Computer Application Programming Question Paper-1

The document contains questions for a mobile application programming exam, focusing on Android development. It includes questions about: - Key aspects of the Android operating system like its origins at Google, the Open Handset Alliance, and different Android OS versions. - Common Android UI elements like scroll views, layouts, screen orientations, and widgets. - Using Android tools like the SDK and emulator. - Core Android app development topics - activities, intents, permissions, and architecture. - Examples of building lists and using intents to make phone calls and open URLs.

Uploaded by

Sammy Kipkosgei
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

DEDAN KIMATHI UNIVERSITY OF TECHNOLOGY

University Examinations 2019/2020

THIRD YEAR SEMESTER 2 EXAMINATION FOR THE DEGREE OF


BACHELOR OF SCIENCE IN COMPUTER SCIENCE AND BACHELOR OF
SCIENCE IN INFORMATION TECHNOLOGY

CIT 3211/: MOBILE APPLICATION PROGRAMMING

DATE: 10TH DECEMBER 2019 TIME: 2-4PM

Instructions: Answer Question 1 and Any Other Two.

Question 1: (30 Marks)

a) Android was developed by Google and later the OHA (Open Handset Alliance),
define android and explain what is Open Handset Alliance

Android is a software stack for mobile devices that includes an operating


system, middle ware and key applications.

b) Explain the different types of scroll views in android

c) Name 4 different versions of Android OS that you know.


8.0- Oreo
7.0- Nougat
6.0- Marshmallow

Page 1 of 4
5.0- Lollipop
4.4- KitKat
d) Explain the importance of android emulator?
Allows the developer to run, debug and test android application without
requiring the physical device i.e. phone.
e) Explain the different types of layouts in android.

f) Describe the different screen orientations in android, a section of xml code for the
different orientation (4 Marks)
g) What is the use Android SDK?
It provides tools and APIs necessary for developing mobile applications on
the android platform using java programming language.
h) Differentiate how the following UI widgets are used in android.
i. Rating Bar - Rating Bar displays the rating bar.
ii. DatePicker - Datepicker displays the datepicker dialog that can be
used to pick the date.
iii. Time Picker - Time Picker displays the time picker dialog that can be
used to pick the time.
iv. ProgressBar - ProgressBar displays progress task.
i) Android applications can be used in different industries. Explain the applications
can be applied in four industries of your choice (4 Marks)

Question 2: (15 Marks)

a) An activity is the single screen in android. It is like window or frame of Java. The
7-lifecycle method of Activity describes how activity will behave at different
states. Explain how the lifecycle of an android activity works?

onCreate called when activity is first created.

onStart called when activity is becoming visible to the user.

onResume called when activity will start interacting with the user.

onPause called when activity is not visible to the user.

Page 2 of 4
onStop called when activity is no longer visible to the user.

onRestart called after your activity is stopped, prior to start.

onDestroy called before the activity is destroyed.


(7 Marks)
b) Android List View is a view which contains the group of items and displays in a
scrollable list.
i. In the file strings.xml, write an xml section of code that will create
a list of the following programming languages; Android, Java, Php,
Hadoop, Sap
<string name=” Android list”> List </string>
<string-array name=” array technology”>
<item> Android </item>
<item> Java </item>
<item> Php </item>
<item> Hadoop </item>
<item> Sap </item>
</string-array>

ii. In java file, write a section of code to implement the list in (c)
above
public class MainActivity extends
AppCompatActivity {
ListView listView;
TextView textView;
String[] listItem;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

listView=(ListView)findViewById(R.id.listView);
textView=(TextView)findViewById(R.id.textView);
listItem = getResources().getStringArray(R.array.list);
final ArrayAdapter<String> languages = new
ArrayAdapter<String>(this,
R.layout.listview, listItem);
listView.setAdapter(List);
}
}

Page 3 of 4
Question 3: (15 Marks)

a) For effective functionality of an android application, android specifies a number


of permissions in the AndroidManifest.xml. Explain the purpose for specifying
permissions and also explain 5 different types of permissions supported by
android
(4 Marks)
b) An Intent is a message sent between Android components to request functionality
and interact between them.
i. Explain four common uses of intent (4 Marks)
ii. Name and differentiate between the two types of intents?
>>Implicit intent
>> Explicit intent
iii. Write section of codes to implement two actions using intents namely calling
a phone number and opening a URL
Gsm call 1234

Question 4: (15 Marks)

a) You are a mobile application developer in as software Development Company, a


client running a hotel within Nairobi CBD needs a mobile application to allow
customers order for food. The client is either to choose between windows mobile
application and android mobile application. Explain why android would be the
best choice for such a client. (5 Marks)
b) With an android application for a business, explain the kind of services that the
customer in (b) above would be able to access using his phone. (5 Marks)
c) Android operating system is made up of a stack of software components. Explain
the Android architecture (5 Marks)

Page 4 of 4

You might also like