Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
323 views2 pages

Mobile Programming Past Paper 2021

The document provides instructions for an exam on mobile programming. It contains four questions, with the first question being compulsory and requiring students to choose two other questions. Question one covers mobile application areas, differences between hybrid and web apps, the onCreate method, running virtual devices, and creating an Android Virtual Device. It also includes coding tasks related to activity interfaces, buttons, and calculating minimum and maximum values. The other questions cover intents, the Android manifest, Cordova vs PhoneGap, and challenges of occasionally connected apps.

Uploaded by

Meshack
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
323 views2 pages

Mobile Programming Past Paper 2021

The document provides instructions for an exam on mobile programming. It contains four questions, with the first question being compulsory and requiring students to choose two other questions. Question one covers mobile application areas, differences between hybrid and web apps, the onCreate method, running virtual devices, and creating an Android Virtual Device. It also includes coding tasks related to activity interfaces, buttons, and calculating minimum and maximum values. The other questions cover intents, the Android manifest, Cordova vs PhoneGap, and challenges of occasionally connected apps.

Uploaded by

Meshack
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

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.

Num 1

Num 2

Num 3

Answe
r

Maximum Minimum
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)

You might also like