BIT3209 BBIT311  MOBILE PROGRAMMING. KCA Past Paper

UNIVERSITY EXAMINATIONS: 2016/2017
EXAMINATION FOR THE DEGREE OF BACHELOR OF SCIENCE IN
INFORMATION TECHNOLOGY
BIT3209 BBIT311 MOBILE PROGRAMMING
SPECIAL /SUPPLEMENTARY EXAMINATION
DATE: JULY, 2017 TIME: 2 HOURS
INSTRUCTIONS: Answer Question One & ANY OTHER TWO questions.

QUESTION ONE – COMPULSORY (30 MARKS)
a). Briefly explain functions of the following components of a mobile application
i. spinner (2 Marks)
ii) Mobile platform (2 Marks)
iii) Broadcast receiver (2 Marks)
d) Describe the meaning of the term Killable states in the context of mobile programming. Give
one example of a killable state
(2 Marks)
e. Describe three categories of mobile applications (3 Marks)
f. Describe four constraints that are associated with mobile devices (4 Marks)
g. Describe the meaning of the term ‘XML element’ as used in mobile programming. Write
sample code for illustrating your answer.
(4 Marks)
h. Write an XML or java code that displays the following output when executed in an emulator
or real device


(5 Marks)
i) Briefly explain the purpose of the following lines of java code ( 4 Marks)


f) Briefly explain the following XML lines code (4 Marks)


QUESTION TWO

a) Briefly explain how you understand the following lines of code as used in mobile
programming
(4 Marks)
<TextView
android:layout_width=”fill_parent”
android:layout_height=”wrap_content”
android:text=”welcome”
android:textColor=”#000000″
android:background=”#fcdd36″
/>
b) State and explain any two selection controls that are used to implement user interface of a mobile
application. Write a sample code to demonstrate their implements (5 Marks)
c) Briefly describe three functions of a manifest XML file in mobile programming (3 Marks)
d) Explain how you understand the following lines of code in a manifest file (5 Marks)


(e) Describe the meaning of the term ‘ XML namespace’. Give one example to illustrate your
answer
(3 Marks)
QUESTION THREE
a) Briefly explain the meaning of the following terms as used in mobile programming. Write a
sample code that demonstrates implementation each term
i) Intent (4 Marks)
ii) Broadcast receiver (4 Marks)
iii)Activity (4 Marks)
b) Explain the meaning of the following lines of code in the context of mobile programming
(6 Marks)
public class Lab2 extends Activity
{
public void onCreate(Bundle savedInstanceState)
{ super.onCreate(savedInstanceState);
TextView view = new TextView(this);
view.setText(“Welcome to KCA University Mobi Site \n”);
setContentView(view); } }
c) Describe Relative layouts in the context user interface of a mobile application. draw a
diagram for each case to demonstrate your understand (2 Marks)
QUESTION FOUR
a) Briefly explain the contents of the following directories in an android application.
i) src/ (2 Marks)
ii) res/ (2 Marks)
iii) bin/ (2 Marks)
d) Write XML or Java code that displays the following output of a mobile application (8 Marks)
c) Describe the process of compiling an android application. draw a well labeled diagram that
illustrates the process. (6 Marks)
QUESTION FIVE
a)Android platform consists of three components. Describe each of these components
(3 Marks)
b) Describe the differences between views and view groups in the context of mobile
programming. state one example for each case (5 Marks)


c) Describe the meaning of the statement ‘ life cycle of an activity’ and explain five states that an
activity goes through during a life cycle. Draw a well labelled diagram that illustrates the
lifecycle. (12 Marks)

(Visited 264 times, 1 visits today)
Share this:

Written by