UNIVERSITY EXAMINATIONS: 2021
EXAMINATION FOR THE DEGREE OF BACHELOR OF SCIENCE IN
INFORMATION TECHNOLOGY/ BUSINESS INFORMATION TECHNOLOGY/
APPLIED COMPUTING/ SOFTWARE DEVELOPMENT/ INFORMATION
SECURITY & FORENSCIS
BIT 3209/ BBIT 311/ BAC 2203/ BSD 2203/ BISF 2203:
MOBILE PROGRAMMING
FULL TIME /DISTANCE LEARNING / PART TIME
DATE: DECEMBER, 2021 TIME: 2 HOURS
INSTRUCTIONS: Question ONE IS COMPULSORY, Choose TWO OTHER Questions
QUESTION ONE (20 marks) Compulsory
a) Explain four application areas of Mobile Programming. (2 marks)
b) Differentiate between Hybrid Mobile Applications and web applications. (2 marks)
c) The MainActivity.java file has the onCreate() method in it. Clearly explain the role of this
method. (2 marks)
d) Explain why it is important that the virtual device be running before the application is executed.
(2 marks)
e) Outline the procedure of creating an Android Virtual Device (AVD) (2 marks)
f) Below is an Activity Interface created by a student learning Android Programming. The interface
will help the student to read three integers as input, calculate their minimum and maximum values
and display the answer.
i) Use the table layout to write xml code that will produce the interface shown.
(2 marks)
ii) Declare and bind all the interface elements (widgets) used on this interface. (3 marks)
iii) Write click events for each of the buttons that will display the Maximum and the minimum
respectively. (5 marks)
QUESTION TW0 (15 marks)
a) Write a code snippet in Java for a new android app that has two buttons. The first button when clicked
takes the user to another activity. The second button when clicked takes you to www.kca.ac.ke
(8 marks)
b) The Manifest in Android handles essential information that the system needs to run it. Discuss the
various information handled by the AndroidManifest.XML. (7 marks)
QESTION THREE (15 marks)
a) Discuss the difference between Cordova and Adobe PhoneGap. (4 marks)
b) Using any suitable platform example, explain how you create architect Hybrid applications
(6 marks)
c) Explain FIVE challenges of building occasionally connected applications OCA’s that allow a remote
worker to continue to access their data while on the move. (5 marks)
QUESTION FOUR (15 marks)
a) Implicit intents are important in invoking applications that are required through a user developed
applications. You are required to create an intent through which a user can send an sms to another
user through the created app.
i) Write a line of code that would be used to request for the permission to send sms in the
manifest file. (2 marks)
ii) Assuming that the interface will be used to provide the telephone number and the
message being sent, provide declarations and initializations of possible widgets that will
be used for this purpose. (3 marks)
iii) Write a method through which such an sms can be sent. (5 marks)
b) Consider an image called myphoto.png. Assume you want to use this image on the activity
interface of your Android App.
i) Where in the project should the image be stored? (1 mark)
ii) Declare any two interface elements that would be necessary and explain the role of each.
(1 mark)
iii) Write code snippet that can be used to load the image onto the activity interface.
(3 marks)