Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

BAHRIA UNIVERSITY (Karachi Campus)

Department of Computer Sciences


Mid Term Examination – Spring 2021
MOBILE APPLICATION DEVELOPMENT (CSC-341)
(SUBJECTIVE)
Class: BS(CS) - 6 (A & B) Morning Session: III
Course Instructor: Fasiha Ikram Time Allowed: 70 Minutes
Date: 19 May 2021 Time: 03:50 to 05:00 pm
Max. Marks: 12

Student’s Name: ________________________________ Enrollment#: _________

Note: Attempt the following questions.

Instructions:
✓ In order to avoid any run time electricity and internet unavailability situation, it is
suggested that keep your laptop fully charged.
✓ Examination paper can be downloaded and solution must be uploaded back to LMS.
✓ Activate 3G/4G connection as an alternative of Wi-Fi/internet option to upload your
paper solution on LMS.
✓ In addition to upload your paper to LMS, it is mandatory to email the solution to
course instructor (fasiha.bukc@bahria.edu.pk) within examination paper time.
✓ Plagiarized/copied solution will be marked ZERO.
✓ Overall, the online mid-term examination will be comprised of written and viva-based
evaluation having weightage of 50% each. An online viva session will be conducted for
the assessment after submission of written part solution by the students.
✓ For monitoring purposes, all students have to remain online throughout the
examination period on MS teams. It is mandatory to keep your web cam open for the
whole period of examination.

Page 1 of 6
Question No. 1 (mobile application development)
From all the lectures viva will be conducted viva slots send you via email.
(10 Marks)
QUESTION NO. 2 (Native Architecture and Layout)
Based on the following XML code,
a) Figure 1 represents the graphical user interface for an application uses to collect user
information. Based on Figure 1, analyses the XML code that is shown in Figure 2 to identify
TEN (10) invalid/missing statements. You should write the line number for each
invalid/missing statement then state why it is invalid.

b) Based on the mobile application Graphical User Interface (GUI) that is shown in Figure 1, write
a Java code that will enable the application to pass information (full name, age, and Gender)
and display it on another activity using intents.
(2 X 2.5 marks = 5 Marks)

figure 1

Page 2 of 6
Figure 2

1 <?xml version="1.0" encoding="utf-8"?>


2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:tools="http://schemas.android.com/tools"
4 android:id="@+id/activity_main"
5 android:layout_width="wrap_content "
6 android:layout_height="wrap_content "
7 tools:context=".mid_Term">
8
9 <LinearLayout
10 android:layout_width="match_parent"
11 android:layout_height="match_parent"
12 android:layout_alignParentStart="true"
13 android:layout_alignParentLeft="true"
14 android:layout_alignParentTop="true"
15 android:orientation="horizontal"
16 android:weightSum="1">
17
18 <TextView
19 android:id="@+id/tvl"
20 android:layout_width="50dp"
21 android:layout_height="wrap_content"
22 android:text="Full Name"
23 android:textAllCaps="false"
24 android:textColor="@android:color/black"
25 android:textSize="18sp"
26 android:textStyle="normal|bold"></TextView>
27
28 <TextView
29 android:id="@+id/etl"
30 android:layout_width="match_parent"
31 android:layout_height="18sp"
32 android:ems="10"
33 android:inputType="textPersonName"
34 android:textSize="18sp"
35 android:textStyle="normal"
36 tools:background="#fcffab"></TextView>
37
38 <TextView
39 android:id="@+id/tv2"
40 android:layout_width="match_parent"
41 android:layout_height="wrap_content"
42 android:layout_marginTop="@android:dimen/app_icon_size"
43 android:text="Passport"
44 android:textColor="@android:color/holo_red_dark"
45 android:textSize="18sp"
46 android:textStyle="normal|bold" />
47
48 <EditText
49 android:id="@+id/edit"
50 android:layout_width="match_parent"
51 android:layout_height="wrap_content"
52 android:background="#fcffab"
53 android:ems="10"
54 android:inputType="textPersonName"
55 android:textColor="?attr/actionMenuTextColor"

Page 3 of 6
56 android:textSize="18sp"
57 android:textStyle="normal|bold" />
58
59 <TextView
60 android:id="@+id/tv3"
61 android:layout_width="match_parent"
62 android:layout_height="wrap_content"
63 android:text="Phone"
64 android:textColor="@android:color/black"
65 android:textSize="300sp"
66 android:textStyle="normal|bold" />
67
68 <TextView
69 android:id="@+id/tv3"
70 android:layout_width="match_parent"
71 android:layout_height="wrap_content"
72 android:text="Age"
73 android:textColor="@android:color/black"
74 android:textSize="18sp"
75 android:textStyle="normal|bold"></TextView>
76
77 <SeekBar
78 android:id="@+id/seekBarl"
79 android:layout_width="match_parent"
80 android:layout_height="wrap_content" />
81
82 <RadioGroup
83 android:layout_width="match_parent"
84 android:layout_height="100dp">
85
86 <RadioButton
87 android:id="@+id/rbl"
88 android:layout_width="wrap_content"
89 android:layout_height="wrap_content"
90 android:checked="true"
91 android:text="RedioButtonl"
92 android:textColor="@android:color/black"
93 android:textSize="18sp"
94 android:textStyle="italic|bold" />
95 </RadioGroup>
96
97 <TextView
98 android:id="@+id/tv5"
99 android:layout_width="match_parent"
100 android:layout_height="20dp"
101 android:text="Output Text"
102 android:textColor="@android:color/black"
103 android:textSize="18sp"
104 android:textStyle="normal|bold" />
105
106 <RadioButton
107 android:id="@+id/rb2"
108 android:layout_width="wrap_content"
109 android:layout_height="wrap_content"
110 android:checked="false"
111 android:text="RedioButton2"
112 android:textColor="@android:color/holo_blue_dark"
113 android:textSize="18sp"
Page 4 of 6
114 android:textStyle="normal|bold"></RadioButton>
115
116 <TextView
117 android:id="@+id/tv5"
118 android:layout_width="match_parent"
119 android:layout_height="146dp"
120 android:layout_weight="0.40"
121 android:background="#fcffab"></TextView>
122
123 </LinearLayout>
124 </RelativeLayout>

Page 5 of 6
QUESTION NO. 3 (Layout building)

For an eCommerce app, you would need a catalog screen to display all the products in one place. The
better the visual presentation, the more are the chances of the user buying the product. A designer’s
job is to form the catalog that will attract a user’s attention and encourage them to shop for a
product. You can offer the user to scroll through the list, just like several other eCommerce websites
and apps display it. The number of merchandise/products in one row can be decided according to the
breadth of the screen.

As a mobile application developer, propose an application that you think will help the user and, at the
same time, is advantageous to the company. Your design must have the following requirements:

a) Design the complete application using a storyboard and write down all important files to
create the activities mentioned in your storyboard. (maximum six (6) activities)

b) Based on your storyboard design, describe in detail all activities, intents (both explicit and
implicit) and User interface in the application and associate your answer with the files
mentioned in Question 3 (a). (hint: use view or view group components as per the need and
demand of the application.xml is NOT required).

c) Consider the requirement of application and decide if there is any need of adapter either list
or grid. Make a custom adapter (class name must be CustomAdapter) with calling and
registration statements. (with proper Commenting & Documentation)

(1+2 + 2 = 5 Marks)

*************** End of Examination Paper ***************

Page 6 of 6

You might also like