Professional Documents
Culture Documents
Bcs1023-Programming Techniques 1415
Bcs1023-Programming Techniques 1415
Bcs1023-Programming Techniques 1415
Malaysia
PAHANG
PROGRAMMING TECHNIQUES
COURSE CODE
BCS1O23
LECTURER
DATE
22 JUNE 2015
DURATION
3 HOURS
SESSION/SEMESTER
PROGRAMME CODE
BCSIBCNIBCG
INSTRUCTIONS TO CANDIDATE:
1.
2.
3.
4.
This question paper consists of THREE (3) questions. Answer ALL questions.
Write your answers in the answer booklet provided.
Answer EACH question on a new page.
All calculations and assumptions must be clearly shown.
EXAMINATION REQUIREMENTS:
NONE
DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO
This examination paper consists of SIX (6) printed pages including the front page.
CONFIDENTIAL
QUESTION 1
BCS/BCNII3CG/1415111BCS1023
[20 Marks]
A log file for network access for a particular day by UMP students from their college is shown in
Figure 1. The log file consists of information of the college, start time and end time of the access
and the data type of the access. The start time and end time is recorded using 24-hours clock
system. ICT Centre of UMP has to produce a report as their daily task. The report consist of
college name, total time access per college and total cost per college. The cost is calculated by
multiplying the access duration and the datatype. If the data type is A, which is audio, the cost is
RMO.20 per minutes. If the data type is V, which is video, the cost is RMO.35 per minutes. If the
data type is T, which is text, the cost is RMO.01 per minutes.
COLLEGE
STAP.TTIME
ENDTIME
DATATYPE
KK2
KK1
KK2
KK5
KK3
KK4
KK2
00:12
00:13
00:20
01:53
02:12
02:33
04:32
04:43
06:12
07:44
10:20
11:23
16:12
17:13
18:20
19:23
00:20
00:35
01:34
03:35
00:20
00:35
05:34
06:35
06:20
08:35
11:34
11:35
16:20
18:35
19:34
22:35
1<1<5
1<1<2
1<1<1
1<1<3
1<1<4
1<1<3
KK1
KK2
1<1<5
V
T
T
A
V
T
T
A
V
T
T
V
A
T
V
BCS/BCNIBCG/1415111BCS1023
CONFIDENTIAL
QUESTION 2
[40 Marks]
Storm Rider Book Rental Enterprise is providing online system for comic book rental. Customer
is allowed to rent up to 5 books only, otherwise, the system will trigger a message "Only 5 books
are allowed to be rented at one time ". The system also will display a list of comic books that are
available to be rented in the system's menu along with their rental fees as shown in Table 1.
Figure 2 is an example of the system's output.
Table 1: List of Books
No.
1
2.
3.
4.
Title
Pedang
setiawan
Dewata Raya
Golok Keramat
Pendekar Laut
Series
Price
Title
No.
Series
Price
1-620
5.
Naga Kembar
1-101
1-160
1-99
1-110
2
2
2.50
6.
7.
8.
Alam Perwira
Dragon Ball
Doraemon
1-400
1-29
1-20
2
3.5
3.5
Task:
Write a complete program using modular programming, array, file processing or any appropriate
technique for the above problem. You may refer to Table 1 as a guideline for input process and
Figure 1 for the output. The output must be produced in a file.
CONFIDENTIAL
BCSIBCNIBCG/1415111BCS1023
Series
Rental Fees
1. Pedang setiawan
2. Dewata Raya
3. Golok Keramat
4. Pendekar Laut
5. Naga Kembar
6. Alam Perwira
7. Dragon Ball
8. Doraemon
1-620
1-160
1-99
1-110
1-101
1-400
1-29
1-20
2
2
2
2.50
2
2
3.5
3.5
:Nabil Johari
:M005
Comic Books
Series
Pedang setiawan
Golok Kerarnat
Alam Perwira
35
80
67
2.00
2.00
2.00
sub total
+Postage fees
+GST 6%
6.00
1.00
0.42
Total:
7.42
CONFIDENTIAL
QUESTION 3
BCSIBCNIBCG/1415IIJBCS1023
[40 Marks]
Inland Revenue Board (IRB) proposed a new initiative for combining husband-wife annual
income declaration. The current practice of annual income declaration is done individually by the
husband and wife as shown in Figure 3. IRB will give new tax rate of 2.5% for this initiative..
Individual Annual Income Declaration
Type of Income
Amount
Type of Income
Amount
Salary
76,000.34
Salary
56,434.40
Allowance
23,023.45
Allowance
3,289.45
Other Incomes
12,123.12
Other Incomes
2,123.12
111,146.91
61,846.97
Type of Expenses
Amount
Type of Expenses
Amount
Family
12,000.00
Family
12,000.00
Education
3,400.13
Education
405.53
Health
2,345.12
Health
345.62
17,745.25
12,751.15
93,401.66
49,095.82
Percentage of Tax
Amount of Tax
Percentage of Tax
7.5%
7005.12
Amount of Tax
7.5%
3682.19
CONFIDENTIAL
BCS/BCNIBCG/141511113CS1023
Wife
ID: H12317
ID: W00145
Type of Income
Amount
Amount
Salary
76,000.34
56,434.40
Allowance
23,023.45
3,289.45
Other Incomes
12,123.12
2,123.12
Total Income (a)
Type of Expenses
Amount
Amount
Family
12,000.00
12,000.00
Education
3,400.13
405.53
Health
2,345.12
345.62
Total
17,2993.88
30,496.40
142,497.48
2.5%
3562.44