Ys%, XLD Únd. Fomd Fïka J: Ishæ U Ysñlï Weúßks
Ys%, XLD Únd. Fomd Fïka J: Ishæ U Ysñlï Weúßks
Instructions:
⁕ Answer all the questions.
⁕ Write your Index Number in the space provided in the answer sheet.
⁕ Instructions are also given on the back of the answer sheet. Follow those carefully.
⁕ In each of the questions 1 to 50, pick one of the alternatives from (1), (2), (3), (4), (5) which is correct or most
appropriate and mark your response on the answer sheet with a cross (x) in accordance with the instructions
given on the back of the answer sheet.
⁕ Use of calculators is not allowed.
17. Consider the IP address 192.248.87.3 and the subnet mask 255.255.255.224. How many hosts can be directly
connected to this network?
(1) 16 (2) 24 (3) 30 (4) 64 (5) 128
18. What is the most suitable media to transmit a high definition video over a distance of 5 km?
(1) Radio waves (2) Twisted pair copper cables (3) Fibre optics cables
(4) Coaxial cables (5) Open wire cables
(5) total = 0
for i in range(1, 12):
total = total + i
Is
Y–X Yes You are
less than 3 ? very close.
No
22. Which of the following statements best describes the result of hard disk ‘fragmentation’?
(1) Hard disk data access speed is reduced. (2) Network access speed becomes slow.
(3) Hard disk becomes totally inaccessible. (4) Some data will get erased from the hard disk.
(5) Number of bad sectors get increased.
23. Consider the following statements about computerized databases:
A - Need more human resources to manage the computerized database than a manual system.
B - Retrieval of data is efficient than a manual system.
C - No data duplications.
D - Need more space to store data than a manual system.
Which of the above statements are correct with respect to a properly designed database?
(1) A and B only. (2) A and D only. (3) B and C only.
(4) B and D only. (5) C and D only.
• Consider the following system description and the relations A, B, C and D given below to answer the questions
24, 25 and 26.
A principal of a National school wants to develop a database to maintain Admission Number, Student Name,
Address, National Identity Card number (NIC) and the Date of Birth (DOB) of Advanced Level students. The
principal also wants to know the marks obtained for each subject by the students. In addition to the above
requirements, the principal needs to know the subjects assigned to the teachers.
Relations :
A - Student(admissionNo, studentName, address, DOB, NIC)
B - Subject(subjectCode, subjectName)
C - Mark(admissionNo, subjectCode, marksObtained)
D - Teacher(teacherNo, subjectCode, teacherName, subjectName, class)
24. Which of the above relations are in the third normal form?
(1) A and C only. (2) A and D only. (3) A, B and C only.
(4) A, C and D only. (5) B, C and D only.
25. Which of the following combinations of attributes provides the minimal set of primary keys for the relations
Student, Subject and Mark respectively?
(1) admissionNo and NIC, subjectCode, admissionNo.
(2) NIC, subjectCode, subjectCode.
(3) admissionNo, subjectCode, subjectCode.
(4) admissionNo, subjectCode, admissionNo and subjectCode.
(5) admissionNo, subjectName, admissionNo and subjectCode.
26. Which of the following SQL statements would produce an output with admission number, name of the student,
subject code and marks obtained?
(1) SELECT studentName, subjectCode, marksObtained
eeeFROM Student, Mark
eeeWHERE Student.admissionNo = Mark.admissionNo
(2) SELECT Student.admissionNo, studentName, subjectCode, Student.marksObtained
eeeFROM Student, Mark
eeeWHERE Student.admissionNo = Mark.admissionNo
(3) SELECT Student.admissionNo, studentName, subjectCode, marksObtained
eeeFROM Student, Mark
eeeWHERE Student.admissionNo = Mark.admissionNo
(4) SELECT Student.admissionNo, studentName, subjectCode, marksObtained
eeeFROM Student, Mark
eeeWHERE Student.admissionNo = admissionNo
(5) SELECT Student.admissionNo, studentName, subjectCode, marksObtained
eeeFROM Student, Mark
eeeWHERE admissionNo = Mark.admissionNo
27. Which of the following would be the result if the Boolean expression 𝐹(𝑥, 𝑦) = (𝑥
̅̅̅̅̅̅̅ ̅̅̅̅̅̅̅
+ 𝑦). (𝑥̅ + 𝑦̅) is simplified
by using De Morgan’s Law?
(1) 𝑥 (2) 𝑦 (3) 0 (4) 1 (5) 𝑥, 𝑦
28. Which of the following Boolean expressions represents the given logic circuit?
̅̅̅̅̅̅̅̅
(1) (𝐴 + 𝐵 ) + (𝐵 + 𝐶) (2) (𝐴 + 𝐵) + (𝐵. 𝐶) A
̅̅̅̅̅̅̅̅
(3) (𝐴 ̅̅̅̅̅̅̅̅
+ 𝐵 ) + (𝐵 + 𝐶) ̅̅̅̅̅
(4) (𝐴. 𝐵 ) + (𝐵. 𝐶) B
̅̅̅̅̅̅̅̅
(5) (𝐴 + 𝐵 ) + (𝐵. 𝐶)
38. Select the correct layout corresponding to the following code segment of an HTML document.
<ul>
<li>Fruits
<ul><li>Mango
<ul>
<li>Gira amba</li>
<li>Dampara</li></ul></li>
<li>Pineapple</li></li></ul>
<li>Vegetables</li>
</ul>
40. What is the correct syntax to be used to insert a JavaScript into an HTML page?
(1) <javascript> (2) <javascript language="text/javascript">
(3) <script type="text/javascript"> (4) <scripting language="javascript">
(5) <scripting type="javascript">
⁕⁕⁕
AL/2011/20/E-II #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
1. (a) State the main technologies used in the first four generations of computers.
(b) Draw a diagram to depict the fetch-execute cycle used in program execution.
2. (a) Encircle the most suitable entry in the second and third columns corresponding to the properties
eeeeeeeeelisted in the first column of the following table with respect to FAT32 and NTFS file systems.
FAT32 NTFS
Maximum file size limited/unlimited limited/unlimited
Maximum file name length limited/unlimited limited/unlimited
Security yes/no yes/no
Support of Unicode yes/no yes/no
(b) A computer has an 18-bit virtual memory address space where six bits are used for a page address.
(i) Calculate the total number of pages defined by the above addressing scheme.
(c) Draw the operating system process transition diagram from process creation to termination. Do not
write
in this
column
Students in a school participate in different sports such as volleyball, track and field athletics, table
tennis, etc. The principal wants to maintain a registry with admission number, student name, home
address, class, and sports he/she participates. A student can participate in more than one sport. For
a particular sport, there can be more than one student. Each student can participate pre-defined number
of hours in a sport.
(a) Draw an ER diagram for the above scenario.
(c) “ER diagrams do not allow attributes to be assigned on relationships”. State whether this statement
is true or false. Explain your answer by using the given scenario.
Linux
Word Processor
Web Browser
(b) Computer storage devices can be categorized into three types based on the medium used to store
/retrieve data. State the three types of media and give an example for each type.
(c) The transaction file in a company’s payroll system includes employee number, hours worked
department code, and week number. Assume that the system maintains a Employee master table
and a Department master table. Encircle the most appropriate validation check for each of the
data elements given in the following table.
⁕⁕
[See page eight
AL/2011/20/E-II -8- #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
Part B
⁕ Answer any four questions only.
1. (a) What are the three (3) main components of a Central Processing Unit (CPU) of a typical computer? List
eeeee eeeethe main functions of these three components.
e
(d) A digital circuit takes four binary digits as an input, and produces 1 as its output if the decimal value
represented by the four binary digits is a prime number (number which can only be divided by itself
and 1), and 0 otherwise. Assume that all four binary digits represent positive decimal values (No bit is
allocated for the sign).
(i) The following truth table is designed to describe the above circuit, in which A, B, C and D represents
the four binary inputs from the most significant bit to the least significant bit and F(A,B,C,D) as
the output of the circuit. Copy the following truth table onto your answer sheet as it is and complete
the output column.
A B C D F(A,B,C,D)
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1
(ii) Write a Boolean expression to represent the logic function of the above circuit in the sum of products
form.
(iii) Design a logic circuit for the Boolean expression you have obtained for the above part (ii).
2. (a) Describe the terms “elements” and “attributes” with respect to an HTML document.
(b) Identify each of the following as either an element or an attribute and describe their functionality.
(i) br (ii) href (iii) src (iv) html
(c) Consider the following figure which shows a section of a web page of a tour operating company in Sri
Lanka.
(iii) Write HTML code segment to create the collection of three radio buttons labelled as 'Blue Whale',
e 'Leopard' and 'Elephant' as appeared in the above HTML document.
(iv) The company wants to add a table showing the rates as given below with the caption 'Wild Sri
eLanka', to the above HTML Document.
Days Price
7 US$910
10 US$1220
3. (a) You have been asked to design two physically separated networks, namely A and B, each having exactly
eeeeeeeee10 computers. The IP addresses of A and B networks are 10.32.5.0 and 10.32.6.0 respectively It is required
eeeeeeeeethat the computers in the two networks must be able to communicate with each other.
(i) Suggest a suitable subnet mask for each of these networks.
(ii) Name the device required to connect these two physical networks to communicate with each other.
(iii) Draw a network diagram for the above network and assign suitable IP addresses for the devices
in these two networks.
(b) (i) Compare TCP and UDP protocols in terms of reliability.
(ii) Peer-to-peer (P2P) and client-server models are distributed application architectures. State the
difference between them.
(iii) List the differences between hubs and switches in a network.
4. (a) Identify and describe the phases of the waterfall model in software development.
(b) Describe functional and non functional requirements of a system. Identify two functional and three non
functional requirements for a mobile phone.
(c) Describe the purpose of unit, integrated and acceptance testing. Who are the people responsible for each
testing process?
(d) Suppose you are planning to buy a new mobile phone and would like to test its functionality. Describe
how Black Box testing can be used in this process.
(d) The following Python program is intended to convert user given positive integers to their equivalent binary
representations. The program should halt when the user inputs the value 0. The program has both syntactic
e
and logical errors. The line numbers are not part of the program, but they are used to reference the lines.
e
6. (a) (i) Using an example for each category explain the three types of business: Business to Business (B2B),
eeeeeeeeeeeeeeBusiness to Consumer (B2C) and Consumer to Consumer (C2C) in e-commerce.
(ii) Chairman of a company is considering fax, e-mail and web as communication tools for a B2E (Business
to Employee) application. Being an ICT student recommend the most appropriate tool with reasons.
(b) (i) In the domain of Agent technology, explain the term ‘Agent’.
(ii) Give two main characteristics of an Agent.
(iii) Briefly explain an example where Agent technology could be used effectively.
⁕⁕⁕
AL/2012/20/E-I #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka
YS% ;,xld
=j YS% ,xld úNd. fomd¾;fïka
úNd. fomd¾;fïka;=j YS% ,xld
;=júNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
Instructions:
⁕ Answer all the questions.
⁕ Write your Index Number in the space provided in the answer sheet.
⁕ Instructions are also given on the back of the answer sheet. Follow those carefully.
⁕ In each of the questions 1 to 50, pick one of the alternatives from (1), (2), (3), (4), (5) which is correct or most
appropriate and mark your response on the answer sheet with a cross (x) in accordance with the instructions
given on the back of the answer sheet.
⁕ Use of calculators is not allowed.
9. The command that can be used to check the network configuration of a computer is
(1) traceroute. (2) netstat. (3) hostname. (4) ipconfig. (5) ping.
10. Human blood circulatory system can be classified as a
(1) natural and closed system. (2) artificial and closed system.
(3) artificial and open system. (4) natural and open system.
(5) natural and artificial system.
11. Which of the following best describes a non-functional requirement of a mobile phone?
(1) Sending a short message (2) Receiving a telephone call
(3) Selecting a number from the contact list (4) Making a telephone call
(5) Having one year warranty for the battery
12. An electronic washing machine can be best considered as a/an
(1) Information system. (2) Automated system.
(3) Expert system. (4) Management support system.
(5) Transaction processing system.
14. The required Minimum and maximum working hours per day for an employee in a factory are 5 and 12
respectively, Which of the following is the most appropriate validation check to ensure that the integer value
entered as the working hours, through a web-based form, is correct?
(1) Range (2) Length (3) Type
(4) Numeric value (5) Number of digits
16. Which of the following statements is correct about IP addresses and subnet masks?
(1) 192.248.32.3 is a Class B IP address.
(2) A network with a subnet mask 255.255.255.248 can accommodate six hosts.
(3) An IP address consists of 16 bits.
(4) 10.32.1.5 is a Class C IP address.
(5) 255.255.255.0 is a Class C IP address.
17. The network layer of the OSI reference model provides
(1) error correction. (2) inter-process communication.
(3) flow control. (4) routing of data packets.
(5) error detection.
18. The type of operating system that is most suitable for an automated air traffic control system is
(1) multi-user multi-tasking. (2) single-user multi-tasking.
(3) real time. (4) single-user single-tasking.
(5) multi-threading.
26. What would be the result if the following Boolean expression is simplified?
𝐹(𝑥, 𝑦) = 𝑥𝑦
̅̅̅(𝑥̅ + 𝑦)(𝑦 + 𝑦̅)
(1) 𝑥̅ (2) 𝑦̅ (3) 𝑥 (4) 𝑦 (5) 𝑥𝑦
27. Which of the following Boolean expressions represents the output of the given logic circuit?
̅̅̅̅̅̅̅̅
(1) (𝐴 ̅̅̅̅̅
+ 𝐵 ) + (𝐵. 𝐶)
A
̅̅̅̅̅̅̅̅
(2) (𝐴 ̅̅̅̅̅
+ 𝐵 ) . (𝐵. 𝐶) B
(3) ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
(𝐴 + 𝐵) + (𝐵. 𝐶)
̅̅̅̅̅
(4) (𝐴. ̅̅̅̅̅
𝐵 ) + (𝐵. 𝐶)
C
(5) ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
(𝐴 . 𝐵) + (𝐵 + 𝐶)
28. The component that decodes the instructions fetched into the CPU is called the
(1) Primary Memory. (2) Register Unit. (3) Control Unit.
(4) ALU. (5) Program Counter.
29. Which of the following data storage devices provides the fastest random access?
(1) Main memory (2) Magnetic disk (3) CD/DVD
(4) Flash drive (5) Hard disk
30. A person employed in an overseas country placed an on-line order to deliver a birthday present to his mother
who is living in Sri Lanka, using the web-based services of a company. This transaction of ordering the birthday
present could be best classified as
(1) Consumer to Retailer. (2) Consumer to Business. (3) Business to Consumer.
(4) Business to Business. (5) Employee to Business.
31. Which of the following is most cost effective and secure in transmitting private and confidential messages
and notices among the employees of an organization?
(1) Electronic notice boards (2) Teleconferencing (3) email
(4) A social network (5) A website
32. Consider the following characteristics :
A - Autonomous
B - Performs in dynamic environments
C - Functions restricted to a time period
D - Interacts with highly increasing information
Which of the above are characteristics of a Software Agent?
(1) A and B only. (2) A and C only. (3) A, B and C only.
(4) A, B and D only. (5) B, C and D only.
33. Ubiquitous computing will be useful in applications such as
(1) Customisation of a domestic environment. (2) Processing of large scale examination results.
(3) Auto Teller Machine (ATM). (4) Point of Sales (POS) Machine.
(5) Controlling a wall clock.
34. Consider the following terms:
A - Input B - Output C - Process D - Storage
Which of the above are essential for a system?
(1) A and B only. (2) A, B and C only. (3) A, C and D only.
(4) B, C and D only. (5) All A, B, C and D.
35. “Video conferencing is best described as a/an ............................ discussion through ........................... between
two or more individuals in different locations.”
Which of the following is the most appropriate answer to fill the blanks in the above statement?
(1) video, TV (2) audio, telephone (3) audio, network
(4) audio visual, TV (5) audio visual, network
36. Consider the following URL:
http://www.schools.org/2012/lessons/index.html
Which of the following indicates the protocol of the above URL?
(1) http (2) html (3) www
(4) org (5) www.schools.org
37. Which of the following HTML codes generates the table shown below?
41. The main advantage of creating more than one partition in a hard disk is the
(1) separation of the operating system and program files.
(2) ability to retrieve files efficiently.
(3) easiness of making directories and subdirectories.
(4) easiness of creating multiple users.
(5) easiness of taking backups of selected files.
Print i
⁕⁕⁕
AL/2012/20/E-II #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
1. (a) Give two techniques used in operating systems to optimize processor utilization.
(b) The following shows a part of the result obtained by executing the “ping” command to check
the network connectivity to a host connected to a computer network.
PING www.cam.ac.uk (131.111.8.46) 56(84) bytes of data.
64 bytes from ipv4.www.cam.ac.uk (131.111.8.46) : icmp_seq=1 tt1=242 time=201 ms
64 bytes from ipv4.www.cam.ac.uk (131.111.8.46) : icmp_seq=2 tt1=242 time=204 ms
64 bytes from ipv4.www.cam.ac.uk (131.111.8.46) : icmp_seq=3 tt1=242 time=196 ms
64 bytes from ipv4.www.cam.ac.uk (132.411.8.46) : icmp_seq=4 tt1=242 time=203 ms
64 bytes from ipv4 www.cam.ac.uk (131.111.8.46) : icmp_seg=5 tt1=242 time=195 ms
--- www.cam.ac.uk ping statistics ---
5 packets transmitted, 5 received,
Using the above information, answer the parts (i), (ii), (iii) and (iv) given below.
(i) What is meant by time in the above result?
(ii) What is the IP address of the server that hosts the website www.cam.ac.uk?
(c) In an operating system, a process can be in one of the states, namely, created/new, waiting,
running, terminated, blocked, swapped out and waiting, or swapped out and blocked. From which
of the above states can a process be directly moved into the blocked state?
(b) Using the definition suggested in (a) above, show that a mobile phone is a system.
(c) State whether a mobile phone is a close system or an open system. Justify your answer.
(ii) Develop a flowchart to represent an algorithm, based on the method suggested in (i) above,
to decide whether a given positive integer is odd or even.
(b) Show how the computation 15+(-5) is done in 8-bit two's complement arithmetic.
Explain how you deal with the carry generated in the most significant bit.
(ii) Name three essential ICT devices required for the method suggested in (i) above.
⁕⁕
[See page eight
AL/2012/20/E-II -8- #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
Part B
⁕ Answer any four questions only.
1. (a) (i) Describe the main difference between data and information by using a suitable system.
(b) A fan in a room can be on (1) or off (0). A control system is required to operate the fan efficiently
with the following conditions / functionalities.
1. The fan can manually be switched on or off.
2. The timer will be either on or off.
3. The sensor will detect whether the environment is cold or hot.
4. The fan will automatically be switched on when the timer is on and the sensor indicates.
environment is hot.
The following table assigns Boolean values for the above conditions/functionalities.
Condition/functionality Boolean value
Fan switched on manually 1
Fan switched off manually 0
Timer is on 1
Timer is off 0
Sensor detects cold environment 1
Sensor detects hot environment 0
(i) Draw a logic circuit by using a combination of only AND, OR and NOT gates to implement the
above control system.
(ii) Construct a truth table to represent the functionality of the above system.
(iii) Write a Boolean expression (not simplified) to represent the truth table constructed in the (b) (ii)
above.
2. (a) What would be the responses by a browser for a paragraph tag and for a break tag in an HTML document?
(b) What will be displayed when the following HTML code segment is rendered? Clearly indicate blank line(s)
in the display, if any, with dotted lines (.......................................).
<p>Our evergreen school days<br/>
will not come back again</p>
<p>From the nursery to high school
we learnt the best</p>
(c) A company named “Agri Sri Lanka” requires a web page as given below.
Write an HTML code to produce the above web page. Assume that the name of the image file is
"agriSL.jpg". The links, Jay Agro Technologies and Lanka Agri Systems Pvt Ltd. should link to the
sites "http://www.jayagrotec.com" and "http://www.lkagrisys.com" respectively.
3. (a) An application running in a computer refers the virtual memory address, 0100110100010111 during execution.
(i) Calculate the maximum accessible virtual memory address space, in the above computer in Kilo Bytes?
(ii) What is the range (starting and ending addresses) of the memory address space identified in the
section (i) above?
(iii) If a page size is 4 Kbits, how many bits are sufficient to represent the page number? Show your
computation.
(b) Assume that A and B are computers connected to two network segments. When the command ‘ipconfig’
is executed in these computers, the following information is obtained:
1. In computer A
IPv4 address ............................... : 192.168.1.2
Subnet mask ............................... : 255.255.255.0
Default gateway .......................... : 192.168.1.254
2. In computer B
IPv4 address ............................... : 192.168.2.3
Subnet mask ............................... : 255.255.255.0
Default gateway .......................... : 192.168.2.254
Draw a network diagram for the above two network segments so that both A and B can communicate
with each other. You should clearly indicate the EP addresses of each device in the diagram.
(c) Briefly explain the main function of each of the following systems in terms of network security.
(i) firewall
(ii) proxy server
(iii) honey pots
(a) State the most relevant entity or relationship in the above ER diagram to add an attribute to represent
marks obtained by a student for a subject.
(b) Classify all the relationships in the above ER diagram as one-to-one, one-to-many or many-to-many.
Justify your answer.
(c) Write the structure of the tables including their attributes when the above ER diagram is converted to
a relational database.
(d) State the primary key for any table suggested in (c) above.
(e) Using the tables you have suggested in (c) above, write an SQL statement to get marks obtained for
the subject with the value of Subject ID AL001 by the student with the value of Student ID ST001.
________
[See page eleven
AL/2012/20/E-II -11- #ictfromabc
def processdata():
global datakeys
for i in range(len(datakeys) - 1):
for j in range(i+1, len(datakeys)):
if(datakeys[i] > datakeys[j]):
datakeys[i], datakeys[j] = datakeys[j], datakeys [i]
def printdata():
global datakeys, datasummary
f2 = open('output.txt', 'w')
for key in datakeys:
f2.write('{}-{}\n'.format(key,datasummary[key]))
f2.close()
readdata()
processdata()
printdata()
(a) What are the data types of the variables datasummary and datakeys in the above program?
(b) Write a Python statement required to insert the program name as a comment at the beginning of the
above program.
(c) What is the result of execution of the command open('input.txt','r') in the above program?
(d) Describe the main task of each of the functions readdata(), printdata() and processdata() in the above
program.
(e) If the content of the file input.txt is as given below, what would be the content of the file output.txt
after the execution of this program?
a,d,b,a,n
d,b,n,x,a
6. The Past Pupils Association (PPA) of a school has a large number of past students all over the country and
overseas. The PPA, in collaboration with a leading local bookshop, decided to obtain support from the past
students and other donors to increase the number of books in the library. The PPA agreed to develop a web-
based system with on-line payment facilities for this activity. The title and the price of the required books
for the library will be available on the website. The donors could select and pay for these required books
available on the website. When a payment is made, this information will be sent to the bookshop for the
delivery of the selected books to the school library.
(a) Give two advantages of the suggested on-line method over traditional methods for book collection.
(b) Give one disadvantage of ordering books through the suggested website.
(c) Explain how you could improve the website to eliminate the disadvantage given in (b) above.
⁕⁕⁕
AL/2013/20/E-I #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka
YS% ;,xld
=j YS% ,xld úNd. fomd¾;fïka
úNd. fomd¾;fïka;=j YS% ,xld
;=júNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
Instructions:
⁕ Answer all the questions.
⁕ Write your Index Number in the space provided in the answer sheet.
⁕ Instructions are also given on the back of the answer sheet. Follow those carefully.
⁕ In each of the questions 1 to 50, pick one of the alternatives from (1), (2), (3), (4), (5) which is correct or most
appropriate and mark your response on the answer sheet with a cross (x) in accordance with the instructions
given on the back of the answer sheet.
⁕ Use of calculators is not allowed.
3. A high speed temporary storage, which is a part of the microprocessor that holds data and instructions during
the execution, is called .........................
(1) Registers. (2) RAM. (3) Virtual Memory.
(4) EPROM. (5) Flash Memory.
4. Microprocessors are usually compared by their clock speed, measured in ......................... or by their word
size, measured in ........................... that can be processed in a single clock cycle. Which of the following is
most appropriate to fill the blanks in the above statement?
(1) Bits, Megahertz (2) Bytes, Gigahertz (3) Gigahertz, Bytes
(4) Megahertz, Bits (5) Seconds, Bits
5. Typically the cache memory is used to store ....................................
(1) a large volume of data temporarily. (2) the least frequently accessed data permanently.
(3) the least frequently accessed data temporarily. (4) the most frequently accessed data temporarily.
(5) the most frequently accessed data permanently.
6. Sharing a single microprocessor among number of application programs using context switching is known as
(1) Multi-user processing. (2) Multitasking. (3) Multiprocessing.
(4) Batch processing. (5) Online processing.
7. Babbage’s Difference Engine is based on .............................
(1) mechanical technology. (2) vacuum tube technology.
(3) transistor technology. (4) Integrated Circuit (IC) technology.
(5) Very Large Scale Integrated (VLSI) Circuit technology.
8. Which of the following components is located outside the microprocessor?
(1) Arithmetic Logic Unit (ALU) (2) RAM
(3) Control Unit (4) Registers
(5) Level 1 cache memory
9. Which of the following is an incorrect Karnaugh Map layout to represent a Boolean function of four (4)
Boolean variables a, b, c and d?
(1) ab\cd 01 00 10 11 (2) ac\bd 01 00 10 11 (3) ab\cd 01 00 11 10
01 01 01
00 00 00
10 10 11
11 11 10
13. What will be the output when the following Python code is executed?
x = 6
while x > 0:
x = x - 2
print (x, end=' ')
(1) 6 (2) 4 2 (3) 2 4 6 (4) 4 2 0 (5) 0
16. What is the value after executing the Python expression 10–3 *2+2.0?
(1) 16 (2) 16.0 (3) 6 (4) 6.0 (5) 28
(5) a = 0
while (a <= 5):
a = a + 1
print(a)
23. Which of the following is the most appropriate Entity Relationship (ER) diagram to represent students
participation in different sports in school?
(1)
(2)
(3)
(4)
(5)
25. Which of the following is a testing Strategy which considers the internal implementation of a program into
account?
(1) Black box testing (2) White box testing (3) Integration testing
(4) Acceptance testing (5) Unit testing
26. Which of the following information System development models has an extremely short and linear development
process?
(1) Waterfall model (2) Object-Oriented model
(3) Spiral model (4) Incremental Development model
(5) Rapid Application Development model
B1 B2
A
C1 C2
B3
30. Which of the following statements best describes a non functional requirement of a system?
(1) A user shall be able to measure the blood pressure using an electronic blood pressure meter.
(2) A microwave oven should not exceed its temperature above 400°C.
(3) An electronic calculator should be able to compute square root of a given positive integer.
(4) An Automatic Teller Machine of a bank shall be able to check the validity of an ATM card.
(5) An internet banking system shall provide balance inquiry facility to its customers.
31. Which of the following statements is true with regard to data and information?
(1) Decision can be made only when a massive volume of data is available.
(2) Validity of information depends on the accuracy of data.
(3) Information obtained by processing data is always accurate.
(4) In order to obtain information, data must be collected from multiple sources.
(5) The accuracy of information. depends only on the accuracy of input data.
36. Which of the following tag is used to render a heading on an HTML page?
(1) <h2> (2) <ol> (3) <ul> (4) <hr> (5) <td>
37. Which of the following could be used to define a new markup language for sharing information?
(1) CSS (2) XML (3) HTML (4) XHTML (5) JavaScript
(5) Teacher
- A person who teaches in a school.
Student
- A person who is studying at a school
39. Which of the following statements is correct with regard to HTML tags?
(1) The <br> is used to render a blank line before and after the text.
(2) The <p> is used to render a blank line before and after the text.
(3) The <br> is used to render a blank line before the text.
(4) The <p> is used to render a blank line only before the text.
(5) The <p> is used to render a blank line only after the text.
40. Consider the following HTML code segments:
A - <embed height="50" width="100" src="song.mp3"></embed>
B - <a href="song.mp3">Song</a>
C - <embed height="50" width="100" href="song.mp3"></embed>
Which of the above code fragment(s) can be used to embed the audio file named ‘song.mp3’ in a web page?
(1) A only (2) B only (3) C only (4) A and B only (5) B and C only
41. What is the main function of a PROXY server in Internet communication?
(1) Allocate and release IP addresses (2) Translate domain names to IP addresses
(3) Protect a network from viruses (4) Provide printing services to users
(5) Share an Internet connection among several computers
42. An organization has been allocated a Class C IP address range having a subnet mask of 255.255.255.0. If
the organization is to setup a web server and an email server, what are the IP addresses that can be allocated
to these two servers?
(1) 192.248.87.2, 192.248.32.3 (2) 192.248.87.4, 192.248.87.5 (3) 192.248.32.3, 192.248.33.3
(4) 192.248.40.2, 192.248.41.3 (5) 192.248.87.1, 192.248.60.2
43. In communication networks, ISDN stands for
(1) Integrated Service Domain Name. (2) Internet Service Directory Name.
(3) Integrated Service Digital Network. (4) Internet Service Digital Network.
(5) Integrated Service Domain Network.
44. In the OSI reference model, detection of errors during communication between two computers in a network
is a function of the .....................................
(1) physical layer. (2) data link layer. (3) network layer.
(4) transport layer (5) application layer.
45. The command that can be used to login to a remote computer through a network is
(1) ipconfig. (2) ftp. (3) telnet. (4) tracert. (5) route.
46. Which of the following devices can be used to connect two physical networks having IP addresses 72.110.0.0
(subnet mask: 255.255.0.0) and 192.248.10.0 (subnet mask 255.255.255.0)?
(1) Hub (2) Repeater (3) Switch (4) Router (5) Multiplexer
48. Ubiquitous Computing is a/an ................. computing environment. The user will be able to use both ................
and .................... services.
Which of the following is most appropriate to fill the blanks in the above statement?
(1) everywhere, mobile, local (2) everywhere, local, remote (3) everywhere, local, paid
(4) virtual, local, remote (5) virtual, mobile, global
⁕⁕⁕
AL/2013/20/E-II #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
1. Consider the section of a web page on the Sri Lankan Test Cricket team, given in the Figure:
A partial HTML document of the file "cricket.html" which generates the above web page is given below.
Fill in the blanks of the HTML document with the appropriate tags to render the web page.
Notes:
1. When the user clicks on the phrase “Sri Lankan national cricket team” it should display the
document named “team.html”.
2. Name of the source file of the image displayed on the above webpage is “cricket.jpg”.
3. The link to the image “cricket.jpg” should have an alternative description “cricket”.
2. (a) If a computer system is byte addressable and uses 32-bit addresses to access any byte in its Do not
eeeeeeeeememory, what is the maximum usable size of its memory in Giga Bytes (GB)? Show all your write
in this
eeeeeeeeeworkings clearly.
column
(b) What is the relationship between a program and a process in an operating system?
(c) What is the need of having “swapped out and waiting” and “swapped out and blocked” states
in the seven state process model of an operating system?
3. (a) (i) Convert 1310 and –1910 into two’s complement numbers. Use 8-bits to represent a number. Do not
write
in this
column
(ii) Compute 1310 – 1910 by using two’s complement. numbers obtained in section (i) above and
give the answer in two’s complement form.
(iii) Explain how the positive and negative numbers in two’s complement can be converted into
decimal numbers.
(b) Give four (4) different examples for the following electronic business types:
Type Example
B2B
B2C
C2C
C2B
4. (a) Describe the relationship between a primary key and a foreign key in relational databases. Do not
write
in this
column
(b) Convert the following ER diagram to table structures in a relational database. The attribute capacity
may have values such as captain, vice captain, member etc.
(c) Based on the table structures obtained in section 4(b) above answer the following questions.
(i) Write an SQL statement to get a list of sports that do not have captains.
(ii) Write an SQL statement to obtain a list of students (studentId and name) who participate in
any sport as a captain.
⁕⁕
[See page seven
AL/2013/20/E-II -7- #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
Part B
⁕ Answer any four questions only.
1. (a) A fire alarm system consists of three sensors S1, S2 and S3 to detect smoke, flame and heat respectively.
eeeeA sensor can either be active (sends the logical value 1) or inactive (Sends the logical value 0). The
eeeesystem automatically triggers the fire alarm when at least two of the sensors are active.
(i) Construct the truth table to represent the functionality of the above fire alarm system.
(ii) Derive the Boolean expression to represent the above truth table.
(b) Consider the logic circuit shown here to answer the sections (i) and (ii) below:
A B C
(i) Write and simplify the Boolean expression for the above circuit using Boolean algebra. Show all the
workings and algebric rules used for the simplification.
(ii) Construct the logic circuit using a combination of only AND, OR and NOT gates for the simplified
Boolean expression obtained in section b(i) above.
(c) An organization has installed a web server, a mail server, a proxy server and a DHCP server to provide
Internet based services to its employees. There are ten (10) computers in the organization connected to
a local area network. IP addresses are dynamically allocated to these ten computers.
Assume that adequate network cables and two network switches are provided to connect computers to
the network. Each switch is capable of connecting a maximum of sixteen (16) computers to the network.
(i) Draw a network diagram to show how these ten computers are connected to the local area network.
(ii) Draw a separate network diagram to show how the web server and e-mail server are connected to the
Internet.
(iii) Draw another network diagram to show how the two networks designed in c(i) and c(ii) above can
be connected using a proxy server in order to provide Internet connectivity to computers connected
to the local network.
3. The director of a hospital has decided to maintain clinical history and demographic data, of all the patients
visiting the hospital, in a database. After the first visit of a patient, his/her clinical history is available to
the physician examining the patient.
(a) Give two (02) main reasons for replacing a manual record keeping system with an electronic database
system?
(b) Discuss two (02) disadvantages of maintaining clinical history in a database.
(c) Can maintaining clinical history of patients in a database be considered as a component of e-Government?
Justify your answer.
(d) The director of the hospital decides to allow external parties, such as, insurance companies to access this
database to obtain information. As an ICT student, what is your opinion on the decision made by the director?
4. (a) Explain what is done by the Python interpreter when executing the following program.
eeeeeYour explanation should include the types assigned to variables and type conversions.
a=4
b = 4.7
c=a+b
(b) Explain what will happen when the statements of the following Python program are executed.
total = 0.0
x = float(input("Enter a number:"))
while x > 0:
total = total + x
x = float(input("Enter a number:"))
print(total)
(c) You are requested to write a Python program to find and display the maximum value of given 10 integers.
The program should read integers one at a time.
(i) Propose an algorithm to solve the problem using a flow chart.
(ii) Write a Python program to implement your flow chart proposed in section c (i).
5. Draw an Entity Relationship (ER) diagram to represent the scenario given below. The attributes and the primary
keys of entities should be clearly indicated. State if any assumptions that you make clearly.
ABC cab Service Company does not own any car. Private car owners can register with the company and
also rent their cars. Some car owners provide more than one car to the company. The company hires drivers
for these cars. Any car available for rent can be driven by different drivers on different days. Car owners
are responsible for maintenance of their cars in order to provide a reliable service to the customers, After
completing each hire, the driver informs his current location to the company. When a customer requests a
car, the company looks for the availability of a car in the vicinity of the calling area. If a car is available,
company assigns that to the customer and informs both customer and the driver. The company tries its best
to assign the nearest available car to the customer to make its services more efficient. The company keeps
customer information such as name, address and the contact telephone number to provide a better service to
their regular customers. The customers can also inform to the company whether they are happy with the services
provided by the driver. This information is used when assigning drivers to the customers. Each car owner,
car, driver and the customer are given "ownerId", "carId", "driverId", and the "custId" respectively to identify
them uniquely.
6. A delivery service company established in Sri Lanka receives over 1 million parcels per day for distribution.
In order to send them to different parts of Sri Lanka, these parcels should be sorted and put into appropriate
delivery vans. At present, 5 people at the sorting department do this process manually. This process has a
drawback of putting parcels into wrong delivery van. Taking at least 3 days to distribute parcels received
within a day is also a weakness in this process. Therefore, the general manager has decided to automate the
sorting process by using a bar code system. The bar code pasted on parcel consists of the receiver’s postal
code. The proposed computer based system will read these bar codes, sort the parcels automatically and put
them into the correct delivery van through a conveyor belt without human intervention. The general manager
strongly believes that computerization will help them to overcome the current problems in the sorting process.
(a) Identify two functional requirements of the proposed computer based system. Justify your answer.
(b) State two non functional requirements of the system with justifications.
(c) Discuss, giving two reasons, whether the general manager’s decision to computerize the sorting process
is correct or not.
⁕⁕⁕
AL/2014/20/E-I #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka
YS% ;,xld
=j YS% ,xld úNd. fomd¾;fïka
úNd. fomd¾;fïka;=j YS% ,xld
;=júNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
Instructions:
⁕ Answer all the questions.
⁕ Write your Index Number in the space provided in the answer sheet.
⁕ Instructions are also given on the back of the answer sheet. Follow those carefully.
⁕ In each of the questions 1 to 50, pick one of the alternatives from (1), (2), (3), (4), (5) which is correct or most
appropriate and mark your response on the answer sheet with a cross (x) in accordance with the instructions
given on the back of the answer sheet.
⁕ Use of calculators is not allowed.
1. One of the principal inventors of the Electronic Numerical Integrator and Computer (ENIAC) was
(1) Blaise Pascal. (2) Charles Babbage. (3) John Von Neumann.
(4) Ada Augesta Lovelace. (5) John Presper Eckert.
2. Which of the following statements is correct with respect to the evolution of computing devices?
(1) Vacuum tubes were used by Blaise Pascal to build the Pascaline.
(2) The Pascaline is considered as a first generation computing device.
(3) Computers built using vacuum tubes are considered as second generation computers.
(4) Electronic Numerical Integrator and Computer (ENIAC) was built using vacuum tubes.
(5) Apple I and Apple II are two examples for second generation computers.
3. Which of the following statements is true with respect to programming languages?
(1) Machine languages belong to the second generation programming languages.
(2) Assembly language programs can run directly on any computer.
(3) Assembly languages belong to the first generation programming languages.
(4) Assembly language is more human readable form of machine language.
(5) Machine language programs can be translated into assembly language programs by using assemblers.
4. Which of the following statements is true with respect to comments in programming languages?
(1) At the time of execution, comments are translated into special machine instructions.
(2) Comments should always be limited to a single line.
(3) Comments should Start with the symbol # in all programming languages.
(4) It is a good practice to include comments in a program to explain its functionality.
(5) In Python programming, comments should always start at the first column.
5. Which of the followings is an invalid Python variable name?
(1) MyCountry (2) mycountry (3) My country (4) My country (5) _my_country_
6. The decimal number equivalent to the 1001112 is
(1) 40. (2) 39. (3) 38. (4) 37. (5) 36.
7. Which of the following converts digital data to analog data to transmit over an analog telephone network?
(1) Network Interface Card (NIC) (2) Modem
(3) Multiplexer (4) Bluetooth adaptor
(5) Wi-Fi card
8. A special digit inserted into a sequence of digits for data validation is called the ............................... digit.
Which of the following is most appropriate to fill the blank in the above statement?
(1) check (2) sign (3) least significant
(4) most significant (5) error
[See page two
AL/2014/20/E-I -2- #ictfromabc
9. The Sri Lankan cricket team won the T-20 World Cup-2014 tournament. The Sri Lankan cricket fans had
the highest value of this information when ..............................................
(1) the final match started.
(2) Thisara Perera scored the winning run.
(3) the captain Lasith Malinga received the trophy
(4) they saw the news on newspapers.
(5) they saw the cricket team at Katunayaka Airport.
10. 4A616 + 9910 =
(1) 61516 (2) 61510 (3) 50910 (4) 50916 (5) 65916
11. Representations of 510 and –910 in 8-bit Two’s complement forms are
(1) 00000101 and 11110111 respectively. (2) 11111011 and 11110111 respectively.
(3) 00000101 and 10001001 respectively. (4) 00000101 and 11110110 respectively.
(5) 11111011 and 11110110 respectively.
12. Consider the following logic circuit.
X Y Z
Which of the following circuit diagrams represents a simplified version of the above circuit?
X Y Z X Y Z
(1) (2)
Q
Q
X Y Z X Y Z
(3) (4)
Q Q
X Y Z
(5)
Q
13. Consider the following circuit with four push button switches namely: S1, S2, S3, and S4. These four
switches can either be in pushed or released states which are represented by 1 and 0 respectively. (Note:
In the circuit given below, all the switches are in released state having value 0.)
S2
S1 S4
S3
Which of the following Boolean expressions represents the function of the bulb, if the on state of the bulb
is represented by the value 1?
(1) S1 + (S2 . S3) + S4 (2) (S1 + S2) . (S3 + S4) (3) (S1 . S2) + (S3 . S4)
(4) S1 . S4 . (S2 + S3) (5) S2 + (S1 . S4) + S3
[See page three
AL/2014/20/E-I -3- #ictfromabc
shop
Which of the followings is the correct markup to include in the index.html to link greeting.html document?
(1) <a href = "/greeting/birthday/greeting.html">Greeting</a>
(2) <a href = "greeting/birthday/greeting.html">Greeting</a>
(3) <a href = "shop/greeting/birthday/greeting.html">Greeting</a>
(4) <a href = "birthday/greeting.html">Greeting</a>
(5) <a href = "greeting.html/birthday/greeting/shop/">Greeting</a>
19. Which of the followings is a client-side scripting language that is commonly used to add interactivity to
web pages?
(1) CSS (2) PHP (3) XML (4) HTML 2 (5) JavaScript
21. Facebook is a popular social network connecting millions of people with new members joining daily. Which
of the following statements is correct?
(1) Facebook plays a very important role in building and maintaining your family relationships.
(2) Facebook is the only social network available today.
(3) Privacy settings of Facebook assure the privacy of its users completely.
(4) Publishing private information in Facebook has resulted in unfortunate incidents.
(3) Real identity of a person is always guaranteed in Facebook.
22. Which of the following statements is true?
(1) Computer based learning is a teacher oriented learning technique.
(2) Skype is a famous video conferencing technique.
(3) Virtual Private Network (VPN) provides a medium for telecommuting.
(4) Conducting offline examinations can be considered as computer aided assessments.
(5) Microsoft Power Point is Free and Open Source Software (FOSS) for computer based presentations.
23. Computers attached to a LAN use the default gateway connected to the same network .................................
(1) to translate the domain names to IP addresses.
(2) to forward IP packets when they do not know any specific route to the destination.
(3) as the firewall for the network.
(4) to send all the data packets to other computers in the same LAN.
(5) to assign IP address to a computer on the LAN.
24. Which of the following statements is true?
(1) www.ebay.com is an example for C2C.
(2) When the government renders its services to the public through www then it is called B2C.
(3) www.wikipedia.com is an example for C2B.
(4) www.amazon.com is an example for B2E.
(5) Facebook groups are examples for E2C.
25. The command that can be used to measure the round trip propagation delay between two computers on the
Internet is
(1) ping. (2) ifconfig. (3) ssh. (4) ftp. (5) telnet.
26. In the OSI seven layer reference model, IP protocol maps to the ...................................... layer.
Which of the following is most appropriate to fill the blank in the above statement?
(1) application (2) session (3) transport (4) network (5) physical
• Consider the following three tables in a relational database to answer questions 31 to 34. Assume that a
subject has only one paper for an examination.
subject exam examSubject
subjectId title examId name examId subjectId examDate
SUB001 Information and Technology EXAM001 GCE OL EXAM001 SUB001 2014.12.12
SUB002 Chemistry EXAM002 GCE AL EXAM002 SUB001 2014.8.21
SUB003 Physics EXAM002 SUB002 2014.8.21
EXAM002 SUB003 2014.8.21
31. Which of the following is the most suitable Entity Relationship (ER) diagram to represent the above relational
database tables?
(1) (2)
(3) (4)
(5)
32. Which of the following is the correct primary key for examSubject table?
(1) examId (2) examId, subjectId (3) examId, examDate
(4) subjectId, examDate (5) examId, subjectId, name
33. Which of the following is the correct SQL statement to retrieve examId, name, and examDate of all examinations?
(1) select examSubject.examId, name, examDate from exam, examSubject where
eeeexam examId=examSubject.examId
(2) select examId, name, examDate from exam and examSubject where
eeeexam.examId=examSubject.examId
(3) select examId and name and examDate from exam and examSubject where
eeeexam.examId=examSubject.examId
(4) select * from exam and examSubject: where exam.examId=examSubject.examId
(5) select * from exam, examSubject where exam.examId=examSubject.examId
34. Which of the following SQL statements changes only the date of examination of Physics paper of GCE AL
examination to 2014.08.25?
(1) update examSubject set examDate='2014.08.25' where subjectId='SUB003' or ‘sub003'
(2) update examSubject set examDate='2014.08.25' where examId='EXAM002' or subjectId='SUB003'
(3) update examSubject set examDate='2014.08.25' where examId='EXAM002' and subjectId='SUB003'
(4) update examSubject set exam Date='2014.08.25' where examDate='2014.08 21'
(5) update examSubject set exam Date='2014.08.25' where examId='EXAM002' or subjectId='SUB003' or
eeeexam Date='2014.08.23'
35. The Pilot, Phase, Direct, and Parallel are four different kind of system ............................. strategies.
Which of the following is most appropriate to fill the blank in the above statement?
(1) analysis (2) design (3) testing
(4) implementation (5) maintenance
[See page six
AL/2014/20/E-I -6- #ictfromabc
36. Which of the following segment of a Data Flow Diagram best represents the process of getting the contact
list of a mobile phone?
Request for
(1) contact list
User Contacts
Generate contact list
Contact list
Request for
(2) contact list
User Contacts
Generate contact list
Contact list
Request for
(3) contact list
User Contacts
Generate contact list
Contact list
Request for
(4) contact list
User Contacts
Generate contact list
Contact list
Request for
(5) contact list
User Contacts
Generate contact list
Contact list
Start
No No
Print B Print C Print A
End
38. If a user input 20, 27, 18 for the variables, A, B, C respectively the output will be
(1) 18 (2) 20 (3) 27 (4) 20, 27 (5) 27, 18
39. Which of the following Python programs correctly implements the above flowchart?
(1) A = int(input("Enter a value for A:")) (2) A = int(input("Enter a value for A:"))
B = int(input("Enter a value for B:")) B = int(input("Enter a value for B:"))
C = int(input("Enter a value for C:")) C = int(input("Enter a value for C:"))
if (A > B): if (A > B):
if(A > C): if(A > C):
print(A) print(A)
else: else:
if(B > C): print(C)
print(B) else:
else: if(B > C):
print(C) print(B)
(3) A = int(input("Enter a value for A:")) (4) A = int(input("Enter a value for A:"))
B = int(input("Enter a value for B:")) B = int(input("Enter a value for B:"))
C = int(input("Enter a value for C:")) C = int(input("Enter a value for C:"))
if (A > B): if (A > B):
if(A > C): if(A > C):
print(A) print(C)
else: else:
print(C) print(A)
else: else:
if(B > C): if(B > C):
print(B) print(C)
else: else:
print(C) print(B)
40. What will be the output when the following Python code is executed?
a = ['a',2,[3,'b',4],[6,"abc",9],8]
print(a[2][2])
(1) 2 (2) [3, 'b', 4] (3) 'b' (4) 4 (5) 22
41. What is the value of variable z after executing the Python statement z = 1 = = 2?
(1) 0 (2) 1 (3) True (4) False (5) Null
42. Which of the following Python expressions shows the correct evaluation order of the Python expression
10 - 4 * 3/2 - 5?
(1) (((10 - 4) * 3)/2) - 5 (2) ((10 - (4 * 3))/2) - 5 (3) 10 - (4 * ((3/2) - 5))
(4) 10 - ((4 * (3/2) - 5) (5) (10 - ((4 * 3)/2)) - 5
43. Consider the following statements on Static Random Access Memory (SRAM):
A - SRAM needs periodic refreshing
B - It is used for Cache memory
C - Registers are made of SRAMs
Which of the above statement(s) is/are correct?
(1) A only (2) B only (3) A and B only (4) A and C only (5) B and C only
45. Which of the following systems should always be based on Artificial Intelligence?
A - Expert Systems
B - Enterprise Resource Planning (ERP) Systems
C - Multi-Agent Systems
D - Geographical Information Systems
(1) A and B only (2) A and C only (3) A and D only (4) B and D only (5) C and D only
47. Consider the following statements regarding the requirements of a Bank ATM:
A - A customer shall be able to inquire. his/her bank balance.
B - A customer should be able to deposit money through ATM.
C - Maximum withdrawal amount per day is Rs. 20,000.
Which of the above requirements is/are functional requirement(s) of the ATM?
(1) A only (2) B only (3) C only (4) A and B only (5) A and C only
50. Consider the following statements about syntax or semantic errors in Python programming language:
A - A program with syntax errors will not run to the end of the program.
B - A program with only semantic errors will not run to its end.
C - Syntax errors in programs are also called logical errors.
D - Programs with semantic errors may not produce correct outputs for some inputs.
(1) A and B only (2) A and C only (3) A and D only (4) B and C only (5) B and D only
⁕⁕⁕
AL/2014/20/E-II #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
Complete the following HTML code segment to display the above list.
<dl>
<..........................>CPU<..........................>
<..........................>ROM<..........................>
(b) Write the outputs of the following HTML code segments when rendered by a web browser.
(i) <abc>Greetings!</abc>
..................................................................
(ii) </u>Greetings!<u>
..................................................................
(c) Consider the following Output with check boxes rendered by a web browser:
Complete the following HTML code segment to render the above output.
<form method = "get" action = "">
...................................................................
...................................................................
...................................................................
...................................................................
</form>
2. (a) Show that the negative of 00012 is 11112. Note that both numbers are represented in two's Do not
eeeeeeeeecomplement form. write
in this
column
(b) ABC Company sells DVDs and tablet PCs, through eABC.com website. The company has
classified its transactions into business types as given in the first two columns of the following
table:
Business Transaction Agree? Reason
Type Yes/No
C2C Selling DVDs to
consumers
Do you agree with these classifications? (Yes/No) Give one reason to justify each of your
answers. Write your answers in the above table.
(c) The ABC company wants to introduce a new software agent service to monitor and display
frequently browsed items by its consumers via eABC.com web site. The following diagram
depicts the interactions among the consumer, company web site and the software agent.
A B C
Draw lines and connect the rows in the following two tables to represent the above scenario.
A Software Agent
B Company Web site
C Consumer
3. You are given the following two tables in a relational database. Do not
write
house student in this
column
houseID name studentID name grade houseID
(a) The above tables were created by converting the ER diagram given below.
Fill in the following blanks with the suitable labels or necessary information for the A, B, C, D
and E shown in the ER diagram.
A - ............................................................................................
B - ............................................................................................
C - ............................................................................................
D - ............................................................................................
E - ............................................................................................
(b) State whether the relationship between the tables student and house, is one-to-one, one-to-many,
or many-to-many. Justify your answer using suitable data from the above tables.
4. (a) The memory of a computer system is byte addressable and has a maximum usable size of 4GB.
eeeeeeeeeWhat is the minimum width of its address bus in bits? Show all your workings clearly.
(c) Consider the following process state transition diagram in an operating system: Do not
write
in this
Process State Transition Diagram column
Created (New) C
release
Main Memory
admit B
dispatch I/O wait
admit timeout
A D
I/O completed
activate activate
suspend suspend Secondary Storage
Fill in the blanks in the table given below by providing most suitable terms for the labels A,
B, C and D.
Label Term
A
⁕⁕
Part B
⁕ Answer any four questions only.
1. An alarm system has been designed to detect break-ins by using three detectors. They are a motion detector,
a glass break detector and a blackout detector. A detector can either be active (sends the logical value 1) or
inactive (sends the logical value 0).
The system automatically detects a break-in and triggers the alarm (sends the logical value 1) only when all
the three detectors are simultaneously active, or the blackout detector and anyone of the remaining detectors
are active.
(a) Construct a truth table to represent the functionality of the above alarm system.
(b) (i) Derive the Boolean expression to represent the truth table constructed in section (a) above.
(ii) Simplify the Boolean expression obtained in section (b) (i) above, using Boolean algebra. Clearly
eeeeshow all the workings and Boolean algebraic rules used for this simplification.
(iii) Construct the logic circuit for the simplified Boolean expression obtained in section (b) (ii) above.
(c) The analysis of the past incidents where the alarm triggered reveals that break-in attempts have been
made only during blackouts. Do you agree with the above statement? Justify your answer.
2. (a) Draw a diagram depicting the seven layers of the OSI reference model.
(b) You have received an email supposedly from the administrator of your email system notifying that your
eeeeeemail account is about to be closed soon. It requests you to click on a link in the email and enter
eeeeeyour current user name and the password if you want to continue using your email account. What is
eeeeethe main threat to the security if you agree with this request?
(c) Draw diagrams to depict the following LAN topologies.
(i) Bus
(ii) Star
(iii) Ring
(d) A new tool MRTT was used to measure the round trip time for data packets on the Internet between two
machines. One machine is at the location X and the other one is at Y The MRIT reported a round trip
time between X and Y as 8 ms. The straight-line-distance between point X and point Y is 3000 km and
the maximum speed of light is 300000 km/s. Based on the above information, can this tool MRIT be
relied upon? Justify your answer.
3. Consider the following employee evaluation process of a software development company to answer the
questions given below.
A software development company has 600 employees. The company manually evaluates each employee's
performance at the end of each year. These performance results are used to decide employees’ salary increments
for the next year. In this process, each employee is evaluated based on several performance indicators listed
in an evaluation form and marks for these indicators are given by his/her superiors. The evaluation process
consumes significant amount of each employee’s working time. Once the marks are gathered, Human Resource
(HR) manager takes around two months to compile them to prepare a report. A committee comprises of two
executives from the HR department and an expert from the Finance department are appointed to decide the
salary increments of each employee. This committee makes their decision based on the HR manager’s report
and the special report given by the finance expert in this committee. The finance expert uses his experiences
of the past evaluation process in addition to the organizational guidelines to prepare his special report. This
eeeeee
[See page eight
AL/2014/20/E-II -8- #ictfromabc
finance expert usually takes around three months to make his recommendations to the committee. This process
delays the salary increments of the employees and makes them unhappy. The employees have requested the
management to expedite this process and give them the increment in-time.
The company has decided to computerize this year-end employee evaluation process as an online system. The
proposed system functions as follows: Only during the evaluation period, employees are allowed to login to the
online evaluation system. Each employee is required to logged into the system and select a subordinate to
evaluate. Then the system requests to provide marks in the evaluation form of the selected employee and submit
it. At the end of the evaluation period, the system automatically compiles the data, generates a report and
forwards it to the appointed committee.
(a) State two key reasons, that make the company to introduce online computerized system.
(b) Company thinks that an Artificial Intelligence based system would reduce the time taken to this process.
Do you agree? Justify your answer.
(c) Do you consider the service provided by the company through this system to its employee as B2E?
Justify your answer.
(d) Company decides to invite an outside expert to the committee. State one negative impact of this decision.
4. (a) Explain what is done by the Python interpreter when executing the following statements. You should
eeeeestate the types of the variables involved.
(i) x = input("Enter a number")
(ii) infile = open("myfile.txt","r")
(iii) a = "a,b,c".split(",")
5. Draw an Entity Relationship (ER) diagram to represent the scenario given below. In your diagram the attributes
and the primary keys should be clearly indicated. Clearly state your assumptions, if any.
The EST University has three faculties: Education, Science, and Information Technology. Each faculty can
offer one or more degree programs. The Faculty of Education and the Faculty of Science offer Bachelor of
Education and Bachelor of Science degree programs respectively. However, the Faculty of Information
Technology offers two degree programs: Bachelor of Science in Information Technology and Bachelor of Science
in Software. Engineering. At the time of the registration, students should pay the full degree program fee which
may differ from one degree program to another. A student can enroll in only one degree program at a time.
A degree program has two types of course units: compulsory and optional. A course unit can be available
in more than one degree program. EST university has many lecturers. A lecturer can be assigned to one or
more course units. A course unit can be assigned to one or more lecturers. Number of hours allocated for a
course unit is distributed among the assigned lecturers when more than one lecturer is assigned to a course
unit. Each faculty, degree program, course unit, lecturer, and student are uniquely identified by ‘facultyID’,
‘degreeID’, ‘courseID’, ‘lecturerID’ and ‘studentID’ respectively.
6. A university in Sri Lanka has around 8000 students. It has only one library. Currently, three library assistants
provide all the library services such as lending, returns and answering the queries from the students. It is
observed that about 90% of the students use the library facilities from 7:00 a.m. to 9:00 a.m., 12 noon to
1:00 p.m. and 6:00 p.m. to 7:00 p.m. Long queues of students can be seen in front of the three counters
manned by the three library assistants during those hours. This situation has led to students’ unrest since they
have to waste their time in long queues. Library assistants are also not happy due to heavy work load and
sometimes this has lead them to make mistakes.
(a) Identify and state three functional requirements associated with the above university library system.
(b) Identify and state two non-functional requirements related to the above system with justifications.
(c) Propose two different computerized solutions and one non computer-based solution to solve the problems
in the university library system.
⁕⁕⁕
AL/2015/20/E-I #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka
YS% ;,xld
=j YS% ,xld úNd. fomd¾;fïka
úNd. fomd¾;fïka;=j YS% ,xld
;=júNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
Instructions:
⁕ Answer all the questions.
⁕ Write your Index Number in the space provided in the answer sheet.
⁕ Instructions are also given on the back of the answer sheet. Follow those carefully.
⁕ In each of the questions 1 to 50, pick one of the alternatives from (1), (2), (3), (4), (5) which is correct or most
appropriate and mark your response on the answer sheet with a cross (x) in accordance with the instructions
given on the back of the answer sheet.
⁕ Use of calculators is not allowed.
1. Charles Babbage is considered as the “father of the computer” by some people. That is because he
(1) invented the mechanical calculator Pascaline.
(2) invented the first re-programmable electronic computing machine.
(3) took the leadership in building the first personal computer at IBM.
(4) introduced the concept of “Input, Process and Output” that is used in modern computers, for the first time.
(5) is the founder of the first electronic digital computer ENIAC (Electronic Numerical Integrator And Computer).
2. The first generation computers were based on
(1) Very Large Scale Integration (VLSI) technology.
(2) Large Scale Integration (LSI) technology.
(3) Integrated Circuits (ICs).
(4) Transistors.
(5) Vacuum tubes.
3. The decimal number equivalent to 1101102 is
(1) 39. (2) 48. (3) 54. (4) 55. (5) 108.
4. Consider the following list rendered by a web browser:
1. Pineapple
2. Mango
3. Banana
Which of the following HTML tags can be used to create the above list?
(1) <dd> (2) <dl> (3) <li> (4) <ol> (5) <ul>
5. Random Access Memory (RAM) modules are often compared by their capacity, measured in ......................
and by their speed, measured in ...................... .
Most suitable words to fill the blanks of the above statements are respectively
(1) Kilobytes, Gigabytes (2) Gigabytes, Megabits per second
(3) Gigabytes, Megahertz (4) Megahertz, Kilohertz
(5) Gigabits, Megabits per second
6. An application which requires more memory space than the maximum memory space available in the primary
memory of a computer is ready for execution. Which of the followings is used by the operating system of
that computer to satisfy this need?
(1) Random Access Memory (RAM) (2) Read Only Memory (ROM)
(3) Cache Memory (4) Virtual Memory
(5) Extended Memory
7. 48B16 + 001010112 =
(1) 4B616 (2) 31016 (3) 50316 (4) 51316 (5) 55916
[See page two
AL/2015/20/E-I -2- #ictfromabc
8. The feature in modern operating systems which allows the automatic installation of new hardware devices
connected to a computer is commonly known as
(1) Add/Remove Hardware. (2) Easy Installer. (3) Plug and Play.
(4) Add Hardware Utility. (5) Fetch and Store.
9. Which of the following is not a typical use of the Random Access Memory (RAM) of a personal computer?
(1) Keeping data for processing.
(2) Holding instructions for operations.
(3) Providing storage for operating system.
(4) Retaining information for output.
(5) Keeping the BIOS program for boot-up.
11. Consider the following combinatory circuit implemented using universal gates:
Input Output
14. Some provinces in Sri Lanka currently issue revenue licenses for motor vehicles online. Which of the
following is the correct business type for this service?
(1) B2C (2) B2B (3) C2B (4) B2E (5) G2C
17. What is the correct CSS rule to set the background colour of a web page to yellow?
(1) body {body-color: "yellow";} (2) body {bgcolor: yellow;}
(3) body {background-color: yellow;} (4) body {bgcolor = yellow}
(5) body {background-color = yellow;}
18. Which of the following statements is correct with respect to the Transmission Control Protocol (TCP)?
(1) TCP is a network layer protocol.
(2) TCP guarantees that each byte sent is received at the receiver.
(3) Only one application at a time can use TCP in a computer.
(4) HTTP uses TCP.
(5) TCP uses User Datagram Protocol (UDP) as the transport protocol.
19. A LAN uses the subnet mask 255.255.240.0. How many different IP addresses can be assigned to devices
in this LAN?
(1) 254 (2) 256 (3) 1024 (4) 2046 (5) 4094
20. Which of the following statements is correct with respect to routing in the Internet?
(1) There can be at most one router in any given LAN.
(2) A router can have more than one network interface.
(3) Routing is a functionality of the Transport Layer.
(4) All routers function as HTTP proxies.
(5) The Internet does not need routing if all applications use TCP.
22. In a public key encryption system, the private key of a person x is given by the function priv(x) and the
public key is given by pub(x). Consider the following statements:
A - pub(x) is used to encrypt a message that can only be decrypted using priv(x).
B - pub(x) is used to sign a message to be sent to x.
C - A message encrypted using pub(x) can be decrypted using pub(x).
Which of the above statement(s) is/are correct?
(1) A only (2) B only (3) C only (4) A and B only (5) B and C only
23. Consider the following statements regarding a server with the domain name www.bogus.lk:
A - The server www.bogus.lk can be located anywhere in the world.
B - www.bogus.lk must be a web server.
C - The domain names www.bogus.lk and www.bogus.com can be resolved to the same IP address.
Which of the above statement(s) is/are correct?
(1) A only (2) B only (3) C only (4) A and B only (5) A and C only
25. Consider the following statements about the World Wide Web (WWW):
A - It is a collection of interlinked, hypertext documents accessed via the Internet.
B - It is a protocol for distributing information via computers connected to the Internet.
C - It was invented by the World Wide Web Consortium (W3C).
Which of the above statement(s) is/are correct?
(1) A only (2) B only (3) C only (4) A and B only (5) A and C only
26. Consider the following statements on Dynamic Random Access Memory (DRAM) and Static Random Access
Memory (SRAM):
A - Registers are made of DRAM
B - DRAM is faster than SRAM
C - DRAM is more dense than SRAM
Which of the above statement(s) is/are correct?
(1) A only (2) B only (3) C only (4) A and B only (5) B and C only
27. ABC Holdings is a manufacturing organization in Sri Lanka which has its head office in Japan. What is the
most convenient method to conduct weekly progress review meetings between the local staff in Sri Lanka
and the senior management team in Japan?
(1) Telephone calls (2) Skype (3) E-mail (4) SMS (5) YouTube
31. Which of the following Python programs implements the behaviour of the flowchart?
(1) x = int(input("Enter a value : ")) (2) x = int(input("Enter a value : "))
n = 1 n = 1
t = 0 t = 0
while n <= x: while n <= x:
y = int(input("Enter the next value: ")) y =int(input("Enter the next value: "))
t = t + y t = t + y
n = n + 1 n = n + 1
print(t) print(t)
32. Consider the following statement regarding an Automatic Teller Machine (ATM) of a bank:
“System shall dispense cash in less than 10 seconds.”
Which of the following is correct with respect to the above statement?
(1) This is an essential non-functional requirement.
(2) This is a nice to have non-functional requirement.
(3) This is an essential functional requirement.
(4) This is a nice to have functional requirement.
(5) This is not a requirement of the system.
1
M1 C
B
*
According to the Structured System Analysis and Design Methodology (SSADM), the components A, B and
C in the above diagram represent........................... respectively.
(1) an external entity, a process and a data flow
(2) a process, an entity and a data store
(3) a user, a process and a table in an electronic database
(4) a user, a function and a table in an electronic database
(5) an external entity, a process and a data store
34. Which of the following statements is correct with respect to openness and closeness of a system?
(1) An Automatic Teller Machine of a bank should be a close system.
(2) A general purpose computer can be considered as an open system.
(3) Human blood circulatory system is an open system.
(4) A mobile phone is a close system.
(5) A solar power generation system is a close system.
35. Which of the following graphs illustrates the Golden rule of information?
Value of information
Value of information
Value of information
Time Time Time
Value of information
Time Time
(4) (5)
37. Which of the following is correct with respect to attributes of the relations?
(1) Attributes gender, NIC and mobilePhoneNumber are candidate keys of programmer relation.
(2) Attribute startDate is a derived attribute.
(3) Attribute NIC can be considered as an alternate key for the programmer relation.
(4) Attribute startDate is a foreign key for the workFor relation.
(5) Each record in the workFor relation can be uniquely identified by using projectId.
• Consider the following four relational database tables to answer questions 40 and 41.
40. Which of the following actions is taken by a database management system when the SQL statement “delete
from item” is executed?
(1) It will ask the user to select records for deletion.
(2) It may delete all the records from the 'item' table.
(3) It will drop the 'item' table.
(4) It will not delete any record from the 'item' table.
(5) The SQL statement will not be executed since it has errors.
41. Which of the following is correct with respect to the above tables?
(1) All the tables are in third normal form.
(2) Normalization has been applied to these tables.
(3) Integrity constraints are correctly applied to these tables.
(4) There is no evidence to say that integrity constraints are properly applied.
(5) Normalization and integrity constraints are properly applied.
43. A file of 1 MB has been successfully sent from the machine X to machine Y in a network over a TCP
connection. It has been observed that the 10th byte of the file has passed through the router R. Consider
the following statements regarding this communication:
A - The 10,000th byte must have gone through the router R after the 10th byte.
B - The 10,000th byte must have gone through the same path from X to Y as the 10th byte.
C - The 10,000th byte may or may not have gone through the router R.
Which of the above statement(s) is/are correct?
(1) A only (2) B only (3) C only (4) A and B only (5) B and C only
def f(b):
n1,n2 = b[0],b[0]
for m in b:
if(m > n1):
n1 = m
if(m < n2):
n2 = m
return n1, n2
print(f(temp))
45. What is the data type of the variable temp in this Python code?
(1) Integer (2) Float (3) Boolean (4) Tuple (5) List
46. What is the return data type of the function named " f "?
(1) Integer (2) Float (3) Boolean (4) Tuple (5) List
47. Which of the following value/s is/are in the output of the above program?
(1) 23 and 45 (2) 45 and –2 (3) –2 and 0 (4) 0 (5) 23
50. Which of the following is/are examples for artificial intelligence techniques?
A - Neural Networks
B - Genetic Algorithms
C - Ubiquitous Computing
(1) A only (2) B only (3) A and B only (4) A and C only (5) B and C only
⁕⁕⁕
AL/2015/20/E-II #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
The partial HTML code segment given below is prepared to generate the above form. Complete
the code segment to render the above form.
<h2>Send Text Message</h2>
<p>Fill in all the fields and click Send Message</p>
<form action="" method="POST">
<div class = "a">
<div class = “l"> Phone No.:</div>
<div class = "r"><input type=................................ name="phone" size="20"></div>
</div>
<div class = "a">
<div class = "l">Message:</div>
<div class = "r"><.......................................name="message" rows="7" cols="30">
</........................................................></div>
</div>
<div class = "a">
<div class = "r"><input type="submit" value=.............................................></div>
</div>
</form>
(i) .................................................................................................................................
(ii) .................................................................................................................................
(c) Indicate whether the following CSS rules are syntactically correct or incorrect. If a rule is incorrect
write the correct version.
(i) p {color: red} .................................................................
p {font-type: Arial;} .................................................................
.................................................................
(ii) body{color: red;} .................................................................
{background-color: yellow;} .................................................................
.................................................................
(iii) h1, h3{color: blue;} .................................................................
.................................................................
.................................................................
2. (a) Assume that in a particular digital device integers are represented in 8-bits two’s complement form.
eeee eeeeHowever, the results of computations are printed in decimal.
e
(iii) Explain how the computation of 1010 - 2510 done by the device by using your representations
given in sections (i) and (ii) above.
(iv) List the steps necessary to transform the result Obtained in section (iii) above into decimal Do not
write
form in order to print the answer.
in this
column
(b) A bank offers services, such as maintaining savings and current accounts, Automatic Teller
Machine (ATM) services, processing loans, leasing properties and exchanging foreign currencies
to its customers. The bank has decided to introduce Internet banking facility to its customers
to grant them with more control on their accounts. This will facilitate its customers to check
account balance, pay bills, transfer funds to other accounts and communicate with the bank
online.
(i) State two reasons that can discourage bank customers from using Internet banking services.
(ii) Do you agree that providing the proposed Internet banking services is a B2C business
type? Justify your answer.
(iii) The bank has realized that a significant number of loan applications they receive from their
customers are getting rejected at the initial screening. Therefore, the management thinks
that their customers could be provided with an expert system based loan pre-processing
tool so that the customer disappointments could be reduced while saving bank staff’s time.
Do you agree with this idea? Justify your answer.
3. (a) Albert Einstein quoted “Energy cannot be created or destroyed; it can only be changed from one Do not
write
eeeeeeeeeform to another.” in this
(i) State whether the process of changing energy from one form to another is a close system. column
(ii) State a reason to justify your answer given for (a) (i), above.
(b) Consider the following Data Definition Language (DDL) statement to answer the questions b (i)
and b (ii).
CREATE TABLE unit (
instituteCode varchar(10) NOT NULL,
unitCode varchar(10) NOT NULL,
unitTitle varchar(50) DEFAULT NULL,
PRIMARY KEY (instituteCode,unitCode),
FOREIGN KEY (instituteCode) REFERENCES institute(instituteCode))
(ii) What are the integrity constraints used in the above DDL?
4. (a) A 32-bit computer has a byte addressable main memory. The computer uses 32-bit addresses to
eeeeeeeeeaccess any byte in its memory. It is observed that a maximum of 4 GB memory is available
eeeeeeeeefor a process even after the main memory is replaced by an 8 GB memory. Explain, with all
eeeeeeeeethe calculations, why this happens.
(b) An operating system uses seven state process transition model for process scheduling. A given
process is currently in the running state of the above model. Fill the following table with the
correct next possible state and condition for transitions.
⁕⁕
[See page seven
AL/2015/20/E-II -7- #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
Part B
⁕ Answer any four questions only.
1. (a) Explain how to derive a Boolean expression from a given truth table.
(b) In residential electrical wiring, the following circuit has been used to operate a light in a staircase.
X X
Y Y
Switch s1 Switch s2
Power
Source P
Lamp L
As in the above circuit, two switches S1 and S2 are installed at the bottom and the top of the staircase
to operate the lamp L. The lamp turned on by using the switch S1 at the bottom of the staircase can
be turned off by using the switch S2 at the top of the staircase. Further, the lamp turned on by using
switch S2 at the top of the staircase can also be turned off by using the switch S1 at the bottom of
the staircase. Moreover, the lamp L turned on by a switch can be turned off by the same switch.
Assume that the connections to positions X and Y of a switch in the above circuit are represented by the
truth values 1 and 0 respectively and the turned on and turned off states of the lamp L are represented
by the truth values 1 and 0 respectively.
(i) Construct a truth table to represent the functionality of the above circuit.
(ii) Derive a Boolean expression to represent the truth table obtained in section (i) above.
(iii) What is the logic gate which is equivalent to the functionality of the Boolean expression obtained
in section (ii) above?
(iv) Construct a logic circuit for the Boolean expression obtained in section (ii) above with NOT, AND
and OR gates only.
2. (a) The IP address 125.214.169.218 is assigned to the server www.doenets.lk. The ping 125.214.169.218
eeeecommand issued from the machine A reported a round trip time (RTT) of 20 ms.
However, the ping www.doenets.lk command, issued some time later from the machine A, reported an
eeeeerror.
(i) Draw a network diagram to depict the server, machine A and any other required components to
describe the above scenario.
(ii) Identify two possible causes for the above behaviour and explain them using the diagram developed
in section (a) (i) above.
(b) An organization has only one public IP address, 192.248.17.1, allocated to it. The organization has decided
to allow web browsing on the computers on its LAN with 100 computers. It also wants to optimize the
usage of its Internet connection by reducing the traffic on the link as much as possible.
Draw a network diagram to satisfy the above requirements. Explain the major decisions you made.
3. The National University of Information Technology is a well-recognized university. They offer both bachelors
and post-graduate degree programmes, diplomas as well as short courses in information technology and
business management. All teaching of the above courses is being conducted at their sophisticated classrooms
and state-of-the-art computer laboratories specifically designed to provide a student-centred interactive learning
experience. The management of the university has realized that their brand name has become well known
in the country as the number of inquiries they receive from far away provinces has increased. Furthermore,
a recent study has revealed that their short courses and diplomas are also very popular among working
professionals despite the burdens of their busy work schedules as well as the limited time available to
devote for education. Hence, the management has proposed to start a distance education programme with the
objectives of providing new value added services and capturing new markets.
(a) Propose an ICT based system to implement the above distance education programme. Describe its main
components by using a simple diagram.
(b) Explain three advantages of the proposed system.
(c) Discuss three challenges of the proposed system.
(d) The management thinks that agent technology based techniques could be used to overcome some of the
above challenges. Do you agree with this statement? Justify your answer.
4. (a) Explain why compilers or interpreters are needed when using high level programming languages.
(b) Your teacher has requested you to write a Python program to record the marks obtained by students at
the term test. Each student has sat for the same three papers and each mark was given as an integer
value out of 100 marks. Each student is identified by a unique index member which is also an integer.
You should record the marks of student in a text file named ‘marks.txt’ in the following format.
Index_no_1,mark_11,mark_12,mark_13
Index_no_2,mark_21,mark_22,mark_23
............................................................
Where
Index_no_X : Index number of the Xth student; X = 1, .................., n
mark_XY : Marks obtained by the Xth student for the Yth paper: Y = 1, 2, 3
Index numbers and marks of the students should be entered through the keyboard, one item at a time
and the program should be terminated when –1 is entered as the index number.
(i) Propose an algorithm by using a flowchart for the program.
(ii) Write a Python program to implement your flowchart.
5. A pharmacy named “DR Chemists” sells drugs to patients. A patient should produce a prescription to a
pharmacist at the pharmacy to buy drugs. A prescription has one or more drugs prescribed by a doctor. A
doctor can issue more than one prescription for a patient. However, a prescription is issued by one doctor.
Pharmacist prepares a bill for each prescription and gives it to the patient. Five (05) pharmacists at the
pharmacy handle all prescriptions.
A pharmacist handles more than one prescription while one prescription is handled only by one pharmacist.
The upper part of the prescription contains the patient information such as name, age, address and telephone
number. The middle part of the prescription consists of one or more drug names, quantities to be issued and
the dosages. At the bottom part name, address and telephone number of the hospital and the name of the
doctor are available.
The owner of the pharmacy wants to keep the necessary information to prepare the following list of reports.
1. Number of prescriptions handled by each pharmacist.
2. Number of prescriptions issued by each doctor.
3. List of information about doctors, their hospitals and drugs prescribed by them.
4. List of daily cash collection of the pharmacy.
Prepare an ER diagram to model the data required to produce the above reports. State clearly all your
assumptions, if any.
6. Draw a context diagram to show the overview of the library system described below. Clearly indicate external
entities and data flows of your diagram and state any acceptable assumptions that you have made.
The National Information Technology Library (NITL) provides e-books to its users through an online system
named “Library Information Processing System (LIPS)”.
A person should submit an application to NITL to become a member of the LIPS. The NITL evaluates the
application and enters it to the LIPS, if it is approved. After entering the application data, LIPS issues an
activation code to NITL which in turn passes it to the relevant person. Once the activation code is received
the person becomes a member of LIPS. A member can obtain his/her username and password by providing
the activation code to the LIPS. A member can subsequently access e-books by entering his/her username
and the password to the LIPS.
⁕⁕⁕
AL/2016/20/E-I #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka
YS% ;,xld
=j YS% ,xld úNd. fomd¾;fïka
úNd. fomd¾;fïka;=j YS% ,xld
;=júNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
Instructions:
⁕ Answer all the questions.
⁕ Write your Index Number in the space provided in the answer sheet.
⁕ Instructions are also given on the back of the answer sheet. Follow those carefully.
⁕ In each of the questions 1 to 50, pick one of the alternatives from (1), (2), (3), (4), (5) which is correct or most
appropriate and mark your response on the answer sheet with a cross (x) in accordance with the instructions
given on the back of the answer sheet.
⁕ Use of calculators is not allowed.
7. 10116 + 1108 =
(1) 42910 (2) 101110 (3) 32910 (4) 52910 (5) 13710
[See page two
AL/2016/20/E-I -2- #ictfromabc
8. In an operating system, suspending the currently executing process and then resuming or starting another
process is termed as
(1) paging. (2) context switching. (3) swapping.
(4) interrupting. (5) blocking.
9. In modern operating systems, the .................... scheduler determines the transition of processes from the new
state to the ready state.
Which of the followings is the correct term to fill the blank in the above statement?
(1) mid-term (2) long-term (3) very long-term
(4) very short-term (5) short-term
11. Consider the following logic circuit implemented using universal gates:
12. “An analog signal is sampled at regular intervals and represented as 16 bit values.”
Which of the followings is best described by the above statement?
(1) Amplitude Modulation (AM) (2) Frequency Modulation (FM)
(3) Pulse Code Modulation (PCM) (4) Phase Modulation (PM)
(5) Pulse Width Modulation (PWM)
13. Two machines with the IP addresses 192.248.16.30 and 192.248.16.90 are connected to a Local Area Network
(LAN). Which of the followings is a suitable subnet mask for this network?
(1) 192.255.255.255 (2) 192.248.16.0 (3) 255.255.255.224
(4) 255.255.255.128 (5) 255.255.255.255
22. In a public key cryptographic system, the private key of a person x is given by the function priv(x) and the
public key is given by the function pub(x).
Consider the following statements:
A - priv(x) and pub(x) should be the same for better security.
B - A message encrypted using pub(x) can be decrypted using pub(x).
C - The person x knows both priv(x) and pub(x).
Which of the above statements is/are correct?
(1) A only (2) C only (3) A and B only
(4) A and C only (5) B and C only
23. Local Area Network (LAN) has 500 network devices. What is the most appropriate subnet mask for this
computer network?
(1) 255.255.255.0 (2) 255.255.255.128 (3) 255.255.255.192
(4) 255.255.255.224 (5) 255.255.254.0
24. Consider the following statements about compilers and interpreters used in programming languages:
A - Compilers/interpreters are not required to execute a program written in assembly language.
B - Compilers are not essential to execute a program in machine code.
C - An executable program is translated into a source program by a compiler.
Which of the above statements is/are correct?
(1) A only (2) B only (3) C only
(4) A and B only (5) B and C only
25. A web browser running on a client computer A renders a web page in a web server running on a computer B.
Which of the following is not a factor that affects the speed of rendering?
(1) Size of images in the web page (2) Number of colours in the web page
(3) Speed of the client computer (4) Efficiency of the web browser software
(5) Number of users in the network
26. Consider the following statements about Dynamic Random Access Memory (DRAM):
A - Periodic refreshing is required for DRAM.
B - Registers in the processor are made of DRAMs.
C - Memory density of DRAM is higher than that of static RAM.
Which of the above statements is/are correct?
(1) A only (2) B only (3) A and B only
(4) A and C only (5) B and C only
27. “Employees of modern organizations perform their duties from home.” Which of the followings best describes
the above statement?
(1) Social networking (2) Telecommuting (3) Instant messaging
(4) Office automation (5) Blogging
[See page four
AL/2016/20/E-I -4- #ictfromabc
29. The algorithm represented by the following flowchart reads 5 numbers and prints the sum of them.
Start
tot = 0
No
B? Print tot
Yes
i=i+1
In order to execute the above flowchart correctly, A and B should be replaced by ...................... respectively.
Which of the followings is suitable to fill the blank in the above statement?
(1) i = 0 and i ≤ 5 (2) i = 1 and i = 5 (3) i = 0 and i > 5
(4) i = 1 and i ≤ 5 (5) i = 1 and i ≥ 5
30. Which of the following Python programs computes the sum of five given integers?
(1) i = 1 (2) i = 1
tot = 0 tot = 0
while i > 5: while i <= 5:
x = int(input()) x = int(input())
tot = tot + x tot = tot + x
i = i + 1 i = i + 1
print(tot) print(tot)
(3) i = 1 (4) i = 0
tot = 0 tot = 0
while i == 5: while i > 5:
x = int(input()) x = int(input())
tot = tot + x tot = tot + x
i = i + 1 i = i + 1
print(tot) print(tot)
(5) i = 0
tot = 0
while i <= 5:
x = int(input())
tot = tot + x
i = i + 1
print(tot)
32. Which of the following statements is an example for an essential non-functional requirement of an Internet
banking system?
(1) System shall facilitate its users to open accounts.
(2) System shall facilitate its users to check account balance.
(3) System shall use a 256-bit encryption for all communications.
(4) System should facilitate its users to order cheque books.
(5) System should be able to render information on all popular web browsers.
33. Which of the following is the most appropriate example for a manual temporary data store?
(1) A file tray (2) A cardboard file (3) A file cabinet
(4) A data file in a hard disk (5) A temporary data file in a hard disk
34. Which of the following high-level data flow diagrams is correct with respect to the rules on data flow
modelling?
1
(1) A M1 C
B
1
(2) A M1 C
B
1
(3) A M1 C
B
1
(4) A M1 C
B
1
(5) A M1 C
B
37. Which of the followings can be a candidate key of the above relation?
(1) BN (2) publisher (3) version (4) author1 (5) author2
[See page six
AL/2016/20/E-I -6- #ictfromabc
38. Which of the followings is correct with respect to the term ‘domain’ in a relational database?
(1) It is a set of possible names for a table.
(2) It is a set of possible names for an attribute.
(3) It is the collection of all possible primary keys.
(4) It is the set of all possible values of an attribute.
(5) It is the collection of foreign keys.
42. What will be the value of the variable x, after executing the following Python statement?
x = 3 – 4 * 6 / 3 + 12 / 4 * 3
(1) –5.0 (2) – 4.0 (3) –1.0 (4) 4.0 (5) 5.0
46. Which of the followings is correct with respect to the output of an SQL statement?
(1) It generates an error if no data is available in the tables referred in the SQL statement.
(2) It is always a table.
(3) The order of the attributes in the output should be the same as the order of attributes in the table definition.
(4) Outputs cannot be produced if the primary keys are not defined.
(5) Names of the attributes in the output should be the same as the names in the table definition.
[See page seven
AL/2016/20/E-I -7- #ictfromabc
47. The length of an attribute defined using a Data Definition Language (DDL) statement is a/an .................
constraint.
Which of the followings is the most appropriate to fill the blank in the above statement?
(1) primary key (2) foreign key (3) null value (4) domain (5) application
What is the minimum number of SQL statements required to update all the values of the attribute zscore in the
above table to 2.1?
(1) 1 (2) 2 (3) 3 (4) 4 (5) 5
⁕⁕⁕
AL/2016/20/E-II #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
(b) Which of the three mechanisms used to apply styles to HTML elements increases the maintainability
of a web site?
............................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
i = i + 1
print (total)
(i) What would be the output of the above program when executed? Justify your answer.
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
(ii) Modify and rewrite the above program, without increasing the number of statements, to
compute the sum of integers from 1 to 10 (including 1 and 10).
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
(b) An embedded system uses 16-bit wide address bus to access its byte addressable main memory.
What is the maximum usable size of its main memory? Show your computations clearly.
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
Part B
⁕ Answer any four questions only.
1. The top secret recipe for making milk rice at the restaurant chain SLFC is kept in an electronic safe at their
head office. The lock (L) of the safe can either be in locked or unlocked states represented by logical truth
values 0 and 1 respectively. This lock has three different key holes K1, K2 and K3 each with a unique key.
These three keys are in the custody of three directors of SLFC. The lock opens when at least two keys
are inserted into the corresponding key holes. The situation where the corresponding key is properly inserted
into any key hole is represented by the logical truth value 1 and all the other situations are represented by
the logical truth value 0.
Assuming that only the following Integrated Circuits (ICs) are available, construct a logic circuit to operate
the lock (L) of the safe, by using the truth tables and Boolean algebra. Clearly show the truth tables, Boolean
expressions and the Boolean algebraic rules used to construct your circuit.
20 19 18 17 16 15 14 13 12 11 8 7 6 5
1 2 3 4 5 6 7 8 9 10 1 2 3 4
2. There are two Local Area Networks (LANs) L1 and L2 which are connected only by a router R. These
LANs are not connected to any other networks. Machines P and Q are connected to LANs L1 and L2
respectively. The machine P has successfully delivered an IP packet IP1 to machine Q.
In a LAN, an IP packet is sent from the source device to the destination device by inserting it into a frame,
generated in the data link layer at the source device. In that LAN, source and destination devices are uniquely
identified by the MAC addresses in that frame.
An IP address is recognized by the network layer but it is not recognized by the data link layer.
(a) Draw a network diagram to depict the network described above using commonly used symbols and
notations.
(b) State whether the destination IP address of the packet IP1 is the IP address of Q or R when it is going
through LAN L1. Justify your answer.
(c) Assume that the IP packet IP1 was in a frame F2 in LAN L2. State whether the source MAC address
of frame F2 is the MAC address of P or R. Justify your answer.
3. The management of the Siri Lak bank has decided to develop a web portal to deliver personalized services
to its employees. The services include, access banking plans, regulations and policies, register for learning
opportunities provided by the bank, quick search, weather reports, communicate with other employees and
leave and loan related services. According to the chief information officer of the bank, the primary goal of
developing the portal is to enable its employees to manage their personal lives more easily.
(a) What is the e-commerce type of the services provided by the above web portal? Justify your answer.
(b) State two potential benefits obtainable to the employees from the above portal.
(c) The management of the bank expects that they could get a better service from their employees after
implementing the proposed portal. Do you agree with this idea? Justify your answer.
(d) A consultant suggests to implement a ‘personal user assistant agent’ based on the intelligent agent
technology to improve the services of the above web portal. State three possible ways to improve the
services of the above web portal by such an agent.
4. A canteen of a school sells 10 different types of foods. These food types are placed in a shelf. Students
can select foods while walking alongside the shelf and keep them on a tray. These trays are available at the
entrance of the canteen. A student, after selecting the food, should proceed to the cashier with the food tray
for the payment.
You are asked to develop a computer program to calculate the payment due for a food tray. For this purpose,
each food type is given a unique integer from 1 to 10.
The integer value assigned for each food type and its unit price is shown in the following table.
Food type 1 2 3 4 5 6 7 8 9 10
Unit price (Rs) 10.00 12.00 15.00 10.00 25.00 45.00 50.00 25.00 10.00 12.00
(a) State all the inputs required for the computer program and its expected output.
(b) Draw a flowchart to represent the algorithm required to compute the payment due for a food tray.
5. An education institute maintains a timetable to manage its lectures, practical classes and seminars. The timetable
consists of two hour time periods: 8.00 a.m. - 10.00 a.m., 10.00 a.m. - 12.00 noon, 1.00 p.m. - 3.00 p.m.
and 3.00 p.m. - 5.00 p.m. Lectures, practical classes and seminars are assigned to one or more time periods.
A lecture is assigned to a lecturer and a practical class is conducted by a group of demonstrators. At least
two lecturers are responsible for a seminar.
Draw an Entity Relationship (ER) diagram for the above system. State all your assumptions clearly.
6. Draw a context diagram to show the operations of the online assignment management system described below
adhering to the standards of the Structured System Analysis and Design Methodology (SSADM). Clearly indicate
external entities and data flows of your diagram. State any assumptions that you have made.
The National University of ICT (NUICT) conducts distance learning programs. The students of NUICT are
continuously assessed through online assignments. The students of NUICT use an online assignment management
system called NetAssign to download assignments and upload answer scripts. The examiners use NetAssign to
upload assignments and to download answer scripts. Once the answer scripts are marked, the examiners enter
marks into NetAssign. The students can view only the grades determined by NetAssign. To use NetAssign,
both examiners and students must provide authentication details to the system. These authentication details
are provided by NUICT to its students and examiners.
⁕⁕⁕
AL/2017/20/E-I #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka
YS% ;,xld
=j YS% ,xld úNd. fomd¾;fïka
úNd. fomd¾;fïka;=j YS% ,xld
;=júNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
Instructions:
⁕ Answer all the questions.
⁕ Write your Index Number in the space provided in the answer sheet.
⁕ Instructions are also given on the back of the answer sheet. Follow those carefully.
⁕ In each of the questions 1 to 50, pick one of the alternatives from (1), (2), (3), (4), (5) which is correct or most
appropriate and mark your response on the answer sheet with a cross (x) in accordance with the instructions
given on the back of the answer sheet.
⁕ Use of calculators is not allowed.
5. Which of the following secondary storage devices is generally considered to provide the fastest access to
data?
(1) Compact Disc (2) Digital Versatile Disc (3) Internal hard disk
(4) Magnetic tape (5) Floppy disk
7. Which of the followings is a main use of Complementary Metal-Oxide Semiconductor (CMOS) memory of
a personal computer?
(1) Keeping inputs for processing (2) Holding instructions for operations
(3) Providing space for loading operating system (4) Retaining information for output
(5) Keeping Basic Input Output System settings for the booting procedure
8. The execution of a series of non-interactive jobs on a personal computer with relative to the user is known as
(1) multitasking. (2) multiuser processing. (3) multiprocessing.
(4) batch processing. (5) online processing.
Which of the following tags/elements correctly implements the intended function of the above “Submit”
button?
(1) <input type = "submit" value = "Submit">
(2) <input type = "button" value = "Submit'>
(3) <button type = "button" >Submit</ button>
(4) <button type = "submit"></ button>
(5) <button type = "submit" value = "Submit"></ button>
15. Which of the following CSS rules renders the image in the file "school.png" as the background of a web page?
(1) body { background = "school.png"; }
(2) body { background: url ("school.png"): }
(3) body { background-image = "school.png"; }
(4) body { background-image: "school.png"; }
(5) body { background-image: url ("school.png"); }
16. In electronic mail systems, the protocol used by mail clients to retrieve messages from the mail server is
(1) Simple Mail Transfer Protocol (SMTP). (2) File Transfer Protocol (FTP).
(3) Internet Control Message Protocol (ICMP). (4) Internet Message Access Protocol (IMAP).
(5) Telnet.
17. The transport layer protocol User Datagram Protocol (UDP) can be used for
(1) reliable communication (2) guaranteed delivery
(3) connection oriented communication. (4) ordered delivery
(5) exchanging state information among routers.
19. The first and the last IP addresses of a subnet are 192.192.48.0 and 192.192.63.255 respectively. Which of
the followings is the subnet mask of this subnet?
(1) 255.255.255.0 (2) 255.255.192.0 (3) 255.255.255.192
(4) 255.255.240.0 (5) 255.240.0.0
20. 172.16.48.200/24 is a
(1) host address in a class B network. (2) network address of a class C network.
(3) host address in 172.16.48.0/24 subnet. (4) network address of a subnet with 255 hosts.
(5) host address with 8 network bits.
21. In TCP/IP computer networks, Transport Protocol Data Unit (TPDU) is referred to as a
(1) packet. (2) frame. (3) segment (4) window. (5) message.
22. Which of the following statements best describes a nice to have non-functional requirement of an Automated
Teller Machine (ATM)?
(1) System shall facilitate users to withdraw money.
(2) System should let users to deposit money.
(3) System shall use 256-bit encryption for all communications.
(4) System should provide users a touch screen interface.
(5) System shall dispense money within 5 seconds.
23. The following symbol, appeared in a Data Flow Diagram (DFD) of a Sales Information System, represents a
.......................... containing payment details.
T1(M) Payment
Which of the followings is most appropriate to fill in the blank in the above statement?
(1) file tray (2) cardboard file
(3) file cabinet (4) data file in a hard disk
(5) temporary data file in a hard disk
24. Which of the following dataflow diagrams is correct with respect to the rules of dataflow modelling?
1
(1) A
B
1
(2) A
B
1
(3) A
B
1
(4) A M1 C
B
1
(5) A M1 C
B
start
Yes
x=0? Print "Good" end
No
Print "Bad"
end
27. Students in a school are given tablet computers to improve their studies. Which of the followings is the
most appropriate activity to achieve this objective?
(1) Downloading computerized study material (2) Watching entertainment videos
(3) Instant messaging among friends (4) Blog writing
(5) Playing computer games
30. Requirements of a system can be classified as Mandatory (Essential), Desirable (Optional), Functional and
Non-functional.
“ATM of a bank shall not allow more than three attempts to enter a user’s secret number incorrectly”
Which of the followings correctly classifies the above requirement?
(1) Mandatory, Functional (2) Mandatory, Non-functional
(3) Desirable, Functional (4) Desirable, Non-functional
(5) Mandatory or Desirable, Functional
[See page five
AL/2017/20/E-I -5- #ictfromabc
34. Which of the following Entity Relationship (ER) diagrams correctly represents the relationship between the
entities represented by the above relations?
1 m
(1) book write author
1 1
(2) book write author
m 1
(3) book write author
m n
(4) book write author
m m
(5) book write author
35. Assume that above relations are converted into tables in a relational database. The following SQL query is
executed on the database:
SELECT * FROM bookAuthor
Which of the following statements is correct regarding the output of the above SQL query?
(1) It cannot be an empty table.
(2) title column is in it.
(3) name column is in it.
(4) All the tables book, author and bookAuthor are used to produce the output.
(5) All records in the bookAuthor table are in the output.
36. Consider the following statements regarding the Data Definition Language (DDL) used to create the table
bookAuthor while maintaining data integrity:
A - It has a primary key constraint.
B - It has a foreign key constraint.
C - It has a domain constraint.
Which of the above statement/s is/are correct?
(1) A only (2) A and B only (3) A and C only
(4) B and C only (5) All A, B and C
[See page six
AL/2017/20/E-I -6- #ictfromabc
37. Which of the following organs is a part of a closed system of the human body?
(1) Eye (2) Ear (3) Heart (4) Kidney (5) Lung
41. Which of the following statements about Python data types/expressions is correct?
(1) String is a mutable data type.
(2) List is an immutable data type.
(3) [1, 2, 3] is a tuple.
(4) The expression [1, 2, 3] [1] will produce [2] when executed.
(5) The type of {'a':l, 1:(1, 2)} is a Dictionary.
46. The content of two files with names “in.csv” and “out.csv” are shown in the figures “Fig. 1” and “Fig. 2”
respectively.
Ruvan, 20, 50 Ruvan 20 50 70
Ramesh, 0, 5 Ramesh 0 5 5
Raj, 10, 10 Raj 10 10 20
Fig. 1: in.csv Fig. 2: out.csv
Which of the following Python programs can be used to transform the data in “in.csv” to the content of
the file “out.csv”?
(1) (2)
f1=open("in.csv","r") f1=open("in.csv","r")
f2=open("out.csv","r") f2=open("out.csv","w")
for line in f1: for line in f1:
items=line.strip().split(",") items=line.strip()
tot=int(items[1])+int(items[2]) tot=int(items[1])+int(items[2])
print(items[0],items[1],items[2],tot,file = f2) print(items[0],items[1],items[2],tot)
f1.close() f1.close()
f2.close() f2.close()
(3) (4)
f1=open("in.csv","r") f1=open("in.csv","r")
f2=open("out.csv","w") f2=open("out.csv","w")
for line in f1: for line in f1:
items=line.strip().split(",") items=line.strip().split(",")
tot=int(items[1])+int(items[2]) tot=items[1]+items[2]
print(items[0],items[1],items[2],tot,file = f2) print(items[0],items[1],items[2],tot,file = f2)
f1.close() f1.close()
f2.close() f2.close()
(5)
f1=open("in.csv","r")
f2=open("out.csv","w")
for line in f1:
items=line.strip().split(",")
tot=int(items[1])+int(items([2])
print(items[0],items[1],items[2],tot,file = f1)
f1.close()
f2.close()
47. Consider the following statements on using NAND, NOR gates over NOT, AND, OR gates when constructing
logic circuits:
A - They make logic circuit design simpler.
B - They help to construct logic circuits that consume less electricity.
C - They make logic circuit construction more economical.
Which of the above statements is/are correct?
(1) A only (2) B only (3) A and B only (4) A and C only (5) B and C only
48. Which of the following functions gives the sum of all elements in any list of integers?
(1) def f(x): (2) def f(x): (3) def f(x):
s=x[0] s=x[0] s=0
for i in range (0,len(x)): for i in range (1,len(x)): for i in x:
s=s+i s=s+i s=s+i
return s return s return s
⁕⁕⁕
AL/2017/20/E-II #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிகமயுகடயது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம் இலங்கைப் பரீடகைத் திகைக்ைளம்
payment Customer
book enquiry
..................
reply to ...................
the enquiry
2 ...................
1 Sales Assistant
Handle
........... Handle book M1 Inventory book payments & .............
enquiries details details
Inventory
& hold-on
requests
................. ................. copy of the
payment receipt details of
books
hold-on request T1
(M) .......................
M2
.......................
..................
Figure 1.1 : Level 1 Data Flow Diagram of Sales Information System of Bookland
(b) Explain the main actions performed by an operating system during context switching.
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
(c) Explain what will happen during the booting process of a computer.
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
3. (a) (i) Write three key conditions to be satisfied in order to classify a transaction/service between
eeeeeeeeeetwo persons as B2B in e-commerce.
......................................................................................................................................
......................................................................................................................................
......................................................................................................................................
......................................................................................................................................
......................................................................................................................................
......................................................................................................................................
(ii) ............
If the seller in the above transaction is replaced by a software agent, state the key proactive
behaviour that software agent shall have.
......................................................................................................................................
......................................................................................................................................
......................................................................................................................................
......................................................................................................................................
........
(i) Write a query in SQL to add the following data to the student table.
Student number – 10001
Name – Saman Kumara
Address – 78, Mahara road, Maharagama
......................................................................................................................................
......................................................................................................................................
......................................................................................................................................
......................................................................................................................................
......................................................................................................................................
......................................................................................................................................
............
(ii) If the address of the student entered in the (i) above should be changed to
13, School Lane, Jaffna, write a query in SQL to update the relevant record in the student
table.
......................................................................................................................................
......................................................................................................................................
......................................................................................................................................
......................................................................................................................................
4. (a) (i) The Figure 4.1 represents an open system. Using the basic components: input, process, output
eeeeeeeeeand system boundary as given in the figure, draw a diagram to represent a closed system.
System boundary
Figure 4.1 : An open system
(b) A person can own one or more mobile phones. One mobile phone belongs to a single person
only. Assume that a mobile phone can be uniquely identified by its telephone number. National
Identity Card number (NIC No) is used to identify a person uniquely.
Above statements are represented by the ER diagram in Figure 4.2.
Telephone No NIC No
m belongs 1
Mobile Phone Person
to
Convert the above ER diagram into 3rd Normal Form relations to be implemented in relational
database.
⁕⁕
Part B
⁕ Answer any four questions only.
1. A switch (A), a temperature sensor (B) and a timer (C) of an air-conditioner determine turned on and turned
off states of the air-conditioner. Turned on and turned off states of the air-conditioner as well as the ‘ON’
and ‘OFF’ states of the switch, temperature sensor and the timer are represented by the logical values 1 and
0, respectively.
The air-conditioner can be turned on or off manually by setting the switch to its ‘ON’ or ‘OFF’ states,
respectively.
The temperature sensor detects the temperature in the room. The temperature sensor sets its state as ‘ON’
or ‘OFF’ when the detected temperature is respectively higher or lower than a pre-defined temperature value.
The air-conditioner is automatically turned on or off when the detected temperature is respectively higher or
lower than the pre-defined temperature value.
The timer sets its state as ‘OFF’ until it reaches a preset time value and sets the state as ‘ON’ once it
reached. The air-conditioner is automatically turned off when the timer reaches the preset time value.
(a) Construct a logic circuit using only NOR gates to control the air-conditioner. Clearly show truth table,
Boolean expression and Boolean algebraic rules used for simplification. Assume that the electricity is
always supplied to the air-conditioner.
(b) The user of the air-conditioner says that the switch is not required for the operation of the air-conditioner.
Do you agree with this statement? Justify your answer.
2. A “Demilitarized Zone (DMZ)” is a subnet that contains and exposes an organization’s external-facing services
such as web servers (public IP addresses) to the Internet while hiding away the rest of the network behind
a firewall (using local IP addresses).
A network with a DMZ belonging to an organization has been assigned the public IP address range 123.45.67.0
with subnet mask 255.255.255.224. The DMZ contains the web server and the mail server. It has 4 additional
subnets for internal use having the private IP address range 10.0.0.0 with the subnet mask 255.0.0.0. Computers
in each subnet can access resources in all other subnets. The organization decided to connect the 4 subnets
to the Internet through a proxy server. There is also an application server for its internal clients.
Identify the devices required to establish this network and draw a network diagram to show the logical
arrangement of the organization’s computer network. Show all the elements of the network with appropriate
IP addresses. Clearly show all calculations stating assumptions you made.
Further, it is also required to explain the changes done to an IP packet released by a computer to a subnet
by the proxy server when it travels to the Internet.
3. A state health authority decided to conduct an awareness program as an online service through Internet to
reduce dengue infection by transmission of the virus through the mosquitoes. This service provides information
on how to adopt dengue control approaches, such as cleaning the environment, destroying non-essential
containers that provide larva habitats etc., in order to minimize mosquitoes’ propagation.
(a) To which e-commerce type does this service belong?
(b) If the service is extended by allowing organizations to register their services targeting minimizing the
spread, what is the e-commerce type of this extended service? Justify your answer.
(c) Assume that a registered organization provides a service for itself to submit the details of the identified
dengue breeding places to the state authority online. Why is this service not rightly considered as B2B?
What is the correct e-commerce type of this service?
(d) An expert system is proposed to develop policies to fine the owners of the locations where dengue
mosquitoes have been detected. Accordingly, experts in Attorney General’s Department and epidemiology
units are consulted. State key contributions that are expected from each expert to develop the Knowledge
base of the expert system. (Hint: The contribution of one expert should be an input to the decision making
process of the other expert).
4. The consumption of electricity at houses is charged based on the number of units consumed. The first 64
units are charged at Rs.5.00 per unit, and the rest at Rs.10.00 per unit.
(a) Draw a flowchart to represent an algorithm that can be used to compute the total amount to be charged
from a householder when the household number and present and the previous readings of the electricity
meter are given.
(b) Encode the algorithm given in the (a) above in Python programming language. State all valid assumptions,
if any.
(c) Develop a function in Python to write household number, meter readings and the total amount to be
charged at the end of an existing text file named “deb.txt”.
5. The candidates who have been selected for university entrance should register for the given academic year
with the university given to them. Candidates who do not register before the ‘Last date’ announced by each
university will lose their university entrance. Once a candidate registers with the given university, the candidate
becomes a registered student of that university. Registered students can apply for financial support, such as
Mahapola scholarships and Bursary, separately. These financial supports could be either full or partial. All
registered students will receive a laptop. However, its ownership cannot be transferred to another student.
The user requirements of the above system are listed below. A user shall be able to obtain:
(a) a list of students registered for a given academic year with a given university.
(b) information (such as model, serial number and warranty period) about the laptops given to each student.
(c) list of students who applied for financial support.
Draw an Entity Relationship (ER) diagram required to design a database to represent the above system
description and to satisfy the user requirements. State all your assumptions clearly.
6. Environmental Institute of Colombo intends to develop a website to provide information on an art competition
for students. A web page from this website and another web page with the entry form to register for the
competition are shown in the Figure 6.1 and Figure 6.2 respectively.
(a) Using appropriate HTML tags, create an HTML file required to render the web page as shown in Figure 6.1.
Your code should satisfy the following requirements.
It is required to format the text of the list in ‘Calibri’ font, 14 points high, in red color. The list should
be bulleted with squares. Format the list by using internal or external style sheets only.
Further, when a user clicks on the hypertext ‘online entry form’ on the web page, the entry form given
in Figure 6.2 should be rendered on a new tab/page. Assume that the name of the HTML file of the
web page with the entry form is ‘form.html’.
[See page eight
AL/2017/20/E-II -8- #ictfromabc
(b) Using appropriate HTML tags, create an HTML file to render the entry form given in Figure 6.2. The options
for ‘Grade Category’ are given in the Figure 6.3. Your code should satisfy the following requirements.
When the ‘Clear your Entries’ button is clicked, all the entries of the form should be cleared. Similarly,
when the ‘Submit’ button is clicked, the form should be submitted to the server.
⁕⁕⁕
AL/2018/20/E-I #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிமையுமையது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka
YS% ;,xld
=j YS% ,xld úNd. fomd¾;fïka
úNd. fomd¾;fïka;=j YS% ,xld
;=júNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Instructions:
⁕ Answer all the questions.
⁕ Write your Index Number in the space provided in the answer sheet.
⁕ Instructions are also given on the back of the answer sheet. Follow those carefully.
⁕ In each of the questions 1 to 50, pick one of the alternatives from (1), (2), (3), (4), (5) which is correct or most
appropriate and mark your response on the answer sheet with a cross (x) in accordance with the instructions given
on the back of the answer sheet.
⁕ Use of calculators is not allowed.
1. Consider the following three numbers in decimal, octal and hexadecimal notations, respectively.
A - 23110
B - 3478
C - E716
Which of the above is/are equivalent to 111001112 in binary notation?
(1) A only (2) B only (3) A and C only (4) B and C only (5) All A, B and C
2. What is the decimal equivalent to the binary 110101.112?
(1) 53.0010 (2) 53.5010 (3) 53.7510 (4) 54.2510 (5) 54.7510
3. Which of the following describes the term ‘telecommuting’?
(1) ability of an employee to perform duties conveniently from different geographical locations using
modem technology
(2) having online meetings with people at different geographic locations
(3) using ICT for community services
(4) using web-based applications to retrieve information
(5) performing financial transactions online
4. Consider the following statements.
A - Word size is the number of bits processed by the CPU of a computer in a single action (instance).
B - Data bus width and register width are directly related to word size of a computer.
C - Word size of modern general purpose computers is either 32 or 64 bits.
Which of the above statements is/are correct?
(1) A only (2) B only (3) C only
(4) B and C only (5) All A, B and C
5. Consider the following statements.
A - In public key encryption systems each pair of communicating entities share a single key for
encryption and decryption.
B - Phishing is a type of social engineering attack often used to steal user data such as user name
and password.
C - Port scanning is a method which can be used by attackers to identify open ports or services on
a network host.
D - Digital signatures can be used for email message authentication.
Which of the above statements are correct?
(1) B and C only (2) A, B and C only (3) A, C and D only
(4) B, C and D only (5) All A, B, C and D
[See page two
AL/2018/20/E-I -2- #ictfromabc
8. In the OSI reference model, the network layer is responsible for ............................. communication.
Which of the following is suitable to fill the blank in the above statement?
(1) node to node (2) source to destination (3) hop to hop
(4) switch to router (5) process to process
9. Which of the following indicates the number of host bits and the number of IP addresses respectively
in a class C network?
(1) 8 and 256 (2) 8 and 65536 (3) 16 and 256
(4) 16 and 65536 (5) 24 and 256
10. To which of the following network classes does the IP address 192.248.254.1 belong?
(1) A (2) B (3) C (4) D (5) E
11. In the OSI reference model, a protocol data unit of the network layer is referred to as a ......................
Which of the following terms is suitable to fill the blank in the above statement?
(1) frame (2) segment (3) window (4) message (5) packet
12. Which of the following correctly lists the given computer storage components in the descending
order of access speed?
(1) cache memory > main memory > magnetic disk > register
(2) magnetic disk > main memory > cache memory > register
(3) magnetic disk > main memory > register > cache memory
(4) register > cache memory > main memory > magnetic disk
(5) register > main memory > magnetic disk > cache memory
15. Consider the following HTML code with labels 1 - 3 and the expected output.
What is the correct order of tags for replacing the labels 1 , 2 and 3 ?
(1) dt, dl, dd (2) dl, dt, dd (3) dd, dt, dl
(4) dt, dd, dl (5) dl, dd, dt
Name: Kamal Name: Telephone: Name: Telephone: Name: Kamal Name: Kamal
55577854 55577854 55577854 55577854 Telephone: 55577854
Kamal Telephone:
Telephone: Kamal 55577855 55577855
55577855 55577855 55577855
17. Which of the following is the correct HTML statement for inserting an image?
(1) <img href="image.gif" alt="MyImage">
(2) <img alt="MyImage">image.gif</img>
(3) <img src="image.gif" alt="MyImage">
(4) <image src=“image.gif" href="MyImage">
(5) <img href="image.gif" src="MyImage">
[See page four
AL/2018/20/E-I -4- #ictfromabc
18. Consider the space voyage for landing a human being on the surface of the moon for the first
time in 1969. The entire event was broadcast on the radio in Sri Lanka by several commentators based
in Sri Lanka and the USA.
Which of the following events relates to the highest value of information?
(1) counting down for the launching of the rocket that carried the space shuttle
(2) the moment the space shuttle escaped from the gravitational field of the earth
(3) the moment the space shuttle entered the moon’s gravitational field
(4) the moment the astronaut Neil Armstrong placed his first step on the surface of the moon
(5) the moment the astronauts landed on the sea in their return voyage to Earth
19. Consider the following statements related to the development of computers over time.
A - Both processing speed and power consumption of computers have increased.
B - Processing speed of a computer has increased while physical size of a computer has decreased.
C - Both power consumption and the physical size of a computer have reduced.
Which of the above statements is/are correct?
(1) A only (2) B only (3) A and B only
(4) B and C only (5) All A, B and C
(1) I only (2) II only (3) III only (4) I and II only (5) All I, II and III
• Questions 23 - 25 are based on the flowchart below. (Note that n%2 represents n mod 2.)
Start
i 1
result 0
input n
Yes is n %2 = 0 ?
No
result result + n
i i+1
Yes
is i ≤ 10 ?
No
output result
Stop
23. Which of the following is/are correct regarding the algorithm expressed by the above flowchart?
A - It takes 10 inputs.
B - It computes the sum of the even numbers in the input.
C - To take 100 inputs, only modifying “is i ≤ 10?” will be sufficient.
(1) A only (2) B only (3) C only (4) A and B only (5) A and C only
24. If the following were fed as inputs to the above algorithm, what will be the output?
2, 8, 9, 3, 4, 10, 6, 5, 13, 19, 12, 7
(1) 10 (2) 30 (3) 42 (4) 49 (5) 56
25. For any given input, outputs of which of the following Python programs will be the same as the
output produced by the algorithm in the above flowchart?
I — i=1 II — result = 0 III — result = 0
result = 0 for i in range(10): i=1
while (i<=10): n= int(input()) while True:
n= int(input()) if (not(n%2 == 0)): n= int(input())
if (n%2 != 0): result = result + n if (not(n%2 == 0)):
result+=n print result result = result + n
i=i+1 i=i+1
print result if (i>10):
break
print result
(1) I only (2) II only (3) III only (4) I and II only (5) All I, II and II
27. Consider the following statements relevant to external entities of Data Flow Diagrams.
A - An external entity can be a person, system or organization that has predefined behaviour.
B - An external entity can be a source of input data for a process or/and a destination of the output
aaaof a process.
C - External entities are always data stores.
Which of the above statement(s) is/are correct?
(1) A only (2) B only (3) A and B only
(4) B and C only (5) All A, B and C
30. Which of the following feasibility types is generally not carried out during the development of a
system to be used only in-house?
(1) economic feasibility (2) market feasibility (3) operational feasibility
(4) organizational feasibility (5) technical feasibility
31. Consider the following statements related to e-business.
A - Brick-and-click is a business model by which a company integrates both offline and online
aaaapresence of the business.
B - Pure-brick is a business model in which a company has only a physical presence.
C - Pure-click business has the presence only on the Internet.
Which of the above statements is/are correct regarding e-business models?
(1) A only (2) B only (3) C only
(4) A and C only (5) All A, B and C
32. A smart home application that automates the controlling of lighting, temperature, entertainment
systems, and appliances is an example for
(1) evolutionary computing. (2) multi-agent systems.
(3) nature inspired computing. (4) software agents.
(5) ubiquitous computing.
34. Consider the following statements regarding programming languages and program translation.
A - A compiler translates a program one statement at a time.
B - An assembler converts a program in an assembly language into machine code.
C - An interpreter scans the entire program and translates it as a whole into machine code.
Which of the above statements is/are correct?
(1) A only (2) B only (3) C only
(4) A and C only (5) All A, B and C
37. Through which of the following, will a device controller that controls a device deal with the
Operating system?
(1) application software (2) assembler (3) compiler
(4) device driver (5) utility software
38. Consider the following statements relevant to the trends in modern information technology.
A - In traditional computing, data is encoded into binary digits while in quantum computing data
aaais represented in quantum bits or qubits.
B - A wearable device capable of activity tracking that measures data such as the number of steps
aaawalked and heart rate is an example for a sensor network.
C - A collection of nodes capable of environmental sensing, local computation, and communication
aaawith its peers or with other higher performance nodes is called a Geographic Information
aaaSystem.
Which of the above statements is/are correct?
(1) A only (2) A and B only (3) A and C only
(4) B and C only (5) All A, B and C
• Consider the following relational schema consisting of text fields in answering questions 40 and 41.
Students (admission_number, surname_with_initials, house_number, street_name, village, postal_town,
aaaaaaaaapostal_code)
Assume that for a given postal_town only one postal_code exists.
40. Consider the following statements.
A - Students relation is not normalised.
B - Students is a relation in First Normal Form (1NF) only.
C - In normalization terms, Students is a relation in Second Normal Form (2NF) and hence also
aaain 1NF.
Which of the above statements is/are correct?
(1) A only (2) B only (3) A and C only
(4) B and C only (5) All A, B and C
42. Consider the following statements relating to Entity Relationship (ER) modelling.
A - Cardinality specifies how many instances of an entity relates to one instance of another entity.
B - An entity is a ‘thing’ or ‘object’ in the real world that can be identified separately (distinguishable)
aaafrom all other objects.
C - Cardinality specifies primary key attributes of an entity.
Which of the above is/are correct?
(1) A only (2) A and B only (3) A and C only
(4) B and C only (5) All A, B and C
43. Consider the following statements regarding functional and non-functional requirements of a sales
system.
I - Reads barcodes of items purchased and produces the invoice
II - Accepts user’s request and responds in less than 1 second
III - Processes a minimum of 1,000 transactions per second
Which of the following is the correct classification of requirements?
(1) I, II and III all functional
(2) I - functional, II and III - non-functional
(3) II - functional, I and III - non-functional
(4) I and III - functional, II - non-functional
(5) I, II and III all non-functional
[See page nine
AL/2018/20/E-I -9- #ictfromabc
45. Consider the following statements regarding Structured and Object Oriented software development
methodologies.
A - Structured analysis and design represents systems as a hierarchy of functions.
B - Structured design is a system of interacting objects.
C - Object oriented methodology combines data and processes into individual entities.
Which of the above statements is/are correct?
(1) A only (2) A and B only (3) A and C only
(4) B and C only (5) All A, B and C
46. What is the output of the following Python code segment if executed with 30 as input?
n = int(raw_input())
if (n < 40):
result = 1
if (n < 10):
result = 2
elif (n < 20):
result = 3
else:
result = 4
else:
result = 5
print result
(1) 1 (2) 2 (3) 3 (4) 4 (5) 5
49. Consider the following Python code segment with a blank line. (The line numbers on the left are
shown for guidance only. They are not part of the code).
1 # Function definition starts
2 ................................
3 s = arg1 + arg2
4 return s
5 # Function definition ends
6 total = sum(10,20)
7 print total
The above code should consist of a programmer defined function named 'sum'. Which of the following
should be entered in the blank on line 2. so that the function 'sum' is correctly defined?
(1) sum(arg1, arg2): (2) def sum(arg1, arg2):
(3) function sum(arg1, arg2): (4) def sum(arg1, arg2, s):
(5) def sum( ):
⁕⁕⁕
AL/2018/20/E-II #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிமையுமையது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Use additional reading time to go through the question paper, select the questions you will answer and
decide which of them you will prioritise.
(ii) Write the output of the following HTML code segment when rendered by a web
abrowser.
<html>
<body>
<u> Important Sites </u>
<ul>
<li><a href="www.nie.lk/index.html"> National Institute of Education </a></li>
<li><a href="www.doenets.lk/exam/index.html"> Department of Examinations </a></li>
</ul>
</body>
</html>
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
(iii) Write the output of the following HTML code segment when rendered by a web
browser.
<html>
<body>
<p>
<center> Department of Examinations <br> Pelawatta
<br> Battaramulla </center></p><hr>
</body>
</html>
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
(c) Consider the HTML form given below rendered by a web browser:
This is a registration form used for registering
students. It is required to enter Student Name as
a text input, select Gender, select District and then
click Submit button. Complete the following
HTML code segment by filling the spaces to
display the form.
<html>
<body>
<h3>Student Registration </h3>
<....................... action="register.php" method="post">
<div>
Student Name <input ....................... = ....................... ....................... = "name">
</div>
<br>
<div>
Gender
<input ................. = ................. .................="gtype" .................="male" checked> Male
(i) ........................................................
(ii) ........................................................
(iii) .......................................................
(iv) .......................................................
(v) .......................................................
(vi) .......................................................
(vii) .......................................................
(viii) .......................................................
(b) (i) Write down the two’s complement representation of 1210 using 8 bits.
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
(ii) Write down the two’s complement representation of –6810 using 8 bits.
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
(iii) Compute –6810 + 1210 using the above representations (i) and (ii).
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
[See page five
AL/2018/20/E-II -5- #ictfromabc
Do not
(iv) State one advantage of using two’s complement representation for data in internal write
operations of a computer. in this
column
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
------
(i) Briefly explain why the ‘Phone’ attribute is shown using a different symbol compared
to other attributes.
....................................................................................................................................
....................................................................................................................................
(ii) Briefly explain why DEPENDANT entity is shown using a different symbol compared
to COMPANY.
....................................................................................................................................
....................................................................................................................................
(iii) The following relational tables are constructed using the ER diagram shown above. In
each of the tables, the field names are missing.
P
COMPANY (..............................)
Q
STAFF (..............................)
R
STAFF_PHONE (..............................)
S
DEPENDANT (..............................)
Identify the missing field names in each table and write them down against P - S .
P - ..............................................................................................................
Q - ..............................................................................................................
R - ..............................................................................................................
S - ..............................................................................................................
....................................................................................................................................
(v) Write an SQL statement to display the names of the dependants of staff member with
StaffID = 'E001124'.
....................................................................................................................................
....................................................................................................................................
(b) (i) Identify and explain the fundamental error in the following Data Flow Diagram (DFD).
1.0 2.0
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
(ii) Write down whether each of the following statements regarding software agents is
either True or False.
True/False
(1) A software agent can perform tasks in achieving a goal with
minimum or no direct supervision. .......................
(2) Software applications can interact with agent without direct
supervision of a user. .......................
(3) A user may obtain answers to a problem directly from an
agent. .......................
(4) A multi-agent system is a network of problem-solving entities
called agents that work together to find answers to problems
that are beyond the individual abilities of each agent. .......................
(5) In a multi-agent system, individual agents may compete or
co-operate to achieve the system goals. .......................
4. (a) Consider the following diagram which shows how the abstract layers of a computer system
aaaaaaare related.
user user user ... user
1 2 3 n
(b) Order four of the following statements in the correct sequence to describe the operations
that take place when a computer is switched on.
(Note: Two of the statements will not be needed.)
A - The BIOS copies Operating System (OS) files into memory and the OS starts
executing.
B - The BIOS looks to the CMOS chip to tell it where to find the OS.
C - The compiler is started.
D - The contents in memory is swapped to the hard disk.
E - The OS loads the device drivers that it needs to control the devices and gives a login
interface to the user.
F - Triggered by a series of clock ticks, the CPU executes the startup program's
instructions in the BIOS that involves the power on self-test.
The sequence of operations is: (fill in the boxes with relevant letters)
(c) The astate atransitions athat acould aoccur ain a aprocess running on a computer with a
multi-tasking operating system is shown in the following diagram:
Ready Running
B
C D
Waiting
(i) Choose and write down the transition triggers indicated by the labels A , B , C and D
from the list given.
List = {interrupt, Input/Output (I/O) or event completion, I/O or event wait, scheduler
dispatch}
A ............................................... B ...............................................
C ............................................... D ...............................................
(ii) For the process above, give one possible reason for the following transition trigger:
interrupt: .....................................................................................................................
.....................................................................................................................................
[See page eight
AL/2018/20/E-II -8- #ictfromabc
Do not
(d) In a certain computer, the physical memory has a total capacity of 4GB. The size of a write
memory frame is 4KB. in this
column
(i) Compute the total number of frames in the physical memory.
...................................................................................................................................
...................................................................................................................................
...................................................................................................................................
(ii) The operating system maintains a data structure named the page table in respect of each
process running in the computer. For what purpose is it used?
...................................................................................................................................
...................................................................................................................................
...................................................................................................................................
(iii) With respect to the physical memory size, what is the benefit of using the technique of
virtual memory in the above computer?
...................................................................................................................................
...................................................................................................................................
...................................................................................................................................
...................................................................................................................................
⁕⁕
Part B
⁕ Answer any four questions only.
1. Suppose a logic circuit needs to be implemented for a digital system that has three inputs A, B and C
and one output Z. Its behaviour is as follows:
If the input C=1, the output Z has the value of A.
If the input C=0, then output Z has the value of B.
(a) Obtain the truth table for the output Z.
(b) Write down either a sum of products (SOP) or a product of sums (POS) Boolean expression
for Z.
(c) Simplify the Boolean expression for Z obtained in (b) above.
(d) Using the simplified expression in (c) above, construct a logic circuit for the system using
either 2-input NAND gates only or 2-input NOR gates only.
2. Consider the following scenario.
The XYZ company has six departments, namely Production, Accounts, Sales, Administration,
Maintenance and Information Technology Services (IT). The following table shows the number of
computers available in each of the departments.
Department No. Department Number of Computers
D01 Production 25
D02 Accounts 30
D03 Sales 18
D04 Administration 30
D05 Maintenance 25
D06 IT Services 28
Each department needs to have their own local area network. Network administrator has received a
class C IP address block 192.248.154.0/24. It is required to subnet the IP address block to satisfy the
requirements of each department and allocate IP addresses to them.
(a) (i) How many addresses are available in the IP address block?
(ii) What are the first and the last addresses of the IP address block?
(iii) How many host bits are required to create the required subnets?
(iv) After subnetting, with the relevant network address, subnet mask and allocated range of
IP addresses for each department.
Note: Use the following table format to present your answer.
Department No. Network Address Subnet Mask IP Address Range
D01
D02
D03
D04
D05
D06
[See page ten
AL/2018/20/E-II -10- #ictfromabc
(b) The XYZ Company links the five departments Production, Accounts, Sales, Administration and
Maintenance to the IT Services department and connects those departments to the Internet
through the IT Services department. The network has been completed by laying the cables and
installing six switches, a router and a firewall. All six departments are situated in six separate
buildings.
The administrator allows all subnets to access the Internet through a proxy server. The proxy
server and the DNS server are located in the IT Services department.
Draw the labelled network diagram to show the logical arrangement of the computer network of
the XYZ company by identifying suitable devices and required cables for all the locations.
(c) After setting up the network any employee of any department was able to access the URL
http://www.nie.lk through a web browser in a computer in his/her department. However, one
day an employee finds that he cannot access that website from a computer in his department.
Write three possible reasons for the above problem.
3. (a) A business sells handicraft items such as wooden masks, handmade souvenirs, and batik and
handloom cloths for tourists in a certain city of Sri Lanka. At present customers walk to the shop
and buy goods with cash. The owner plans to start selling his products online through his own
web portal.
(i) State the type of e-business model the owner plans to start.
(ii) Assume that a certain tourist hotel situated nearby is willing to publicize the planned online
shop in their hotel web site.
(1) What type of e-business model can be established in the above scenario between the
handicraft business and the hotel?
(2) Briefly explain one possible e-business revenue model each, for the hotel and the proposed
online shop of the handicraft business.
(iii) State two methods that can be used by the planned e-business for processing online payments.
(iv) Briefly explain one e-marketing method that you would propose to attract customers to the
planned e-business web portal.
(v) Explain how the user experience can be improved using intelligent agent technology in the
planned e-business web portal.
(b) Consider the following figure which shows a simplified view of a multi-agent system.
interacts with
User
Application
Communicates
interacts with
Agent A Communicates
Agent B
4. (a) Assume an input which contains a sequence of positive numbers. The sequence has at most 100
numbers. If the input sequence has n numbers where n < 100, then the end of the sequence is
marked by making (n+1)th number –1.
For e.g., the following input sequence has 8 positive numbers, where the 9 th input which is –1
marks the end.
23 12 54 76 89 22 44 65 –l
Draw a flowchart that represents an algorithm to output the largest number in a given sequence
of n positive numbers as described above.
(b) Consider the flowchart given below. The algorithm in the flowchart takes two inputs, the first
input L is a list of numbers, the second input K is a given number.
Start
Input List L
Input K
n = Length of L
i=0
Yes
is L[i]=K ?
No
Output i=i+1
“True”
Yes
is i < n ?
No
Output
“False”
Stop
(i) What would be the output if the first input L was 23, 45, 32, 11, 67, 39. 92, 51. 74, 89 and
the second input K was 38?
(ii) Briefly explain the aim of this algorithm.
(iii) Develop a Python program to implement the algorithm in the flowchart.
5. The following two tables CLASS and STUDENT are constructed by using the Entity Relationship
(ER) diagram shown in Figure.
CLASS Table
ClassID ClassName ClassTeacher Stream Year
1111 12 – A A. B. Perera Physical Science 2017
1112 12 – B N. Mohamed Bio Science 2017
1113 13 – A E. Selvadurai Arts 2017
1114 13 - B L. De Silva Commerce 2018
STUDENT Table
Index Number ClassID Initials Surname DateOfBirth
8991 1112 E. Nazeer 1999.12.06
8993 1111 S. Sivalingam 1999.02.06
8995 1112 W. Fernando 1999.11.11
8997 1113 U. H. De Silva 1999.08.06
A B
(a) What is the cardinality of the relationship between the entites STUDENT and CLASS, denoted
by A and B above? Note: Write down suitable labels for A and B , respectively.
(b) Explain how a relationship is established between the two tables using primary key(s) and
foreign key(s) in the above example.
(c) (i) Are the two tables STUDENT and CLASS, in second normal form (2NF)? Explain a
reason for your answer referring to tables.
(ii) Briefly explain one key advantage of normalisation.
(d) Write an SQL statement to insert the following record to the CLASS table:
6. (a) The school admission process of a certain country is explained using the description and the data
flow diagram given below.
The applicant sends the application to the respective school. The school sends an
acknowledgement to the applicant. The school then verifies the information in the application by
checking the following.
• Eligibility of applicant : by using the eligibility criteria taken from the data store
aa‘Eligibility Criteria’
• Registration in the electorate : by requesting the electoral list from the Election Authority
a(Election Authority sends the Electoral list to the school)
• Residential status : by requesting the confirmation of residence from the Divisional
aSecretariat (Divisional Secretariat sends the confirmation of
aresidence to the school)
After verification of information, the applicant is informed whether the application has been
accepted or rejected which is noted in the application and stored in the data store “Applications”.
The school obtains the valid applications from the data store “Applications” and schedules the
qualified applicants for interviews. Then it calls the applicants for interviews and sends the interview
schedule to the Education Authority. The interview schedule is stored in the data store “Interview
Schedule”.
I
Interview
schedule
Applicant Acknowledgement K
A Application
1.1 1.3
1.2
F
H
Process Divisional
verification of G Secretariat
C applications
D
Eligibility E Election
criteria
Authority
Level 1 DFD
The Level 1 Data Flow Diagram for the above scenario with some data flows labelled as A - K is
given in figure. Identify and write down the relevant data flows against the labels A - K .
(b) (i) Briefly explain the key difference between functional and non-functional requirements as
used in the system development life cycle.
(ii) The following list includes some functional and non-functional requirements of a proposed
e-commerce web portal that plans to sell products on a catalogue:
A – Enable user to find products based on a variety of item characteristics
B – The system should work on any web browser
C – The system should be easy to use
D – Enable user to submit his/her comments on products and read other users’
comments on items
E – Data in the system should be preserved even in the case of a system failure
F – Enable user to create and maintain a wish list of desired products
G – Enable user to browse through products on catalogue
H – The system should be available for use 24 hours a day, 7 days a week and 365 days
an year
I – The system should authenticate users through usernames and passwords
J – The system should have versions customized for global users, e.g., French, Japanese,
German, etc.
⁕⁕⁕
AL/2019/20/E-I (NEW) #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிமையுமையது / All Rights Reserved ]
kj ks¾foaYh / புதிய பொைத்திட்ைம் / New Syllabus
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka
YS% ;,xld
=j YS% ,xld úNd. fomd¾;fïka
úNd. fomd¾;fïka;=j YS% ,xld
;=júNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Instructions:
⁕ Answer all the questions.
⁕ Write your Index Number in the space provided in the answer sheet.
⁕ Instructions are also given on the back of the answer sheet. Follow those carefully.
⁕ In each of the questions 1 to 50, pick one of the alternatives from (1), (2), (3), (4), (5) which is correct or
most appropriate and mark your response on the answer sheet with a cross (x) in accordance with the
instructions given on the back of the answer sheet.
⁕ Use of calculators is not allowed.
1. Which of the following is a hardware device that maps virtual addresses to physical addresses?
(1) bus (2) cache memory (3) control unit
(4) memory management unit (5) register
2. Which of the following represents the bitwise AND operation of the two binary numbers 01010101
and 10101010?
(1) 00000000 (2) 00001111 (3) 11001100 (4) 11110000 (5) 11111111
3. Use of public key and private key in encryption and decryption processes is called
(1) asymmetric encryption. (2) digital encryption. (3) hybrid encryption.
(4) private key encryption. (5) symmetric encryption.
4. In a particular network, each node is connected directly to a central network device. This topology is
referred to as a
(1) bus. (2) hybrid. (3) mesh. (4) ring. (5) star.
7. A software development company identifies that their new system development project has complex
requirements and has a medium to high risk level. Further, an evaluation is needed to clear the
requirements and significant changes are expected during system development.
What is the most suitable software development process model for this project?
(1) agile (2) prototyping
(3) rapid application development (4) spiral
(5) waterfall
8. Which of the following made a significant contribution to the growth of Information and
Communication Technology (ICT) usage?
A - exponential progress of the semiconductor technology paving the way for low cost hardware
B - introduction of user-friendly software and interfaces to computers
C - merge of computer and communication technologies to produce smart and mobile devices
(1) A only (2) B only (3) A and C only
(4) B and C only (5) All A, B and C
9. Which of the following is the correct statement to connect to "login.php" from an HTML form?
(1) <form action ="GET" method ="/login.php">
(2) <form action ="/login.php" method ="GET">
(3) <form submit ="GET" method="/login.php">
(4) <form submit=“/login.php” method=“GET">
(5) <form target"=/login.php" method="GET">
10. Which of the following HTML code lines is correct to create a hyperlink to the words “Department
of Examinations” using the URL: http://www.doe.index html?
(1) <a href="Department of Examinations"> http://www.doe.index.html </a>
(2) <a href="http://www.doe.index.html">Department of Examinations </a>
(3) <a href="http://www.doe.index.html" alt="Department of Examinations"> </a>
(4) <a src="Department of Examinations"> http://www.doe.index.html </a>
(5) <a src="http://www.doe.index.html">Department of Examinations </a>
11. On his single processor computer, a user starts a spreadsheet application and creates a new
spreadsheet. To get some information required for the spreadsheet he opens a large database using
his Database Management System (DBMS). After completing his spreadsheet he saves it.
Which of the following operating system features has/have being used by the above user?
A - context switching
B - file management
C - virtual memory
(1) A only (2) B only (3) A and B only
(4) A and C only (5) All A, B and C
12. A smart environment can be created by having an interconnected network of hardware devices,
sensors, connectivity and required software, which is often referred to as the Internet of Things (IoT).
Which of the following statements is correct about IoT?
(1) Every IoT device or item must be connected using UTP cables.
(2) If any item of the IoT setup fails to operate the entire IoT setup will be shutdown.
(3) IoT environments cannot be monitored and controlled remotely.
(4) Modern smart mobile phones cannot be connected to an IoT setup.
(5) The Internet connectivity is not essential for an IoT setup to function.
17. It is required to add a new field called Age to the Student_Sport table and the values of the new field
must be greater than 10.
Which one is the correct SQL statement to implement the above requirement?
(1) Alter table Student_Sport add check (Age> 10);
(2) Alter table Sudent_Sport add where (Age> 10);
(3) Alter table Student_Sport set check (Age> 10);
(4) Update table Student_Sport add check (Age> 10);
(5) Update table Student_Sport add where (Age> 10);
[See page four
AL/2019/20/E-I (NEW) -4- #ictfromabc
18. Which of the following SQL commands is not available in the Data Manipulation Language (DML)?
(1) CREATE (2) DELETE (3) INSERT (4) SELECT (5) UPDATE
19. In the memory hierarchy diagram given, which of the following represents A , B , C and D
respectively?
A
Cache Memory
B
Solid State Storage
C
Optical Disk
D
(1) Magnetic Tape, Magnetic (Hard) Disk, Random Access Memory (RAM), Processor Registers
(2) Processor Registers. Magnetic (Hard) Disk, Random Access Memory (RAM), Magnetic Tape
(3) Processor Registers, Random Access Memory (RAM), Magnetic (Hard) Disk, Magnetic Tape
(4) Processor Registers, Random Access Memory (RAM), Magnetic Tape, Magnetic (Hard) Disk
(5) Random Access Memory (RAM), Processor Registers, Magnetic (Hard) Disk, Magnetic Tape
20. Which of the following represents the result of the binary arithmetic operation of 11001100 - 01010101?
(1) 00110011 (2) 01100110 (3) 01110111 (4) 10011001 (5) 10101010
21. Which of the following statements is/are correct about two's complement?
A - Subtraction is carried out as addition.
B - Calculations are more efficient.
C - It is possible to represent negative numbers within the two’s complement.
(1) A only (2) B only (3) A and B only
(4) B and C only (5) All A, B and C
23. Which is the most suitable HTML form element input type in which the user can enter his credit card
secret number?
(1) textarea (2) type= "checkbox" (3) type= "hidden"
(4) type ="password" (5) type="text"
24. Consider the following statements regarding the Extended Entity Relationship (EER) model.
A - EER model includes all the concepts of the original ER model.
B - EER model has additional concepts of specialization/generalization.
C - EER model includes a new concept to model the weak entities.
Which of the above statements is/are correct?
(1) A only (2) B only (3) A and B only
(4) A and C only (5) All A, B and C
28. Which of the following is a valid example for a PHP variable name?
(1) @class_name (2) &class_name (3) $class name
(4) $class_name (5) _class_name
30. Which of the following is a valid example for CSS class selectors?
(1) .myclass{color:blue;font-family:serif;}
(2) #myclass{color:blue;font-family:serif;}
(3) myclass{color:blue;font-family:serif;}
(4) myclass:{color:blue;font-family:serif;}
(5) myclass;{color: blue;font-family:serif;}
31. Which one of the following is false regarding the HTML form methods GET and POST?
(1) Both methods are used to transfer data from client side to the server.
(2) GET method is more efficient than the POST method.
(3) GET method is more suitable to send sensitive data.
(4) POST method does not have a limit on size of data.
(5) POST requests cannot be bookmarked.
32. The diagram shows the variation of value of information with time for five events of a single mission
in the chronological order. Information about the entire mission especially about the occurrences of
each event is made available on-line real time.
S
Value
P T
Q
R
(0,0) Time
B - Artificial Intelligence can use nature inspired computing for improving its ability to understand
ee eand solve computationally challenging problems.
e
C - Computing models and algorithms developed under nature inspired computing can only be used
ee ein natural environments such as rain forests, oceans and wild-life sanctuaries.
e
• Consider the following logic circuit diagram to answer the questions 37 and 38:
Cin
A S
Cout
37. Which of the following statements is/are correct about the above circuit?
I - It implements a full adder.
II - The logic function of S can be stated as S =A B Cin .
III - The logic function of Cout can be stated as Cout = AB + BCin + ACin .
(1) I only (2) II only (3) I and II only
(4) II and III only (5) All I, II and III
38. Which of the following statements is/are correct about the part of the circuit within the area
surrounded by the dotted line?
I - It implements a half adder.
II - It can be implemented using only AND and OR gates.
III - It can be implemented using only NAND gates.
(1) I only (2) II only (3) III only
(4) I and III only (5) All I, II and III
Which of the following is the correct logic expression that corresponds to the two marked segments
on the Karnaugh map?
(1) 𝐴𝐵̅ + 𝐵𝐶̅ (2) 𝐴̅𝐶̅ + 𝐴𝐵 (3) (𝐴̅ + 𝐶̅ )(𝐴 + 𝐵)
(4) (𝐴 + 𝐶)(𝐴̅ + 𝐵̅) (5) 𝐴𝐶 + 𝐴̅𝐵̅
Start
i=8
result = 1
input n
Yes
Is n ≤ 0 ?
No
result = result x n
i = i+1
No
Is i ≤ 0 ?
Yes
output result
Stop
40. Which of the following statements is/are correct about the algorithm expressed by the flowchart?
A - It takes 8 inputs.
B - It outputs the product of the positive numbers in the input.
C - If every input is zero, then the output will be zero.
(1) A only (2) B only (3) C only (4) A and B only (5) B and C only
41. If the following is fed as the input to the algorithm, what will be the output?
3 2 -4 4 1 -9 5 -6 -1
(1) -25920 (2) -216 (3) 120 (4) 216 (5) 25920
42. Which of the following Python programs has/have the same functionality (i.e., the same output for
a given input) as the algorithm in the flowchart above?
A — i=8 B — result = 1 C — result = 1
result = 1 for i in range(8): i=8
while (i > 0): n = int(input()) while 1:
n = int(input()) if (n > 0): n = int(input())
if (n > 0): result = result * n if (not(n <= 0)):
result = result * n print (result) result = result * n
i=i-1 i=i-1
print (result) if (i <= 0):
break
print (result)
(1) A only (2) B only (3) C only (4) A and B only (5) All A, B and C
45. What will be the output if the following Python code is executed with "abcabc" as the input?
result = 1
s = input()
if (len(s) > 3):
result = 2
if (len(s) < 6):
result = 3
elif (len(s) > 6):
result = 4
else:
result = 5
print(result)
(1) 1 (2) 2 (3) 3 (4) 4 (5) 5
47. What will be the output of the following Python code segment?
L = [1,-2,4,3,2,-7,11,2,8,-1]
x = 0
for i in range(len(L)):
if (L[i] < 0):
continue
if (L[i] > 10):
break
x = x + L[i]
print(x)
(1) 0 (2) 1 (3) 10 (4) 21 (5) 31
48. What will be the result when the following Python code is executed?
x = 50
def func(y):
x = 2
y = 4
func(x)
print(x)
(1) 50 (2) 2 (3) 4 (4) syntax error (5) name error
49. Which of the following is not an information stored in a Process Control Block (PCB) of the operating
system?
(1) free disk slots (free disk blocks that could be utilized by the process)
(2) memory management information for the process
(3) program counter (address of the next instruction to be executed for the process)
(4) process identification number (unique identifier for the process)
(5) process state (e.g., Blocked, Ready, etc.)
⁕⁕⁕
AL/2019/20/E-II (NEW) #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிமையுமையது / All Rights Reserved ]
kj ks¾foaYh / புதிய பொைத்திட்ைம் / New Syllabus
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Use additional reading time to go through the question paper, select the questions you will answer and
decide which of them you will prioritise.
(ii) Draw the expected output of the following HTML code segment when rendered by a
web browser.
<html>
<body>
<table border="1">
<caption>Schedule</caption>
<tr><th>Time</th><th>Event</th></tr>
<tr><td>8 am</td><td>Drama</td></tr>
<tr><td>10 am</td><td>News</td></tr>
<tr><td colspan =2> Lunch</td></tr>
</table>
</body>
</html>
(2) .................................................................................................................................
(ii) Consider the following HTML elements require the styles as given in the table.
Element Name Attribute Attribute Value
P color red
font-family Calibri
text-align justify
h1 color red
font-family Calibri
h2 color red
font-family Calibri
text-align justify
Write an external style sheet in the most efficient way to fulfil the above requirements
using only the CSS group selector concept.
...................................................................................................................................
...................................................................................................................................
...................................................................................................................................
...................................................................................................................................
(c) The following PHP code is intended to add data into 'name' and 'class' fields of the table
named 'student' in the MYSQL database called 'school_db'. User name and password to
login to 'school_db' are 'admin' and 'A!2t*' respectively.
Complete the PHP code segment by filling the blanks.
<?php
$conn = new mysqli('locathost', ......................... , ......................... , .........................);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
if ($conn->query(.........................) ==true) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
?>
(i) ...............................................................................................................................
(ii) ...............................................................................................................................
(iii) ...............................................................................................................................
(iv) ...............................................................................................................................
(v) ..............................................................................................................................
(vi) ..............................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
(i) The number of hours (NoOfHours) that each staff member works on each project is
recorded.
Draw the attribute NoOfHours in the relevant position of the ER diagram with the
correct symbol and the label.
(ii) For each accepted project a temporary location is rented for the staff, for the duration of
the project. For each Location, the OwnerName, PhoneNo, Address, Rent, RentedDate
and RentedPeriod arc recorded. One project has only one location. A rented location is
used for only one project. When a certain project is completed, the location rented for
the project will be released and handed over to the owner.
Draw the Entity ‘Location’ with relevant attributes inside the area X in the diagram and
link it to the existing ER diagram by indicating the cardinality.
(b) Write down the most appropriate term from the given list to fill the blank in each statement
given below.
List = {ALOHA, Application Layer, CIDR, DHCP, Domain Name System, Network Layer,
Packet Switching, Parity Bit, Parity Byte, Proxy Server}
(i) ............................................. provides IP addresses for the given URLs and web
addresses.
(ii) File Transfer Protocol (FTP), Simple Mail Transfer Protocol (SMTP) and the Telnet
service are implemented in the .............................................
(iii) With the ............................................. a device may get a different IP address every
time it connects to the network.
(ii) Write down one advantage that the use of page tables bring with respect to program
sizes compared to the size of physical memory.
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
(iii) Give one reason as to why a particular page of a process could be absent in physical
memory.
..................................................................................................................................
..................................................................................................................................
⁕⁕
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Part B
⁕ Answer any four questions only.
1. The Boolean function known as the majority function takes n binary inputs and outputs 1 if a majority
(at least half) of the inputs are 1, otherwise it outputs 0. Let us consider the case when n=3, which is
the 3-input majority function, whose inputs are A, B and C and the output is Z.
(a) Give the truth table for the 3-input majority function.
(b) Using Karnaugh maps, derive a simplified Boolean expression for the output Z in the 3-input
majority function.
(c) Construct a logic circuit for the 3-input majority function using NAND gates only.
(b) Give one reason as to why a fully connected (all-to-all) network topology is not suitable for this
school computer network.
(c) The Lab administrator who is responsible to setup the school computer network has requested
for switches and a router.
Showing clearly the network connection topology and the devices, draw the network diagram
to represent the logical arrangement for the school computer network that the Lab administrator
can implement to fulfil the school requirements.
(d) Give one reason as to why TCP is preferred over UDP as the transport protocol for the school
computer network.
3. (a) ABC Books (Pvt.) Ltd. specializes in buying and selling used secondhand books. At present the
business operations are fully manual (pure brick).
(i) ABC Books (Pvt.) Ltd. starts a website and allows its customers to purchase books online.
What is the revenue model (method of revenue) applicable in this scenario?
(ii) Moving from pure brick type to brick and click business model, what is the most significant
challenge unique to ABC’s business? Explain your answer.
Hint - Compare with the online sales of new books
(iii) ABC Books (Pvt.) Ltd. has proposed to extend its website to an e-commerce marketplace for
used books. This marketplace supports B2C, B2B and C2C business types and allows other
businesses to participate as well. Explain briefly between whom the transactions in each of
the business types B2C, B2B and C2C will take place in the proposed marketplace.
(iv) Other than the revenue model you mentioned in (i) above, identify another suitable revenue
model to be followed by the ABC Books (Pvt.) Ltd. in their proposed c-commerce
marketplace.
(v) Identify and write down a possible way to make payments within this e-commerce
marketplace.
(vi) Briefly explain how book publishing companies can use the proposed e-commerce
marketplace data for their businesses.
(b) Multi-agent systems can be useful when complex system interactions are implemented. The
following diagram shows a simplified version of a multi-agent system that manages the secure
access to the server room of a data-center.
Server Room Door
B
Keypad
C
Database
A
Agent 1
R
Q
P
Agent 2
Systems Engineer
A brief scenario of the usage is as follows:
All authorized system engineers must use their access code, which is a 6-digit number to enter
the restricted server room.
When the access is granted to the server room, a set of movable CCTV cameras starts recording
the server area.
The processed data of CCTV input are saved in the database. Interactions are shown using A,
B, C, P, Q, and R arrows.
[See page ten
AL/2019/20/E-II (NEW) -10- #ictfromabc
(i) Identify the agent with no user interactions (self-autonomous) in this setup.
(ii) Sense-Compute-Control is a widely used 3-step design style of agent-based system
implementations.
From A, B and C interactions, separately identify and write down the most suitable interaction
arrow to represent each step, i.e., Sense, Compute, and Control.
(iii) C and R interaction links are shown for two directions. Explain the reasons for the duplex
links for both C and R interactions separately.
(iv) Interaction A can be seen as a user-to-agent interaction. Identify an agent-to-agent interaction
and explain the operational use of that interaction.
(v) Give one reason as to why the CCTV inputs are sent to. the database through the Agent 2
instead of sending directly.
4. (a) The ICT teacher in a school needs to process the marks obtained by all the students in a class for
the ICT subject and compute the average mark for the class. Construct a flow chart to express an
algorithm for this purpose. Assume that the first input is the number of students in the class, n.
Next, the marks of n students will be input one-by-one.
(b) Consider the flow chart given below. Note that x%2 represents (x mod 2).
Start
input n
a=0
Yes
Is n ≤ 0 ?
No
input x
No
Is x % 2 = 0 ?
Yes
a=a+1
n=n-1
Output a
Stop
(i) What would be the output if the first input (n) was 6 and the next inputs were 3, 6, 4, 12,
11, 9?
(ii) What is the purpose of this algorithm?
(iii) Develop a Python program to implement the algorithm expressed by the flow chart.
5. A vehicle rental company has registered vehicle owners. Vehicles are obtained from the owners and
rented to the customers. Consider the following relations regarding the vehicle rental company.
I. Customer (Customer_NIC, Customer_Name, City, Postal_Code)
II. Vehicle_Owner (Owner_Id, Owner_Name, Contact_No)
III. Vehicle(Vehicle_Reg_No, Description, Owner_Id)
• The Customer relation contains customer’s national identity card number (NIC) which is
unique, name, city where he/she is living and the postal code of the city. A customer lives in
a single city and there are many customers in one city. The postal code depends on the city.
• The Vehicle_Owner relation contains the Owner_Id which is unique, owner’s name and the
contact number.
• The Vehicle relation contains the vehicle registration number which is unique, a description
about the vehicle and the Owner_Id.
A customer can rent more than one vehicle. Also, it is possible to rent one vehicle to many
customers at different instances. Each vehicle is owned by one owner and one owner can have more
than one vehicle.
(a) In which normal form do the above relations given in I, II, III above exist? Justify your
answer.
(b) Convert the above relations to the next Normal Form from the current Normal Form which
you have stated in 5(a). (Present the contents relevant to the labels P to U indicated in the
following table as your answer.)
II Q T
III R U
(c) Draw an Entity Relationship (ER) diagram to depict, the above relations by identifying the
relationships, key attributes, other attributes and the cardinality.
(d) It is necessary for the company to keep the details of renting vehicles by customers. Create
a relation called “Rent”, including the details Rent_Date, Start_Time and End_Time.
(e) Write an SQL statement to select Owner_Id and Vehicle_Reg_No of all the vehicles owned
by each vehicle owner.
P
Q
Approved Invoice + Payment
R Blood
Patient
Receipt Testing
Updated Receipt System
S
Re-updated Receipt
Figure 1
Identify the five missing data flows from the description given above and write them down.
(ii) Level 1 of the DFD for the above context diagram is shown in Figure 2.
T
P 1.0 2.0
Process Q Process
Blood Test W
Q .....................
Request
Re-
updated R
S Receipt
X 3.0
T
R Process
Patient
Report
Receipt
Updated Receipt
Figure 2
⁕⁕⁕
AL/2020/20/E-I(NEW) #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிமையுமையது / All Rights Reserved ]
kj ks¾foaYh / புதிய பாைத்திட்ைம் / New Syllabus
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Instructions:
⁕ Answer all the questions.
⁕ Write your Index Number in the space provided in the answer sheet.
⁕ Instructions are also given on the back of the answer sheet. Follow those carefully.
⁕ In each of the questions 1 to 50, pick one of the alternatives from (1), (2), (3), (4), (5) which is correct or
most appropriate and mark your response on the answer sheet with a cross (x) in accordance with the
instructions given on the back of the answer sheet.
⁕ Use of calculators is not allowed.
1. A computer processor will operate fastest when the data that it wants is in the
(1) cache memory. (2) hard disk. (3) magnetic tape.
(4) main memory. (5) optical disk.
2. Which of the following hardware components will lose data when the power to a computer is
switched off?
A - registers
B - cache memory
C - main memory
(1) A only (2) A and B only (3) A and C only
(4) B and C only (5) All A, B and C
3. Computer has evolved from the early main frames to the relatively small smart devices with high
computing power used today. Which of the following inventions contributed to reduce the physical
size of computers?
(1) bus (2) integrated circuits (3) registers
(4) solid state memory (5) vacuum tube
4. Consider the following diagram showing some hardware component connections on a computer
system: Display Unit
Keyboard Hard
Memory Disk
CPU
A Memory Video Keyboard Hard Disk
controller controller controller controller
Bus
The hardware part within the CPU indicated by A in the above diagram has a set of registers that has
the memory translation maps of the currently running process. When given an input virtual address of
the current process it outputs the relevant physical address (if any).
The A in the above diagram denotes the
(1) arithmetic and logic unit (ALU). (2) control unit. (3) L1 cache memory.
(4) memory management unit. (5) page table.
[See page two
AL/2020/20/E-I(NEW) -2- #ictfromabc
5. Consider the two binary numbers P = 10110001 and Q = 01001110. If X = P OR Q and Y = P
AND Q, what will be the values of X and Y respectively?
(1) 01001110, 10110001
(2) 10110001, 00000000
(3) 10110001, 11111111
(4) 11111111, 00000000
(5) 11111111, 10110001
Whatofisthe
6.7. Which thefollowing
2’s complement of decimal
is true about - 12?
2’s complement?
(1) An extra bit is used
00001100 to represent the
(2) 00110011 (3)sign.
11110011 (4) 11110100 (5) 11111011
(2) Makes
(3)Which it
10110001, possible to
11111111 build low-cost, high-speed hardware to perform arithmetic operations.
7. (3) of the following is true about 2’s complement?
(4) Addition
11111111,and subtraction are used as two different operations.
00000000
(4)
(5) 11111111, 10110001in hexadecimal number system.
Usually represented
(5) Used in first generation computers to perform logic operations.
9. Which of the following is the most simplified expression equivalent to 𝐴𝐵̅𝐶̅ + 𝐵𝐶̅ + 𝐴̅𝐵̅𝐶 + 𝐵𝐶 ?
(1) 𝐴𝐵̅𝐶̅ + 𝐴̅𝐵̅𝐶 + 𝐵 (2) 𝐵̅(𝐴𝐶̅ + 𝐴̅𝐶 ) + 𝐵
(3) 𝐶̅ (𝐴𝐵̅ + 𝐵) + 𝐶(𝐴̅𝐵̅ + 𝐵) (4) 𝐴𝐶̅ + 𝐴̅𝐶 + 𝐵
(5) 𝐴̅𝐶̅ + 𝐵
10. A block diagram of a sequential logic circuit is shown below, with one block labelled as “A” and the
other labelled as “B”.
Which of the following statements about the above block diagram are correct?
I — The block A is a combinational logic circuit.
II — The block B is a memory element.
III — Only the block A can be implemented using logic gates.
(1) Only I (2) Only II (3) Only I and II
(4) Only I and III (5) All I, II and III
𝐴̅
F
X
Y
If the required output of the above circuit is 𝐴𝐵 + 𝐴̅𝐵̅ + 𝐶̅ , then what should the inputs X and Y
be?
(1) X = B and Y = C (2) X = B and Y = 𝐶̅ (3) X = 𝐵̅ and Y = C
(4) X = 𝐵̅ and Y = 𝐶̅ (5) X = 𝐶̅ and Y = B
12. The operating system (OS) is another program that runs on the computer that has some special
responsibilities. Memory management, file management and input/output management are some
of these responsibilities. What is another important responsibility of the OS?
(1) backup management (2) cache memory management
(3) compiler management (4) process management
(5) system clock management
13. When the number of processes started by a user on a single-processor computer increases, what
happens to the response time of each process as perceived by the user and the memory
management related work of the operating system respectively?
(1) Both the response time and the memory management related work increase.
(2) Response time decreases while the memory management related work increases.
(3) Response time increases while the memory management related work decreases.
(4) Both the response time and the memory management related work decrease.
(5) There is no change in either of them.
15. In a computer, the size of a user program could exceed the size of physical memory. Also, only the
demanded areas of programs are kept in physical memory.
The above are due to which of the following?
(1) the use of cache memory
(2) the use of contiguous file allocation
(3) the use of a file allocation table (FAT)
(4) the use of memory management unit (MMU)
(5) the use of pages, frames and page tables
16. Which of the following statements regarding compilers and interpreters are correct?
A - A compiler transforms an entire high-level language program into its machine code.
B - An interpreter converts each high-level program statement into the relevant machine code
during the program run.
C - Compiled codes usually run faster than interpreted codes.
(1) A only (2) A and B only
(3) A and C only (4) B and C only
(5) All A, B and C
17. Which of the following statements regarding guided and unguided media are correct?
A - Guided media transmission supports higher data speeds than unguided media transmission.
B - Guided media is subjected to less interference than unguided media.
C - Unguided media transmission is more secure than guided media transmission.
D - Unguided media transmission uses low bandwidth than guided media transmission.
(1) A, B and C only (2) A, B and D only
(3) A, C and D only (4) B, C and D only
(5) All A, B, C and D
18. What is the process carried-out in the modulation technique in data transmission?
(1) encoding information in transmitted signal
(2) encoding signals in transmitted information
(3) extracting information from the transmitted signal
(4) extracting signal from the transmitted information
(5) transfer information with minimum distortion
19. Which of the following statements about bus topology are incorrect?
A - Computers and network devices are connected to a single cable.
B - All traffic flows are either clockwise or anticlockwise.
C - Bandwidth is shared among the nodes.
D - Each node is connected to two of its neighbours.
(1) A and B only (2) A and D only
(3) B and C only (4) B and D only
(5) C and D only
21. You are requested to create 16 subnets with a Class C IP. Which subnet mask is suited to create
the subnet?
(1) 255.255.255.240 (2) 255.255.255.248
(3) 255.255.255.250 (4) 255.255.255.252
(5) 255.255.255.224
22. Which of the following statement/s regarding the testing of a system are correct?
A - Black-box testing involves detailed checking of each line in the code.
B - Unit-testing helps to uncover errors in the codes.
C - System testing should not be performed prior to unit-testing.
(1) A only (2) B only
(3) C only (4) A and C only
(5) B and C only
25. Which of the following statements on Data Flow Diagrams (DFD) is incorrect?
(1) Context diagram is a DFD with the highest level of abstraction.
(2) All data stores in a system must be represented in the context diagram.
(3) Data flows are used to link the other components in DFDs.
(4) Elementary processes are not decomposed further.
(5) External entities in DFDs act as sources or recipients of data.
26. What is the correct SQL statement to delete a database called 'ALdb'?
(1) delete ALdb; (2) delete database ALdb;
(3) drop ALdb; (4) drop database ALdb;
(5) remove database ALdb;
27. Which of the following statement/s about a relation in the Second Normal Form (2NF) are true?
A - It can have a composite key.
B - It should be in the First Normal Form (1NF) as well.
C - All non-key attributes are fully functionally dependent on the primary key.
(1) B only (2) C only
(3) A and B only (4) B and C only
(5) All A, B and C
28. Which of the following statement/s regarding the logical database schema are true?
A - It is a blueprint for a database.
B - It contains data and information.
C - It formulates all the constraints that are to be applied on the data.
(1) A only (2) A and B only
(3) A and C only (4) B and C only
(5) All A, B and C
• Consider the following scenario about ‘authors’ and ‘books’ to answer the questions 30 and 31.
“An author can write books. A book has a title and a code called ISBN which is unique. A book can
be written by either one or several authors. An author has a name and a unique ID. An author can
have a type as either chief author or a co-author for a particular book.”
30. Which of the following is the most suitable Entity Relationship (ER) representation for the above
scenario?
Type
Name
ISBN
(1)
1 Writes M Author ID
Title Book
Type
Name
ISBN
(2) N M Author
Title Book Writes ID
Type Name
ISBN
(3)
N Writes M Author ID
Title Book
Type Name
ISBN
(4)
1 Writes M Author ID
Title Book
Type Name
ISBN
(5)
N Writes M Author ID
Title Book
31. How many tables can be derived initially, when mapping the entity relationships in the above scenario
to a relational schema?
(1) 1 (2) 2 (3) 3 (4) 4 (5) 5
• The questions 32 — 34 are based on the algorithm expressed by the flowchart below. The algorithm
takes a list L of items and an item K as inputs and is expected to output the number of items
in L that are equal to K. List indices start at 0. Note that two entries, labelled as P and Q , in the
flowchart are blank (unspecified).
32. For the algorithm to function correctly, what should be inserted at the blank P ?
(1) n = n-l
(2) n = n+l Start
(3) count = count + 1
(4) count = count + i
(5) count = count + n input list L
II L = input().split()
K = input() Q
Yes
count = 0 .................
n = len(L)
for i in range(n):
No
if (L[i]== K): output count
count = count + i
print(count)
Stop
III L = [int(x) for x in input().split()]
K = int(input())
count = i = 0
while (i < len(L)):
if (L[i]== K):
count = count + 1
print(count)
35. What would be the output of the following Python code, if the input was 17?
n = float(input())
m = (n // (n % 5)) ** 3
print(m)
(1) 24.0 (2) 25.5 (3) 512.0 (4) 614.125 (5) an error message
36. Suppose that S is a string, L is a list and T is a tuple in a Python program. The length of each
is 10. Consider the following Python statements:
I S[2] = '2'
II L[2] = '2'
III T[2] = '2'
Which of the above three statements will generate an error?
(1) Only I (2) Only II (3) Only I and II
(4) Only I and III (5) All I, II and III
37. What would be the output of the following Python code segment?
S = "corona virus pandemic"
V = "aeiou"
count = 0
for i in range(len(S)):
if (S[i] in V):
count = count + 1
print(count)
(1) 0 (2) 5 (3) 8 (4) 19 (5) 21
38. What would be the output when the following Python code is executed?
x = 1
def myfunc(p, q):
global x
p, q = q, p
x = x + p
myfunc(x,3)
print(x)
(1) 1 (2) 2 (3) 3 (4) 4 (5) an error message
39. What would be the output of the following Python code, if the input was 100?
n = int(input())
if (n > O):
m = "Z"
if (n > 10):
if (n > 100):
m = "A"
elif (n < 50):
m = "B"
else:
m = "C"
else:
m = "D"
print(m)
42. Which of the following HTML tags are used to define a definition list?
(1) <dl>, <dd>, <li> (2) <dl>, <dt>, <dd> (3) <dl>, <td>, <dd>
(4) <dl>, <th>, <dd> (5) <dl>, <th>, <td>
43. Which HTML tag is used to include a caption for a fieldset grouping in a form?
(1) <caption> (2) <head> (3) <label> (4) <legend> (5) <title>
44. What is the expected output of the following PHP code block?
<?php
$one = "Welcome";
$two = "2020";
echo $one.$two ;
?>
(1) Welcome.2020 (2) Welcome2020 (3) Welcome 2020
(4) Welcome;2020; (5) Welcome.2020;
45. Which of the following affects least to the downloading speed of a web page?
(1) capability of the web browser
(2) number of hyperlinks in the web page
(3) number and size of images in the web page
(4) processing power of the server computer that stores the web page
(5) the bandwidth of the internet connection which is used to access the web page
46. Which of the following statements is true about the code given below?
<style>
.title {
text-align: center;
color: blue;
}
</style>
(1) This defines internal styles and uses the CSS ‘class’ concept.
(2) This defines internal styles and uses the CSS ‘group’ concept.
(3) This defines inline styles and uses the CSS ‘group’ concept.
(4) The styles defined inside the code can be used only for one type of element.
(5) This is an example of the CSS ‘Id’ concept and the name of the Id is ‘title’.
50. Which of the following statements about quantum computing are correct?
A - In quantum computing, principles of quantum physics are applied.
B - Quantum bits (qubits) are used in quantum computing as the information unit.
C - Quantum computers emit radiation fatal to human users.
(1) A only (2) B only (3) C only
(4) A and B only (5) All A, B and C
⁕⁕⁕
AL/2020/20/E-II(NEW) #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிமையுமையது / All Rights Reserved ]
kj ks¾foaYh / புதிய பாைத்திட்ைம் / New Syllabus
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Use additional reading time to go through the question paper, select the questions you will answer and
decide which of them you will prioritise.
(b) Consider the following html code in which the lines are numbered to answer the
questions in this part.
1. <html>
2. <head>
3. <style type="text/css">
4. h1,h2{color:blue;}
5. </style>
6. </head>
7. <body>
8. <h1 style="color:green;">Title One</h1>
9. <h2>Title Two</h2>
10. </body>
11. </html>
(i) What are the colours of the text in line numbers 8 and 9 when the above code
is rendered by the browser?
(ii) Write one advantage of defining styles as in line numbers 3,4 and 5 over that
of line number 8.
………………………………………………………………………………………
………………………………………………………………………………………
......................
………………………………………………………………………………………
………………………………………………………………………………………
......................
(c) The following four PHP code blocks which are labeled as A,B,C and D are taken from
a code intended to retrieve data from a database to display on the screen. However,
the code blocks are not in correct order.
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
B
}
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
echo "Code:".$row["itemcode"]."/Item:".$row["name"]."<br>";
C }
} else {
echo "0 results";
}
(i) Write the labels of the four code blocks in the correct order inside four blanks
of the following PHP script.
<?php
………………………………
………………………………
………………………………
………………………………
$conn- >close();
?>
(ii) If the above code blocks are in the correct order, what is the expected output
if the ‘Product’ table has only the following values?
Product
itemcode name
P1 Pen
ProductP3 Book
………………………………………………………………………………………
(ii) If the above code blocks are in the correct order, what is the expected
………………………………………………………………………………………
output if the ‘Product’ table has only the following values?
......................
[See page four
AL/2020/20/E-II(NEW) -4- #ictfromabc
2. (a) In an emergency health problem where people have to stay at home for a long period, Do not
write
the shops within the area remain closed for regular business activities. Under such in this
circumstances the shops within a village or nearby town can help their community by column
practicing their business through e-commerce.
Considering the above scenario, fill the blanks in the following statements with suitable
phrases from the given list of phrases.
(i) In this emergency situation, shops follow the ................................ business
model.
(ii) Shops must use ................................. to allow customers to purchase more
than one type of product in a single transaction.
(iii) The e-commerce site for each shop can implement ................................... to
display their products to the customers.
(iv) For business owners who cannot use payment gateway through online fund
receipts and for the customers who do not have any online mode of payments
can still be supported through .........................................
(v) .................................................. is one of the best ways to reduce the overhead
costs of delivery within a local area such as a lane, street or housing scheme.
(vi) The local shop owners can establish .................................... to serve their
community better by enabling access to each shop’s services through a common
portal.
List of phrases: {advertising banners, an online marketplace, a shopping cart, a web product
catalogue, cash-on-delivery, credit-cards, discount pricing, group purchasing,
payment gateways, click and brick, pure click, subscription as a revenue
model}
(i) Write the output of the program if the first input (that creates L1) is “7 4 1 2 2 8”
and the second input (that creates L2) is “8 2 4 5 6”?
……………………………………………………………………………………....
(2) …………………………………………………………………………………………
(ii) What are the three steps in the FETCH-EXECUTION cycle of a computer?
(1) …………………………………………………………………………………………
(2) …………………………………………………………………………………………
(3) …………………………………………………………………………………………
(b) Match each of the given sentences (i) - (v) relating to computer networks with the
most suitable item from the list below.
List = {ADSL Connection, DSL Connection, FTP, HTTP, Internet Layer, Malware,
Phishing, TCP, Transport Layer, UDP}
(i) A simple and query based communication model with a minimum use of
protocol mechanisms applied in transport layer
(ii) A protocol for data communication in the World Wide Web
(iii) The layer that defines the addressing and routing structures used for the TCP/IP
protocol suite in the TCP/IP model
(iv) The process of attempting to get sensitive information from someone by
pretending as a trustworthy person
(v) The connection that allows the data transmission at much greater speed and
capacity than the narrowband services
Note: Write only the matching item against the phrase number.
(i) ……………………………….......
(ii) ………………………………......
(iii) ……………………………….....
(iv) …………………………….…....
(v) ……………………………….......
………………………………………………………………………………………….
………………………………………………………………………………...............
(b) The block size of a disk is 4 KB. A portion of its File Allocation Table (FAT) starting
from block 300 at a particular time, is shown below. It gives the blocks of maximum.py
file as well:
FAT
300 303
301 300
302
303 304
304 -1
………………………………………………………………………………………….
………………………………………………………………………………...............
(c) Assume that we have a computer that can use 16-bit virtual addresses from 0 up to 64 K.
Assume further that this computer has only 32 KB of physical memory and that the page
size in this computer is 4 KB.
(i) The above 16-bit virtual address is made up of the bits of the page number followed
by offset bits. How many bits in the address are required to store a page number
in this computer?
………………………………………………………………………………………..
Notes :
• The frame number is indicated in binary.
• The virtual addresses on page 0 are from 0 to 4095 and on page 1 are from 4096
to 8191 and so on.
• The Present/absent bit indicates the validity of the entry. If this bit is 1, the
entry is valid and can be used. If it is 0, then the relevant virtual page is not in
physical memory.
Assume that in the above process the virtual address 0011 0000 0000 0010 is
wanted.
The above virtual address is mapped to the physical address 110 0000 0000 0010.
Explain it.
…………………………………………………………………………………………
.……………………………………………………………………………….............
.........................................................................................................................
.........................................................................................................................
.........................................................................................................................
.........................................................................................................................
.........................................................................................................................
.............
(iii) Assume that there was a request for the virtual address 0001 0000 0000 0000.
Due to the set of tasks that the operating system initiated to fulfil that request,
the present/absent bit of the page number 6 in the above page table changed
from 1 to 0. What is the likely 15-bit physical address that the virtual address
0001 0000 0000 0000 will be mapped to?
………………………………………………………………………………………..
⁕⁕
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Part B
⁕ Answer any four questions only.
5. Consider the logic circuit shown in the figure, in which A, B and C are the inputs and Z is the
output.
A
B Z
(a) Give the complete truth table for the given circuit.
(b) Using a Karnaugh map, derive a simplified sum-of-products (SOP) expression for the output Z.
(c) Using a Karnaugh map, derive a simplified product-of-sums (POS) expression for the output Z.
(d) Of the two expressions (SOP and POS) you obtained in (b) and (c) above, which one is better
to implement a more simplified logic circuit than the given logic circuit above? Explain your
answer.
6. Consider the following scenario:
The PQR Company has three departments, namely Finance, Marketing and Human Resource
(HR). At present all the activities of the PQR Company are conducted manually. The company
decides to computerize all their activities by establishing an IT unit with a computer lab for staff
training. Resources will be allocated for each department and the IT unit as follows.
Resources
Department
Computers Printer type Software Server
Finance 28 01 Network Printer Accounting Information System (AIS)
HR 40 01 Network Printer Human Resource Information System (HRIS)
IT Unit 50 01 Printer Learning Management System (LMS)
Marketing 35 01 Network Printer Marketing Information System (MKIS)
The company proposes the following:
•A Local Area Network (LAN) for each Department and the IT unit in order to share
specific software and resources
• All computers to be given efficient Internet connectivity with the help of a DNS (Domain
Name System) and proxy servers
[See page nine
AL/2020/20/E-II(NEW) -9- #ictfromabc
• An Internet Service Provider (ISP) to supply the Internet connectivity to the IT unit
(c) Showing clearly the connection topology and the devices, draw the logical arrangement for
the company network that the network administrator can implement to fulfill the company’s
requirements. (Assume that additional IP addresses can be obtained.)
(d) Network administrator decides to dynamically manage the IP addresses of the entire
network. Write down the mechanism that needs to be implemented to achieve this task.
7. (a) AB Stores is a grocery shop in your home town. With your expert advise, AB Stores has
implemented a web-based e-commerce system to conduct their business online as well.
Customers can select their required products and confirm the order online.
(i) What is the e-commerce business type applicable in this scenario? :
(ii) What is the revenue model used in this e-commerce offering of AB Stores?
(iii) The e-commerce solution of AB Stores became popular rapidly with a growing userbase.
However, it was noticed that most of the regular customers from the local community
still preferred using the physical outlet than the e-commerce offering. Identify two
possible reasons for such preference.
(iv) AB Stores extended its e-commerce system to integrate with its suppliers’ systems to
maintain its product stocks through automation. What is the e-commerce business type
AB Stores implements with this system modification?
(v) AB Stores decides to expand its e-commerce solution allowing other local shops to have
virtual stores within the system. What is the term used to identify the proposed system?
(vi) Write down one advantage that each of the following will receive by having the proposed
system in (v) above.
(1) Customers
(2) AB Stores
(3) other local shops
(vii) A recent market survey has identified the following about the customers who have registered
with the AB Stores e-commerce system proposed in (v) above:
• 98% are nearby residents within a 2 km radius.
• 12% of them are able to pay online (either through credit/debit cards or mobile cash
options)
(viii) With the expected growth of the e-commerce business of AB Stores, you have advised them
to outsource the delivery of customer purchased goods to a third-party delivery service.
Explain two advantages AB Stores can get by doing so.
(b) Multi agent systems can be used to replace some of the work that require humans. The
following scenario explains about myTours multi-agent system used to build customized
travel packages including flight booking, hotel room reservation and taxi booking for local
travel during the tour.
A prospective traveler (user) can access myTours website over the Internet and a chat-bot
agent starts interacting with the user. User can use voice or text as the input medium. During
this interaction chat-bot passes the extracted information to a search-agent who will take over
from the chat-bot agent and proceed to search for travel packages for the user. The search-
agent has a group of agents each specializing for particular type of travel service such as flight
search, hotel search etc. Once the search results are obtained the search-agent prepares the list
of travel packages with details and displays to the user for confirmation.
(i) Draw a simplified agent diagram of the above explained multi-agent system. Name the
important entities in your diagram.
(ii) Which agent cannot be considered as self-autonomous?
(iii) Write a disadvantage of using a multi-agent system for the given example user
requirement.
8. (a) You are given two positive integers N1 and N2 as inputs (assume NI < N2) and you have to
output the list of even numbers between N1 and N2. Construct a flowchart or a pseudo code
to express an algorithm for this purpose.
(b) Consider the flowchart given below. Assume that L is a list of positive integers, K is a positive
integer and every element in L is less than M, which is a large integer.
Start
input L, K
N = length of L
X=M
a=0
No
Is a < N ?
Yes
Is L[a] > K ?
No
Yes
Is L[a] < X ?
No
Yes
X = L[a]
a=a+1
output X
Stop
(i) What would be the output if the first input L was 2, 4, 7, 9, 3, 5 and the next input K
was 5?
(ii) What is the purpose of this algorithm?
(iii) Develop a Python program to implement the algorithm expressed by the flowchart.
9. (a) Consider the following description relating to details of players attached to different sports clubs.
A player always belongs to a sports club and he/she can be identified uniquely by the NIC
(National Identity Card) number. Further a player has a name which consists of a surname and
initials.
A club which is uniquely identified by its name can have many players. A player can play games.
Each game in this context is given a unique code and a description. A player can play more than
one game and each game is played by at least one player.
Note: Use only the relevant words in the above description when drawing the Entity-
Relationship (E-R) diagrams for the following questions.
(i) Draw an ER diagram for the above description.
(ii) Extend the ER diagram in above (i) to include the number of hours played by each player
for each game.
(iii) Player may have a sponsor who has a unique title. A sponsor can give sponsorship only for
one player. Extend further the ER diagram in part (ii) above to include the sponsor’s details.
(b) The ‘Winner’ table given below contains the details of the players who won different matches
and medals. There is a fixed amount of prize money given to each medal type. A Gold medal
has Rs. 20,000/=, a Silver medal has Rs. 10,000/= and a Bronze medal has Rs. 5,000/=.
Consider the primary key of the Winner table as NIC and MatchID.
Winner Table
NIC MatchID MedalType Prize
951477751V BD-2 Silver 10000
985467923V BD-2 Gold 20000
995874159V BD-1 Gold 20000
997656614V BD-3 Silver 10000
951477751V BD-1 Bronze 5000
(i) Write an SQL statement to display the number of players who won “Gold” medals.
(ii) In which normal form does the above table exist? Justify your answer.
(iii) Convert the above table to the next normal form. (It is not required to write the data in
the tables derived in next normal form.)
10.(a) The 3-stage procedure for handing over a letter for registered post to a post office is as follows:
• Determining Postage
The customer hands over the letter to the Registration Counter. The letter is weighed and
the postage for the relevant weight is read from a table. The postage is written on the letter
by the counter and it is given to the customer.
• Issuing Stamps
The customer hands over the letter with the postage written on it to the Stamps Counter
with the amount of postage. Stamps for the postage and the letter are issued to the customer
with any balance due by the Stamps Counter.
• Registering Letter
The customer sticks the Stamps on the letter and hands it over to the Registration Counter.
The Registration Counter accepts the letter, sticks the ‘Registered Post’ label with a unique
identification code to the letter, keeps the letter and issues a receipt with sender and recipient
information with the date and the amount paid, to the customer.
(b) Your school plans to use an online system to provide extended learner Support to A/L and
O/L students during school holidays, weekends and other times that the School is not open.
It is decided to use a Suitable Commercial-Off-The-Shelf (COTS) software System for this
need. Your team has been requested to help with this project.
(i) Some of your project team members argue that since COTS software are to be used there
is no need of requirement analysis. List three most significant reasons to explain why
you must complete requirement analysis even in this project. Note: Your answer must
be specific to a project with COTS software use. Generic answers will not be accepted.
(ii) Following are part of the requirements identified for the above project. Identify and
write down the labels (A-G) of all the functional requirement statements within the
list.
(A) Teaching material and learning content upload to the system shall only be
allowed to the teachers assigned to that particular learning session.
(B) The system shall be available for user access at least 99.9% of the time.
(C) The access history for each student’s learning activity participation or
content use within a course must be maintained as a report to be accessed
by the subject teacher.
(D) The system should be easy to work with after 1 hour of training.
(E) At the end of each learning session, the Students must be provided with an
option to ask questions from the teacher.
(F) The system should respond to any user request within 2000ms.
(G) The system should be able to serve a minimum of 200 concurrent users at a
given time.
(iii) What is the most appropriate testing Strategy for your team to evaluate the selected
COTS Software system for the identified requirements?
⁕⁕⁕
AL/2021(2022)/20/E-I #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிமையுமையது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka
YS% ;,xld
=j YS% ,xld úNd. fomd¾;fïka
úNd. fomd¾;fïka;=j YS% ,xld
;=júNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Instructions:
⁕ Answer all the questions.
⁕ Write your Index Number in the space provided in the answer sheet.
⁕ Instructions are also given on the back of the answer sheet. Follow those carefully.
⁕ In each of the questions 1 to 50, pick one of the alternatives from (1), (2), (3), (4), (5) which is correct or
most appropriate and mark your response on the answer sheet with a cross (x) in accordance with the
instructions given on the back of the answer sheet.
⁕ Use of calculators is not allowed.
1. Which of the following pairs contains types of software that are different with respect to ownership /
licensing?
(1) Application software and open-source software
(2) Application software and utility software
(3) Proprietary software and open-source software
(4) Proprietary software and systems software
(5) Systems software and utility software
5. What is the correct result of bit-wise XOR operation between the two binary numbers 010111002
and 111110012 ?
(1) 00000010 (2) 01011000 (3) 01011010 (4) 10100101 (5) 11111101
6. What is the correct 2’s complement binary representation of decimal - 3210 using 8-bits?
(1) 00100000 (2) 10100000 (3) 11011111 (4) 11100000 (5) 11100001
8. A particular command can be used to output the values of every byte in a file in decimal format.
Assume a file contains the following text:
Love trees!
Referring the two Notes (i) and (ii) given below, select the correct output that will result when
the said command is run on that file,
(1) 76 111 118 101 32 116 114 101 101 115 10
(2) 76 111 118 101 116 114 101 101 115 33 10
(3) 76 111 118 101 32 116 114 101 101 115 33 10
(4) 108 111 118 101 116 114 101 101 115 33 10
(5) 108 111 118 101 32 116 114 101 101 115 33 10
Notes:
(i) Some selected rows from the ASCII table are given below:
Decimal Character Decimal Character
10 (LINE FEED) 108 l
32 (SPACE) 111 o
33 ! 114 r
76 L 115 s
101 e 116 t
118 v
9. Consider the following Karnaugh map and the logic circuit implemented based on it where A, B and
C are the inputs and Z is the output:
AB
A
00 01 11 10
B
0 0 e f 0
C Z
C
1 1 g h 1
For the logic circuit to correctly implement the logic function represented in the Karnaugh map,
what should be the values of e, f, g, h ?
(1) e=0, f=0, g=1, h=1 (2) e=0, f=1, g=1, h=1
(3) e=1, f=0, g=1, h=1 (4) e=1, f=1, g=0, h=0
(5) e=1, f=1, g=0, h=1
10. Amara logs into a single-processor computer and starts a program to- work on his presentation. He
opens up a web browser too to get some information as well.
Consider the following process state transition diagram with respect to the process corresponding to
Amara’s presentation program.
New Terminated
Admitted Exit
A
Ready B Running
C D
Blocked
12. The block size of a disk is 4KB. A portion of its File Allocation Table (FAT) at a particular time is
shown below. The portion shown gives the blocks of the myprog.py file as well.
FAT
100 101
101 -1
102
103 100
104
13. Which of the following is/are correct with respect to a digital signal?
A - denoted by a square wave
B - contains a continuous range of values
C - uses discrete values to represent information.
(1) A only (2) B only (3) C only
(4) A and B only (5) A and C only
14. Which of the following is/are correct with respect to guided media used for data transmission?
A - a physical path is used for data transmission
B - signal is broadcast through air
C - Example: radio waves
(1) A only (2) A and B only (3) A and C only
(4) B and C only (5) All A, B and C
15. Which of the following could be used to digitally represent analog signals?
(1) attenuation (2) decoding (3) distortion
(4) pulse code modulation (5) synchronization
17. Given below are some characteristics of Transmission Control Protocol (TCP) and User Datagram
Protocol (UDP) :
A - best suited for applications that need high reliability and where the transmission time
is less critical
B - faster and requires fewer resources
C - guarantees that no packets are missing
D - packets may not arrive in order
E - used for voice communications over internet
Which of the above are the characteristics of UDP?
(1) A, B and C only (2) A, C and E only (3) A, D and E only
(4) B, C and D only (5) B, D and E only
18. Which of the following is/are examples for the use of Client-Server model?
A - A user printing a document using a printer connected to her computer
B - A bank customer accessing online banking services with a web browser
C - A cashier of a shop that accepts payments by credit cards
(1) A only (2) B only (3) C only
(4) A and C only (5) B and C only
19. Sender A wants to send the message HELLO to receiver B. Before sending the message, it is
converted to IFMMP. Which of the following is correct with respect to this scenario?
A - HELLO is the plaintext while IFMMP is the ciphertext.
B - IFMMP is the result of applying the ASCII code to HELLO.
C - +1 is the encryption key while -1 is the decryption key.
(1) A only (2) A and B only (3) A and C only
(4) B and C only (5) All A, B and C
20. Consider the following paragraph with three blanks labelled A, B and C:
When there are multiple computers in an office, each computer can be given a private IP
address. The router in the office gets a .....A...... IP address, and each of the computers
connected to that router through guided/unguided media gets a private IP address from the
.....B...... via the ....C.... protocol.
Which of the following is the correct combination for the blanks A, B and C?
(1) A - private, B - file server, C - HTTP
(2) A - private, B - Internet, C - DHCP
(3) A - private, B - router, C - FTP
(4) A - public, B - file server, C - FTP
(5) A - public, B - router, C - DHCP
21. Consider the information system types in List A and some examples in List B:
List A List B
A1 - Enterprise Resource Planning System B1 - A customer account system in a bank
B2 - A system that facilitates manufacturing,
A2 - Expert system marketing and sales of a garment business
B3 - A system that prescribes ayurvedic
A3 - Transaction processing system medicines using a knowledge base
23. Which of the following statements is/are correct with respect to Object Oriented Programming?
A - System output is determined by the object behaviour and their interactions.
B - System is modelled as a collection of objects.
C - Writing a program in this method is different from writing one according to the structured
programming method.
(1) A only (2) B only (3) C only
(4) A and C only (5) All A, B and C
24. Which of the following lists the activities of Structured System Analysis and Design Methodology
(SSADM) in the correct order?
(1) Feasibility study, Physical design, Requirement analysis, Requirement specification, System
eeeedevelopment
(2) Feasibility study, Requirements analysis, Requirement specification, Logical system specification,
eeeePhysical design
(3) Feasibility study, Requirement specification, Requirements analysis, Logical system specification,
eeeePhysical design
(4) Requirements analysis, Logical system specification, Feasibility study, Requirement specification,
eeeePhysical design
(5) Requirements analysis, Requirement specification, Feasibility study, Physical design, System
eeeedevelopment
• A system that gives the list of closest taxi drivers to a passenger is to be developed. Answer questions
25 and 26 with respect to it.
25. Assume that the following is the Level 1 DFD for this system:
Q Taxi driver
Passenger P
R
S
Closest taxi driver
list Make closest taxi
driver list
Which of the following contains the suitable replacements for P, Q, R and S in the above diagram?
(1) P - Location, Q - Driver code, R - Get passenger and driver locations, S - Passenger and driver
eeeelocations
(2) P - Location, Q - Driver code and location, R - Get passenger and driver details, S -Passenger and
ee edriver details
e
(3) P - NIC number, Q - NIC number, R - Get passenger and driver NIC numbers, S - Passenger and
e eedriver NIC numbers
e
(4) P - Passenger code, Q - Driver code, R - Get passenger and driver codes, S - Passenger and driver
eeeecodes
(5) P - Passenger code, Q - Location, R - Get passenger and driver locations, S - Passenger and driver
eeeelocations
26. Above Level-1 DFD was later improved so that a data store (D1) was connected to the process
labelled R. What could be this data store?
(1) NIC data (2) Passenger details (3) Taxi driver details
(4) Travel cost details (5) Weather records
27. Which of the following gives a suitable order of activities to follow when developing a system that
involves a database?
(1) Design the database, Draw the DFD, Draw the ER diagrams, Do the coding, Write the
eeeepseudo-code
(2) Design the database, Write the pseudo-code, Draw the ER diagrams, Draw the DFD, Do the
eeeecoding
(3) Do the coding, Write the pseudo-code, Design the database, Draw the ER diagrams, Draw
eeeethe DFD
(4) Draw the DFD, Draw the ER diagrams, Design the database, Write the pseudo-code, Do
eeeethe coding
(5) Draw the ER diagrams, Do the coding, Write the pseudo-code, Design the database, Draw
eeeethe DFD
28. Which of the following statements is/are correct about acceptance testing?
A - Acceptance testing is done when the user requirements of the software are analysed.
B - An essential activity in acceptance testing is checking through the conditional statements and
eeeeloops in the code.
C - Users may refuse to accept the software after the Acceptance Test.
(1) A only (2) B only
(3) C only (4) A and C only
(5) All A, B and C
31. Which of the following is a (are) good practice(s) to follow in database development?
A - the use of meaningful names for tables and fields
B - letting different tables repeat the same information (other than the primary keys)
C - avoiding a field and its table having the same name (in order to avoid confusion while
eeeewriting queries)
(1) A only (2) B only
(3) C only (4) A and B only
(5) A and C only
• Consider the following Results and Subjects tables to answer questions from 32 to 35:
Results
StudentNo NIC FirstName SubjectID Grade
S1234 986888457V Nilam ENG B
S1447 992562321V Praveen PHY C
S1234 986888457V Nilam ACC A
S1323 900251452V Thilan ENG S
S1323 900251452V Thilan ACC B
Subjects
SubjectID SubjectName
ENG English
PHY Physics
ECO Economics
ACC Accountancy
32. Which of the following is most suited to be selected as the primary key of the Results table
with respect to the given details?
(1) NIC
(2) SubjectID
(3) StudentNo
(4) StudentNo and NIC
(5) StudentNo and SubjectID
33. What is the correct SQL statement to retrieve the values of attributes StudentNo, SubjectName
and Grade?
(1) SELECT Results.StudentNo, Subjects.SubjectName, Results.Grade FROM Results INNER JOIN ON
eeeeResults.SubjectID = Subjects.SubjectID;
(2) SELECT Results.StudentNo, Subjects.SubjectName, Results.Grade FROM Results INNER JOIN
eeeeResults.SubjectID = Subjects. SubjectID;
(3) SELECT Results.StudentNo, Subjects.SubjectName, Results.Grade FROM Results INNER JOIN
eeeeSubjects IN Results.SubjectID = Subjects.SubjectID;
(4) SELECT Results.StudentNo, Subjects.SubjectName, Results.Grade FROM Results INNER JOIN
eeeeSubjects ON Results.SubjectlD = Subjects.SubjectID;
(5) SELECT Results.StudentNo, Subjects.SubjectName, Results.Grade INNER JOIN Results AND
eeeeSubjects Results.SubjectID = Subjects.SubjectID;
34. Which of the following is the correct statement about the Results table?
(1) All the non-key attributes are fully functionally dependent on the primary key.
(2) It has one candidate key.
(3) It is in the First Normal Form (1NF).
(4) It is in the Second Normal Form (2NF).
(5) The cardinality of the table is four.
35. Which dependency is removed when converting the Results table to next normal form?
(1) foreign key dependency
(2) fully functional dependency of non-key attributes on the primary key
(3) multivalued dependency
(4) partial dependencies of non-key attributes on the primary key
(5) transitive dependency of non-key attributes
36. Following are the steps involved in creating an Entity Relationship (ER) Diagram:
I. Determine the .....A..... in your diagram.
II. Add ....B.... to each ....C....
III. Include the ....D.... between the ....A....
IV. Add ....E.... to every relationship.
Which of the following gives suitable choices for the A, B, C, D and E blanks in the above steps?
(1) A - attributes, B - entities, C - attribute, D - cardinality, E - entities
(2) A - attributes, B - cardinality, C - attribute, D - entities, E - entity
(3) A - entities, B - attributes, C - entity, D - relationships, E - cardinality
(4) A - entities, B - relationship, C - entity, D - attributes, E - cardinality
(5) A - relationships, B - cardinality, C - relationship, D - attributes, E - entities
37. Which of the following can be modelled with an Extended Entity Relationship diagram?
A - subclasses of an entity
B - inheritance of attributes
C - specialization of entities
(1) A only (2) B only (3) C only
(4) A and C only (5) All A, B and C
38. A teacher of a programming class draws the following diagram and asks the students to identify
the components indicated by A, B, C, D and E:
Other
object C
codes
• Consider the algorithm expressed by the flowchart and answer questions 39 and 40:
This algorithm takes as input first an integer n (≥1)
Start
followed by a sequence of n integers one by one.
The algorithm is expected to output the count of
integers that are less than 100 among the sequence input n
of n inputs.
count = 0
i=0
input x
Is x < 100 ?
No
Yes
P
........................
39. For the algorithm to function correctly as expected,
what should be inserted at the blank P ? i = i+1
(1) count = count + 1
(2) count = count + i
(3) count = count + x Is i = n ? No
(4) n = n - 1
(5) n = n + 1 Yes
Output count
40. Which of the following Python programs implement
the algorithm in the flowchart?
Stop
I n = int(input())
count = 0
for i in range(n):
x = int(input())
if (x < 100):
count = count + i
print (count)
II n = int(input())
count = 0
for i in range(n):
x = int(input())
if (x < 100):
count += 1
print(count)
III n = int(input())
count = i = 0
while (i < n):
x = int(input())
if (x < 100):
count = count + 1
print(count)
41. What would be the output after executing the following Python code?
n = 117
m = (n & 127) // (2 * * 3)
print(m)
(1) 1 (2) 14 (3) 14.625 (4)15 (5) 19
42. What will be the result when the following Python code is executed?
x = 10
def myfun(a):
global x
a=x+a
x=30
return a
print(myfun(x))
(1) 10 (2) 20 (3) 30 (4) 40 (5) an error
43. What will be the output of the following Python code segment?
S = ["covid", "pandemic", "vaccine", "booster", "virus"]
V = "aeiou"
count = 0
for i in range(len(S)):
for j in range(len(S[i])):
if (S[i][j] in V):
count = count + 1
print(count)
(1) 0 (2) 5 (3) 12 (4) 13 (5) 32
44. What will be the output when the following Python code is executed?
s = 1
for i in range(1,10):
if (i < 5):
s = s * i
elif (i < 8):
s = s - i
else:
s = s + i
break
print(s)
(1) 6 (2) 14 (3) 23 (4) 33 (5) 121
46. Which of the following is the correct example for CSS group selector?
(1) h1{text-align:left ; color:blue;}
(2) h1,h2{text-align:left , color:blue;}
(3) h1.h2{text-align:left; color:blue;}
(4) h1:h2{text-align:left; color:blue;}
(5) h1,h2{text-align:left; color:blue;}
<body>
<h2>Sri Lanka</h2>
<p>Sri Lanka, the island of serendipity, is really a <i>pearl in the
orient</i></p>
</body>
</html>
Which of the following statements is/are correct about the observations when the above code is
viewed through a web browser?
A - The srilanka.jpg image (if existing) will be displayed as the background to the web page.
B - The Sri Lanka word which is enclosed within <h2> and </h2> tags will appear in italics.
C - The pearl in the orient phrase enclosed within <i> and </i> tags will appear in italics.
(1) A only (2) B only (3) C only
(4) A and B only (5) A and C only
48. Which of the following statements is correct about the following code line when it is rendered
through a web browser?
<input type="radio" name="vaccinate" value="Yes">
(1) It shows a radio button with a label named vaccinate at left side.
(2) It shows a radio button with a label named vaccinate at right side.
(3) It shows a radio button with a label named Yes at left side.
(4) It shows a radio button with a label named Yes at right side.
(5) The word Yes is not shown to user.
49. Consider the following PHP code line which is used to create a MySQL database connectivity:
$conn = new mysqli($var1, $var2, $var3, $var4);
Which of the following is the correct representation for the above variables?
(1) $var1 = database, $var2 = server name, $var3 = user name, $var4 = password
(2) $var1 = database, $var2 = user name, $var3 = password, $var4 = server name
(3) $var1 = server name, $var2 = database, $var3 = user name, $var4 = password
(4) $var1 = server name, $var2 = user name, $var3 = password, $var4 = database
(5) $var1 = user name, $var2 = password, $var3 = server name, $var4 = database
50. What would be the output when the following PHP code is executed?
<html>
<body>
<?php
$class = array ("12-A", "12-B", "13-A");
echo "IT classes are " . $class[1]. "and". $class[2] ;
?>
</body>
</html>
(1) IT classes are 12-A and 12-B (2) IT classes are “12-A” and “12-B”
(3) IT classes are 12-B and 13-A (4) IT classes are .12-A. and .12-B
(5) IT classes are .12-B. and .13-B
⁕⁕⁕
AL/2021(2022)/20/E-II #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிமையுமையது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Use additional reading time to go through the question paper, select the questions you will answer and
decide which of them you will prioritise.
(ii) Write the relevant correct code lines to make “A/L Student Section” (in line number 4)
a hyperlink to “A/L ICT” (in line number 7).
Code for Line 4 : .......................................................................................................
Code for Line 7 : .......................................................................................................
..................................................................................................................................
[01 mark]
(i) It is expected to use the above styles in several web pages on a web site. Write
a suitable cascading style sheet to define the styles given in Table 1 to satisfy this
requirement.
..........................................................................................................................
..........................................................................................................................
..........................................................................................................................
[01 mark]
(ii) Write the relevant HTML code lines to include the style sheet defined in part (b) (i)
into a web page. [Assume that the style sheet created in part (b)(i) is saved with
the name neat.]
..........................................................................................................................
..........................................................................................................................
..........................................................................................................................
[01 mark]
Category I
• Team A
• Team C
Category II
Team B
Team D
Registration Form
Select the team: Team A
Your Comments:
Submit
(i) The relevant HTML code (incomplete) is given below. Fill the blanks in it in order
to get the required output.
<html><body>
<h2>Chess Tournament</h2>
<............>
<dt>Category I <..........><li>Team A</li><li>Team C</li></...........></dt>
<dt>Category II<..........>Team B</.........><.........>Team D</.........></dt>
</...........>
<h3>Registration Form</h3>
<form method="get">
<....................>
<label for="Team">Select the team://label>
<............... name="team">
<option value="a">Team A</option>
<option value="b">Team B</option>
<option value="c">Team C</option>
<option value="d">Team D</option>
</...........><br><br>
<label for="comment">Your Comments://label>
<............ name="comment" rows="3" cols="30"></...........><br><br>
<input type=................... name="food">
<label for="fr">Food Required</label>
<input type=................... name="accom">
<label for="ar">Accommodation Required</label><br><br>
<............... type="submit" value="Submit">
</...................>
</form>
</body></html>
[04 marks]
(ii) Write the relevant HTML code line to show “Team B” as the default selection for
eeeeee“Select the team”.
.....................................................................................................................................
.....................................................................................................................................
[01 mark]
[See page four
AL/2021(2022)/20/E-II -4- #ictfromabc
Do not
2. (a) Cloud Computing allows us to obtain computing resources and capabilities as a service. write
The three main types of cloud computing services are: Infrastructure as a Service in this
(laaS), Platform as a Service (PaaS), and Software as a Service (SaaS). column
From those three cloud computing service types, write down the suitable service type for
each of the following scenarios.
(i) To obtain an environment for application deployment and execution from a cloud
service provider - ....................................
(ii) To obtain hard disk space for data storage from a cloud service
provider - ....................................
(iii) To obtain data file sharing, office applications and email services from a cloud
service provider - ....................................
[03 marks]
(b) Fill the blanks in the following statements with suitable words from the given list of
words.
(i) .............................. helps to ensure the confidentiality of our data and information.
(ii) ............................... is the attempt to acquire sensitive information by pretending
as a trustworthy entity in an electronic communication.
(iii) The illegal copying, distribution, or use of software is known as ...............................
and .................................. helps us to protect our software from such illegal use.
List of words: {Encryption, Copyright, Phishing, Plagiarism, Software piracy} [02 marks]
(c) The following extract was taken from a software project feasibility report:
“....The software development team does not have the knowledge or prior
experience of the relevant technology; the developers must be trained first
and as a result of this training cost, the project will not make any profit.
However it is expected that the users of the proposed product will use it
willingly and no user resistance is expected...”
By considering the above extract, write either True, False, or Cannot comment in the
blank for each of the following statements:
The proposed project has technical feasibility. {....................................}
The proposed project has operational feasibility. {....................................}
The proposed project has organizational (institutional) feasibility
{....................................}
[03 marks]
(d) You have decided to start an E-Business to sell your home-made food through an online
store (web site). Once the customers place orders and pay through debit/credit cards,
you will deliver the ordered food to their addresses.
(i) Business to Business (B2B), Business to Consumer (B2C) and Consumer to Consumer
(C2C) are three E-Business transaction types. Out of these, which transaction type
eeewill occur in your E-Business?
.............................................................................................................................
[01 mark]
..
.............................................................................................................................
.. [01 mark]
3. (a) A flowchart is to be drawn for an algorithm to calculate and output the areas of triangles.
The base and height of each triangle are given as inputs.
1
Note: Area of triangle = x base x height 7
2
The algorithm should stop when an input is less than or equal to zero.
Complete the flowchart by writing the required content for the four components left blank.
Start
Yes
No
Stop
[04 marks]
(b) Complete the four (4) blanks (indicated by ......) in the following Python program to
calculate the factorial of an integer.
Note: The factorial of a positive integer is defined as the product of that integer and
all the integers below it. e.g., factorial of 4 is equal to 1 x 2 x 3 x 4 = 24. The
factorial of 0 is defined as 1.
# Get input from user
.....................=int(input("Enter a number:"))
factorial = 1
if num < 0:
print("Factorial is not defined for negative numbers!")
elif ............................................... :
print("The factorial of 0 is 1")
else:
for i in range(1,num + 1):
.............................................
print ("The factorial of ",num,"is",...........................................)
[04 marks]
[See page six
AL/2021(2022)/20/E-II -6- #ictfromabc
Do not
(c) Consider the following Python program: write
in this
lower = 2 column
upper = 5
(a) If a maximum of 20 patients are to be examined by the clinic doctors per an hour, write
down one (1) functional requirement with respect to appointment scheduling.
....................................................................................................................................
....................................................................................................................................
[01 mark]
(b) The hospital expects to avoid a long queue of people being formed at the clinic reception
for the validity check. Write down one (1) non-functional requirement with respect to
that need.
....................................................................................................................................
....................................................................................................................................
[01 mark]
3.0 W
X Prepare
Prescription
data
Patient
prescribed
number
medicine
Write in the spaces provided below, the Number of the suitable content for each of the
labels P to X choosing from the given list.
P - ........ Q - ........ R - ........ S - ........ T - ........
U - ........ V - ........ W - ........ X - ........
List
Number Content
1 APPOINTMENTS
2 Examine patient
3 MEDICINES
4 Patient sitting area display panel
5 Pharmacy
6 Pharmacy display panel
7 PRESENT
8 Validate patient number
9 Validated patient number
[07 marks]
(d) Give one (1) difference between white box testing and black box testing.
....................................................................................................................................
....................................................................................................................................
[01 mark]
⁕⁕
[See page eight
AL/2021(2022)/20/E-II -8- #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிமையுமையது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Part B
⁕ Answer any four questions only.
5. Consider the logic circuit shown in the figure, in which A, B and C are the inputs and X is the
eeeoutput.
A B C
[02 marks]
(a) Show the complete truth table for the given circuit.
(d) Using the Karnaugh map, derive an optimal (most simplified) product-of-sums. (POS) expression
for the output X. Show the loops clearly on the Karnaugh map. [03 marks]
(e) Of the optimal SOP and POS expressions you obtained in (c) and (d) above, which is better
(or more suitable) to implement a simplified logic circuit? Explain your answer. [03 marks]
(b) The ABC company has two main divisions, namely Production and Marketing. Under the
eeeeeeeeeProduction division, there are three units, namely Stores, Supplies and Operations having 10,
eeeeeeeee12 and 18 computers, respectively. Marketing division has 40 computers. ABC company has
eeeeeeeeebeen given the 192.174.19.0/25 IP address block. All the computers of the ABC company are
eeeeeeeeeto be assigned IP addresses after making the subnets from this address block.
The following incomplete table shows the sub-netting. Copy it to your answer’ sheet and fill
the empty entries.
(c) Mohan has ten (10) desktop computers and a router having 2 ports with a 64 Mbps Internet
eeeeeeeeconnection. Each computer has an adequate number of network interface cards. He also has a
eeeeeeeesufficient number of RJ 45 connected twisted pair cables.
Mohan wants to start an Internet Browsing Center with the above equipment and seeks your
advice for it. He informs you that he is not in a position to invest money for any new
equipment.
(i) Which network topology will you suggest for Mohan? [01 mark]
(ii) Draw the logical arrangement of the network that you propose. [02 marks]
(iii) Mohan would like to improve the connection speed to the clients while saving the
existing bandwidth of the Internet connection. Further he needs to have the control
of the Internet access while ensuring the privacy of the client. What is the technical
suggestion you would give for this? [01 mark]
(iv) There is a need to protect this private network by filtering the communication traffic
and blocking outsiders from gaining unauthorized access. What mechanism will you
suggest to achieve this? [01 mark]
(v) Include the solutions that: you proposed for (iii) and (iv) above in the logical network
arrangement that you drew for (ii). [02 marks]
7. (a) PQR Books, a book shop in your area starts an E-Commerce site to expand its business and to
provide services to the customers in other areas. Through it the customers can select their desired
books and stationery products and confirm their orders online.
(i) What is the E-Commerce business type applicable in this scenario? [01 mark]
(ii) What is the revenue model used in this E-Commerce site of PQR Books? [01 mark]
(iii) With the successful implementation of its E-Commerce site, PQR Books decides to offer
digital learning material such as e-books and audio-visual content to its customers. Do you
recommend the same revenue model of (ii) above for this as well? Justify your answer.
[01 mark]
(iv) For an increased customer base and popularity, PQR Books plans to provide free access
to these digital content through its streaming channel.
Suggest a strategy to increase its business revenue with the help of this proposed streaming
channel. [01 mark]
(v) Write down a key challenge this bookshop has to face when implementing this digital
content channel proposed in (iv) above. [01 mark]
(vi) Name a suitable expansion solution for this E-Commerce site to incorporate both related
(e.g., books, stationery etc.) and unrelated (e.g., grocery items, etc.) products or services to
enable a more competitive purchasing experience to its customers.
(b) The following description is about myShopper, a multi-agent system which enables a buyer to
search the entire online marketplace for the best products. In addition to the price, reviews by
other buyers, special offers, reputations of the merchants and the lengths and types of warranties
are also considered.
When a user (buyer) accesses the myShopper website, a chat-bot agent starts interacting with
the user. User can use voice or text as the input medium to give his/her requirements for a
product. During the interaction, the chat-bot passes the extracted information to a search-agent
who will takeover the search for the best product for the user. For this, the search-agent will
start several domain-agents specifying each of them the requirements of the user and specific
domains (web sites) to search in. To speedup the search, each domain-agent will start several
sub-agents to search sub-domains under its main domain. After the search, each sub-agent will
pass the appropriate results back to its parent domain-agent. Once all such results from the sub-
agents are received, each domain-agent compares them and submits the best results to the
search-agent. The search-agent will then compare all such results and gives the details of the
best product back to the chat-bot. The chat-bot will then display it to the user as text.
(i) Draw a simplified agent diagram for the above multi-agent system. Name all the
entities in your diagram and clearly indicate the interactions between them. [06 marks]
(ii) Write one major advantage of this multi-agent system. [01 mark]
(iii) Write down one ICT related challenge which has to be faced when developing a
sub-agent. [02 marks]
(b) Consider the algorithm expressed by the flowchart. L1 and L2 are non-empty lists of integers.
Each of L1 and L2 has unique elements (no duplicates). But there can be elements that are in
both L1 and L2. The notation L[x] denotes the element at Index x of a list L. If there are N
elements in list L, then the indices are from 0, 1, 2, ... to (N-1).
Start
N1 = number of
items in L1
N2 = number of
items in L2
count = 0
il = 0
i2 = 0
No
Is L1[i1] = L2[i2]?
Yes
count = count + 1
i2 = i2 + 1
Yes
Is i2 < N2?
No
i1 = i1 + 1
Yes
Is i1 < N1?
No
Output count
Stop
9. (a) A virtual supermarket has registered suppliers to supply the customer orders placed online.
The supermarket always fulfils its customer orders through these suppliers. One supplier is
responsible only for the customers who live in the supplier’s area. A customer has only one
supplier. Each supplier is characterized by a code (unique), address and contact numbers. A
supplier can have several contact numbers.
Each customer is characterized by an email address (unique), name and location.
A customer can confirm orders. Each order has only one supplier and one customer.
An order is characterized by an order number (unique), description and a value. A supplier can
supply more than one order.
Note: Use only the terms from the list given below for your ER diagrams of parts (i) and (ii).
List: {address, agent, code, confirms, contactNo, customer, description, email, hires, location,
name, order, orderNo, supplier, supplies, value}
(i) Draw the Entity Relationship (ER) diagram for the above description. [07 marks]
(ii) Sometimes suppliers hire agents to support the order supplies. However, the supermarket
identifies the agents only through registered supplier codes. An agent is characterized by
a name and a contact number. Each agent is working only for one supplier and a supplier
is also getting only one agent’s service.
Add these details: to the ER diagram you drew for part (i). [04 marks]
(b) A building construction company signs contracts with its clients. Each contract is handled by
an agent of the company.
The Contracts table contains the details of the contracts. It has contract number, agent’s code,
name and mobile phone number represented with CNo, ACode, AName and AMobile
attributes respectively. The client’s name is represented with Client. Primary key of the
Contracts table is CNo.
Contracts
CNo ACode AName AMobile Client
C-112 EP003 Anura 0714545866 Sirimal
C-103 EP006 Navod 0774511320 Abish
C-116 EP003 Anura 0714545866 Nehara
C-224 EP015 Virah 0763538147 Sirimal
(i) Write an SQL statement to change in the Contracts table, the mobile number of the
agent whose agent code is EP003 to 0772222222. [01 mark]
(ii) In which normal form does the Contracts table exist? [01 mark]
(iii) Convert the Contracts table into next normal form. (It is not necessary to write the
data in derived relations in the next normal form.) [02 marks]
10. (a) (i) Explain one (1) way in which the bar code technology can be beneficial to a library management
system. [02 marks]
(ii) Most modern computers have multiple processors in them. Explain one (1) way in which the
multiple processors in such computers can be beneficial. [02 marks]
(iii) Explain what is meant by volatile memory and write down one (1) example for such selecting
from the list below.
List: {Dynamic RAM (DRAM), Hard disk, L1 cache, Registers} [02 marks]
(b) (i) A student asks you how all applications started by him execute simultaneously although he
has a single-processor computer. Write down your explanation. [03 marks]
(ii) Programs whose sizes are even larger than the size of the available physical memory of a
computer could be executed on it. How can that be possible? [04 marks]
(iii) When linked allocation is used for disk space allocation, each file needs slightly more storage
space than when contiguous allocation is used. Explain the reason for it. [02 marks]
⁕⁕⁕
AL/2022(2023)/20/E-I #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிமையுமையது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka
YS% ;,xld
=j YS% ,xld úNd. fomd¾;fïka
úNd. fomd¾;fïka;=j YS% ,xld
;=júNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Instructions:
⁕ Answer all the questions.
⁕ Write your Index Number in the space provided in the answer sheet.
⁕ Instructions are also given on the back of the answer sheet. Follow those carefully.
⁕ In each of the questions 1 to 50, pick one of the alternatives from (1), (2), (3), (4), (5) which is correct or
most appropriate and mark your response on the answer sheet with a cross (x) in accordance with the
instructions given on the back of the answer sheet.
⁕ Use of calculators is not allowed.
7. The address of an instruction was shown as 10f9 in hexadecimal. What is that address in decimal?
(1) 25 (2) 1249 (3) 4345 (4) 10159 (5) 16249
8. A particular command can be used to output a text file in its binary format.
Assume a file contains the following text:
0 Waste!
Referring the Important notes (i) and (ii) given below, select the correct output that will result when
the said command is run on that file.
(1) 00110000 00100000 01010111 01100001 01110011 01110100 01100101 00001010
(2) 00110000 01010111 01100001 01110011 01110100 01100101 00100001 00001010
(3) 00110000 00100000 01010111 01100001 01110011 01110100 01100101 00100001 00001010
(4) 00110000 00100000 01110111 01100001 01110011 01110100 01100101 00100001 00001010
(5) 00110000 00100000 01010111 01100001 01110011 01110100 01100101 00100000 00001010
Important notes:
(i) The file ends with a LINE FEED character.
(ii) Some selected rows from the 7-bit ASCII table are given below:
What is the correct Karnaugh map for the above truth table?
(1) A
BC
00 01 10 11 (2) BC
00 01 11 10
A
0 0 0 1 1 0 0 0 1 1
1 1 1 0 0 1 1 1 0 0
(3) A
BC
00 10 01 11 (4) A
BC
00 10 11 01
0 0 1 0 1 0 0 1 1 0
1 1 0 1 0 1 1 0 0 1
(5) A
BC
00 11 10 01
0 0 1 1 0
1 1 0 0 1
12. A program in execution in a computer is called a process. Such a process transits between several
states during its lifetime. Which of the following correctly represents a possible state transition
sequence of a process?
(1) New Ready Running Waiting Ready Running Terminated
(2) New Ready Waiting Running Waiting Running Terminated
(3) New Running Ready Waiting Running Ready Terminated
(4) New Running Waiting Ready Waiting Running Terminated
(5) New Waiting Running Ready Running Ready Terminated
14. The block size of a disk is 4KB. A portion of its File Allocation Table (FAT) at a particular time is
shown below. The portion shown indicates the blocks of the average.py file as well.
FAT
200 202
201 200
202 –1
203 201
204 205
Notes: I. The last block of a file is indicated by –l.
II. The directory entry of a file contains the block number of the first block of the file.
Which of the following gives the directory entry for the average.py file and the disk space allocated for
the average.py file respectively?
(1) 200, 12KB (2) 200, 16KB (3) 200, 20KB (4) 203, 16KB (5) 203, 20KB
15. Which of the following are Transport Layer protocols of the TCP/IP stack?
A – Transmission Control Protocol (TCP)
B – User Datagram Protocol (UDP)
C – File Transfer Protocol (FTP)
D – Internet Protocol (IP)
(1) A and B only (2) A and C only (3) B and C only
(4) B and D only (5) All A, B, C and D
16. Which of the following statements is/are correct about MAC and IPv4 addresses?
A – MAC addresses are 32 bits in length and are used in the network layer.
B – MAC addresses. are 48 bits in length and are used in the datalink layer.
C – IPv4 addresses are 32 bits in length and are used in the network layer.
(1) A only (2) B only (3) C only
(4) A and C only (5) B and C only
18. An organization with the assigned IP address block 193.1.1.0/24 needs to define eight subnets. Each
subnet should provide for more than 25 IP addresses. Which of the following correctly lists the
number of bits needed to identify the given network, the total number of bits needed to identify the
subnets, and the number of bits needed to assign unique IP addresses for this requirement,
respectively?
(1) 24, 3,5 (2) 24, 5, 3 (3) 24, 27, 5 (4) 27, 3,5 (5) 27, 30, 2
20. Consider the seven layer OSI reference model and match each of the given layers labeled from P to S
to the corresponding responsibility of it labeled from 1 to 4.
Layer Responsibility
P – Application layer 1 – binary transmission over the communication medium
Q – Physical layer 2 – route determination
R – Transport layer 3 – user services that include file transfer, remote access etc.
S – Network layer 4 – data delivery from process to process
(1) P – 1, Q – 3, R – 2, S – 4 (2) P – 2, Q – 4, R – 3, S – 1
(3) P – 3, Q – 1, R – 2, S – 4 (4) P – 3, Q – 1, R – 4, S – 2
(5) P – 4, Q – 2, R – 1, S – 3
22. Match each of the given data communication protocols labelled from P to T to the corresponding
descriptions labelled from 1 to 5.
Protocol Description
P – Hyper Text Transfer Protocol (HTTP) 1 – provides directory lookup service for given web
aaaaddresses and URLs
Q – Transmission Control Protocol (TCP)
2 – provides a very reliable data transfer service
R – Domain Name System (DNS)
aaaaProtocol 3 – used in the world wide web
S – Internet Protocol (IP) 4 – provides a connection-less transport service
T – User Datagram Protocol (UDP) 5 – handles unique addressing of hosts in the Internet
(1) P – 2, Q – 4, R – 1, S – 5, T – 3
(2) P – 2, Q – 5, R – 4, S – 1, T – 3
(3) P – 3, Q – 2, R – 1, S – 5, T – 4
(4) P – 3, Q – 4, R – 5, S – 1, T – 2
(5) P – 4, Q – 2, R – 3, S – 1, T – 5
23. The following diagrams labelled (A), (B) and (C) illustrate three software deployment types.
Old System
Old System
New System
Old System New System
New System
Which of the following correctly represents (A), (B) and (C) deployment types respectively?
(1) Direct, Phased and Parallel (2) Direct, Pilot and Parallel
(3) Parallel, Phased and Direct (4) Parallel, Pilot and Phased
(5) Phased, Direct and Pilot
24. Consider the information system types in List A and the descriptive examples in List B. Identify the
most suitable matching between the items in lists A and B.
List A List B
A1 - Decision Support System (DSS) B1 - a system that allows to update, create, and
aaaamanage the details in a news website
B2 - a system that handles electronic fund
A2 - Content Management System (CMS) aaaatransfers
B3 - a system that combines data and
A3 - Transaction Processing System (TPS) aaaaanalytical tools for sales forecasting based
aaaaon historical data
25. Which of the following statements is/are correct regarding System Development Life Cycle (SDLC)
models?
A – In the agile model, small portions of systematically developed working software are delivered
aaaato the client frequently.
B – Late changes in the requirements can be easily accomodated in the waterfall model.
C – Prototyping model can be practiced without client interactions.
(1) A only (2) B only (3) C only
(4) A and B only (5) A and C only
26. Non-functional requirements specify quality attributes of a system. Which of the following is an
example for a non-functional requirement?
(1) the email system should allow users to attach files
(2) each page of the website must load within 4 seconds
(3) administrator of the E-commerce website should be able to view a list of customers
(4) a user of the online banking system should be able to view the last transactions
(5) the ATM machine should allow users to print a receipt
27. Which of the following Data Flow Diagrams (DFDs) is correct with respect to the rules of data flow
modelling? (Note: A – an external entity, B – a process, C – a data store)
1.0 1.0
(1) A C (2) A C
B B
1.0 1.0
(3) A C (4) A C
B B
(5) A C
(1)
(2)
(3)
(4)
(5)
• The tables which are partially extracted from a database used in an information system developed for
a shop are shown below. Answer the questions from 30 to 32 using those tables.
Customer Product
CusId Fname Lname Location ProId Name
C001 Saman Perera Dehiwala PR001 Refrigerator
C002 Kalum Gamage Galle PB401 Blender
C003 Shiromi Silva Galle PM025 Mobile Phone
C004 Kalum Perera Kandy PP009 Inkjet Printer
Order Order_Product
OrderId CusId OrderDate SellerId OrderId ProId
A001 C002 2022-07-14 S001 A003 PR001
A002 C003 2022-07-14 S001 A001 PR001
A003 C002 2022-07-18 S002 A002 PB401
A004 C004 2022-07-20 S002 A003 PM025
A004 PP009
30. Which of the following shows the most suitable primary keys for Order and Order_Product
relations?
(1) Order: CusId, Order_ Product: OrderId
(2) Order: OrderId, Order_Product: OrderId
(3) Order: OrderId, Order_Product: OrderId + ProdId
(4) Order: CusId + SellerId, Order Product: ProdId
(5) Order: OrderId + CusId, Order_Product: OrderId
31. What will be the output after executing the following SQL statement?
SELECT Customer.Fname, Customer.Lname, Order.Orderld
FROM Customer INNER JOIN Order ON Customer.CusId = Order.CusId
WHERE Customer.Location="Galle";
33. Which of the following statements is/are correct regarding the normalization concept?
A – In first normal form, atomic attributes are removed from a relation.
B – In second normal form, partial dependency of attributes on the primary key are removed.
C – In third normal form, transitive dependency of attributes are removed.
(1) B only (2) A and B only (3) A and C only
(4) B and C only (5) All A, B and C
34. Which of the following statements is/are correct regarding Entity Relationship (ER) modelling?
A – A weak entity is dependent on another entity.
B – A derived attribute is represented as an attribute in a relation.
C – An entity can contain a multi-value attribute and a composite attribute at the same time.
(1) A only (2) B only (3) A and C only
(4) B and C only (5) All A, B and C
35. The following ER diagram represents a scenario of students borrowing books from a library.
Which of the following gives the most suitable relation list for the given ER diagram?
Is n < 0 ?
36. Which of the following statements is/are correct about
the algorithm expressed by the given flowchart? Yes No
A – An input is taken from the user only once. No r=r+n
B – The output of the algorithm is always 9.
C – The algorithm outputs the summation of all the
aaaanumbers entered. a=a-1
(1) A only
(2) B only
(3) C only Is a >= 0 ?
(4) A and B only
(5) B and C only Yes
Output r
Stop
37. What would be the output of the following Python code if the input was 25?
x = int(input())
x = (x % (x - 21)) **3
print (x)
(1) 0 (2) 1 (3) 3 (4) 12 (5) 25
result=fun(2, 4)
print("Result is " + str(result))
(1) Result is 0 (2) Result is 2 (3) Result is -2
(4) Result is (2, 4) (5) Result is +2
43. Which of the following HTML tags can be used to change the appearance of a word in a text?
(1) <i>, <em>, <li>, <br> (2) <b>, <i>, <em>, <h1>
(3) <b>, <em>, <sup>, <li> (4) <i>, <u>, <br>, <sup>
(5) <u>, <i>, <ol>, <b>
44. What would be the output of the following HTML code segment?
<dl>
<dt> Vegetable </dt>
<dd> Potato </dd>
<dt> Fruit </dt>
<dd> Orange </dd>
</dl>
45. Which of the following statements is/are correct regarding HTML and CSS?
A – CSS can be used to describe how HTML elements are to be displayed on screen.
B – External CSS can be used to define the style for many HTML pages.
C – Inline CSS can be used to apply a style to a single HTML element.
(1) A only (2) A and B only (3) A and C only
(4) B and C only (5) All A, B and C
46. Which of the following HTML code line can be used to create a hyperlink to the website of the
National Institute of Education? (The URL of the website is http://nie.lk)
(1) <a src = http://nie.lk>National Institute of Education</a>
(2) <a href = "http://nie.lk">National Institute of Education</a>
(3) <a img = http://nie.lk>National Institute of Education</a>
(4) <a href = "http://nie.lk"</a>National Institute of Education>
(5) <a src= http://nie.lk</a>National Institute of Education>
48. Given below is a partially completed PHP script used to connect to a database named Employees using
MySQLi (procedural method). Which option is most suitable to fill in the blank spaces A ,
aaaand
B C respectively?
<?php
$servername = "127.0.0.1";
$username = "username";
$password = "password";
$conn = mysqli_connect($servername, $username, $password);
if (!$conn) {
die("Connection failed: " . mysqli connect_error());
}
A
$sql = "CREATE DATABASE ";
if (mysqli_query( B , C ) {
echo "Database created successfully";
} else {
echo "Error creating database: " . mysqli_error($conn);
mysqli_close($conn)
?>
(1) $sql, $conn, $Employees (2) $conn, $sql, Employees
(3) $Employees, $conn, $sql (4) Employees, $conn, $sql
(5) Employees, $sql, $conn
⁕⁕⁕
AL/2022(2023)/20/E-II #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிமையுமையது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Use additional reading time to go through the question paper, select the questions you will answer and
decide which of them you will prioritise.
(b) Rewrite the following HTML code by applying internal CSS with grouping selectors.
<html>
<head> <title>Cascading Style Sheets</title> </head>
<body>
<h1 style="color:blue;text-align:center"> Introduction to Cascading Style Sheets</h1>
<h2 style="color:blue"> CSS can be applied to html documents in three different ways. </h2>
</body>
</html>
<html>
<head>Registration Form</head>
<body>
<h3>Registration for Examination</h3>
<form ……………. ="process.php" …………….="post">
<div> ……………. <input …………….="……………." …………….="name"></div>
<p>
<div>
Select Examination Module: <p>
<input ………..="……..…" ….……="module[]" ….……="ICT"/>….……<br>
<input ………..="….….…" ….……="module[]" …….…="English"/>….……<br>
<input ……..…="……..…" ….……="module[]" ….……="IQ"/>…….…<br>
</div>
<br>
<div>
Prefered Medium:
<input ……..…="……..…" ……..…="language" ……..…="Sinhala" ……..…/>Sinhala
<input ……..…="……..…" ……..…="language" ……..…="Tamil"/>Tamil
<input ……..…="……..…" ……..…="language" ……..…="English"/>English
</div>
<div>
<br>
Select Test Center:
<……..… name="Center">
<……..… ……..…="Colombo" selected>……..…</……..…>
<……..… ……..…="Matara">……..…</……..…>
<……..… ……..…="Jaffna">……..…</……..…>
</……..…>
</div>
<br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$name = $_…….….…….…["…….…….….…"];
$medium = $_…….….…….…["…….…….….…"];
$center = $_…….….…….…["…….…….….…"];
}
echo "<h2> Your Input:</h2>;
echo $…….….…….…; echo "<br>";
echo $…….….…….…; echo "<br>";
echo $…….….…….…; echo "<br>";
?>
2. (a) Fill the blanks in the following statements by selecting the most suitable items from the
aaaaaaagiven list.
A few of your friends who study ICT for A/L at your school decided to improve the school
library by introducing an online library management system. Assuming they know the
requirements, they started system development as the first step and completed a system
which includes a mobile user interface and a database. After completing the system, they
met the school principal and the library staff for a demonstration and possible deployment
of their system. Their completed solution requires a computer at each classroom to access
the library system.
At the meeting they got to know that the library already has a database to keep the records
of books and borrowings, and it is functioning well with a simple user interface.
(i) This team of students could have found out about the existing library system at the
beginning if they did not skip the .................................................
(ii) The school principal refuses to accept this proposed solution due to resource
constraints and the limited benefits compared to the investment. This indicates the
solution developed by students lacks .................................................
(iii) The library staff says that they will accept and use this demonstrated system only if
the existing database is used as a part of the new solution. This indicates the solution
developed by students lacks .................................................
Customer
Customer
Order
1.0
Receive and
accept
customer order Order details
3.0
Q Order P Delivery
details Handle
Note
inventory
2.0 Payment Payment
Copy of payment details receipt
Handle
receipt
payments
Price details Item
details
D2 Sales
Inventory D1 R
4.0 details
Sales
S
details request
Manager
Managerial
report
(i) Write down the most suitable item for P , Q , R and S by selecting from the given list.
List: {Generate reports, Inventory, Copy of payment receipt, Customer, Customer
aaaaaadetails, Item details, Manager, Sales person, Sales}
P – ............................................... Q – ...............................................
R – ............................................... S – ...............................................
(ii) How many processes, external entities and data stores are shown in the above diagram?
No. of Processes : ……………………..
No. of External entities : ……………………..
No. of Data stores : ……………………..
No
Yes
End
.......................................................
(c) What code line(s) in part (b) is/are to be removed to get ‘aeee’ as the output?
.......................................................
.......................................................
.......................................................
[See page seven
AL/2022(2023)/20/E-II -7- #ictfromabc
Do not
(d) Fill in the blank spaces of the following Python code assuming that the purpose of the code write
is to copy the content of a text file (A) to another text file (B). in this
column
A = input("Enter the name of text file A")
B = input("Enter the name of text file B")
f1 = ….…..….…… (A, ….……...……)
f2 = ….…..….…… (B, ………….……)
for line in ….…..….…… :
f2.write (….…..….……)
f1. ….…..….……
f2. ….…..….……
4. (a) Write down the most suitable items from the given list for the following statements.
List: {e-marketplace, group purchasing, online auctions, online reverse auctions}
(i) In …………………………………… , sellers bid for the prices at which they are
willing to sell their goods or services.
(ii) …………………………………… allows buyers to compare multiple online sellers
within the same online platform.
(b) Write the most appropriate word or phrase to answer the following questions based on the
description given below.
Recently introduced National Fuel Pass system in Sri Lanka is an example of how ICT can
be used to overcome national challenges successfully. It is observed that for a given week,
the maximum server hardware resource utilization happens only for a short period (e.g., few
hours) and the rest of the time the system operates at a very low resource demand.
(i) One of the views on resource provision is to purchase computer hardware permanently
considering the maximum demand. What is the main disadvantage with this approach?
...................................................................................................................................
...................................................................................................................................
..
(ii) What is the alternative solution to overcome the disadvantage mentioned in (b)(i)
above, while satisfying the maximum resource demand instances?
...................................................................................................................................
...................................................................................................................................
..
Select the most suitable items to replace the labels P and Q from the following list.
List: {file, functional unit, instruction, memory, page, program counter}
P – ...............................................
Q – ...............................................
(d) (i) Complete the truth table for the given logic circuit.
A B X Y Q
X
A
0 0
Q 0 1
B 1 0
Y
1 1
(ii) What is the basic logic gate that has the above truth table (with inputs A, B and the
output Q)?
.....................................................
(e) The diagram below shows the OSI reference model and its mapping to the TCP/IP model.
Write the correct names of the layers indicated by the labels P, Q, R, S, T and U.
⁕⁕
Part B
⁕ Answer any four questions only.
5. (a) Consider the logic circuit shown in the following figure in which P, Q and R are the inputs and Z is
the output. :
P Q R
(i) Draw the complete truth table for the above circuit.
(ii) Complete the Karnaugh map relevant to the above circuit according to the following format.
PQ
00 01 11 10
0
R
1
(iii) Using the Karnaugh map, derive the most simplified sum-of-products expression for the output
Z. Show the loops clearly on the Karnaugh map.
(b) (i) Using Boolean algebra, show that the Boolean expression 𝐴̅𝐵𝐶 + 𝐴𝐵̅𝐶 + 𝐴𝐵𝐶̅ + 𝐴𝐵𝐶 is
equivalent to BC + AC + AB.
(ii) Draw a logic circuit for the above simplified expression in (b)(i) by only using OR and AND
gates.
(iii) Draw a logic circuit for the above simplified expression in (b)(i) by only using NAND gates.
6. (a) Write down the most suitable terms to replace the blanks labelled P to U in the following paragraph
related to data encryption.
There are two types of encryption techniques used namely, symmetric key encryption and asymmetric
P
key encryption. In ......................................... key encryption, the same key is used for encrypting
and decrypting the information. In this scheme, to exchange information, users must share a
Q
......................................... R
key among themselves. In .............................. key encryption, different
keys are used for encrypting and decrypting the information. In this technique, users usually have a
S
pair of dissimilar keys known as a ...................................... key and .........................................
T
U
key. When one key is used for encryption, the other key can decrypt the .........................................
back to the original plain text.
(b) Suppose that the ABC Company has received the 192.248.154.0/25 IP address block to be
distributed among its four departments.
It is required to subnet the above IP address block to satisfy the following requirements. Assume that
each department is located in a separate building.
(i) Write the first address and the last address in the given address block.
(ii) Write the subnet mask of the given address block in dotted decimal notation.
(iii) How many host bits are needed to create the required number of subnets?
(iv) Once subnetting is done, fill the following table.
(c) (i) Write one difference between User Datagram Protocol (UDP) and Transmission Control
Protocol (TCP) transport layer protocols.
(ii) Write two main functions of a router.
(d) (i) What is the functionality of a Domain Name System (DNS) server?
(ii) What is the functionality of a Dynamic Host Configuration Protocol (DHCP) server?
7. (a) An IoT setup to water a plant in a greenhouse is shown in Figure 1. A mobile application is used to
operate the water-releasing tap. As shown, the setup includes a sensor, a controller, and a
microcontroller (Arduino Board) with a communication module.
Figure 1
(d) A multi-agent system is proposed for this greenhouse (Figure 2). In this system the images that are
captured using a mobile phone are stored in the plant database. The multi-agent system works as
follows:
Plant • Agent 1 handles the user interactions, user
P
Database access to data, and triggers Agent 2.
User
Interaction
• Agent 2 processes the images, identifies
Agent 1 Search Agent Internet anomalies if any, and triggers Search Agent
T if needed.
R
Plant Q • Search Agent searches relevant information
Agent 2 S from the Internet, feeds the search results to
Agent 2 who updates the database after
Figure 2 processing, and notifies Agent 1 if an alert
is to be raised.
(i) In the given scenario, who is/are the self-autonomous agent(s)?
(ii) The interaction P involves saving plant details in the database and retrieving those for Agent 1.
The interaction R involves reading the database and writing search results to the database.
Explain the interactions Q and S.
(iii) After long-term use of the system, it was decided to remove Search Agent assuming that the
database contains all the information needed. Write down the main disadvantage of this
removal.
(e) The owner has started an online shop to sell the harvest from this greenhouse to buyers who are
nearby.
(i) State one advantage of limiting sales to the community nearby the greenhouse.
(ii) State an alternative payment method that can be used until an online payment facility is setup.
(iii) He cultivated tomatoes and sells salted dried tomatoes online (as a snack). This, known as value
addition, gives higher profits. Give another advantage of this value-addition to his e-business.
[See page twelve
AL/2022(2023)/20/E-II -12- #ictfromabc
8. (a) (i) What is the output of the following python script if 1002 is given as the input?
A = int(input("Enter a number:"))
B = 0
while(A > 0):
C = A % 10
B = B + C
A = A // 10 # // is integer division
print(B)
(ii) What would be the modification required to the B = B + C code line of the above code if the
reverse of a given positive number is to be printed?
(Example: if the input is 1234, the output should be 4321)
(b) Assume that your class is having a party, and each student is asked to bring one food item. The class
teacher has decided to make the party interesting by introducing one rule: the first and last letters of
the name of the food item must match with the first and last letters of the student name.
For example, percy is allowed to bring potato curry and prageeth is allowed to bring pepper fish.
Write a Python function called Party() that takes the student name and the name of the food item
as parameters. The function should return True or False to indicate whether the student is allowed
to bring the food item to the party or not.
Example:
Party ("percy", "potato curry") should return True
Party ("fareena", "fried rice") should return False
Note: You can assume that student name and food item name are always lowercase strings and
have at least two letters. There may be hyphens and spaces in the names, but these will not
appear at the beginning or end of the string. The names will not contain numerals.
(c) Write down the most suitable statements for labels A to H in the flowchart given below which is
drawn to calculate the factorial of a given positive Integer.
F
G
E
9. (b) Draw the Entity Relationship (ER) diagram for the following scenario.
A student uses the following data to register for subjects. Each subject is represented by its subject
number (subjectNumber), subject name (subjectName) and prerequisite subject. A student can
register for more than one subject during a semester. Each student has a first name (studentFname),
a last name (studentLname) and a unique student number (studentid). Student, age (age) is required
to register for subjects. Subjects are offered based on the availability of the resources. Hence some
subjects will not be offered during a semester. A subject offered in a semester (subject_offering)
includes subjectNumber, year, semester, teacher identifier (teacherld), and classroom. One
subject_offering is assigned to a single teacher who is represented by a teacherld, name of the teacher
(teacherName), and qualifications. Teacher can have several qualifications. Marks are awarded to
students for each subject that they register.
Use only the terms from the list given below for the entities and attributes in your ER diagram.
You have the freedom to choose relationship names.
List: {age, classroom, DOB, marks, qualification, semester, student, studentFname, studentld,
aaaaaastudentLname, subject, subject_offering, subjectName, subjectNumber, teacher, teacherld,
aaaaaateacherName, year}
Note: DOB – Date of Birth
(b) Use the following Employee, and Assign Project denormalized tables to answer parts (i), (ii), (iii),
(iv) and (v). Please note that primary key(s) of each table is(are) underlined.
Employee
EmployeeId FullName DOB Salary
E001 Saman Perera 12/02/1978 140000
E002 Upul Fernando 23/05/1982 44000
E005 Chris Peris 11/08/1980 44000
E007 Kamala Gamage 08/08/1973 52000
E008 Sunil Perera 25/04/1969 115000
E011 Vipul Namal 09/02/1977 38000
Assign_Project
ProjectId EmployeeId PName Description
P04 E002 Sales Implement sales management system
P04 E008 Sales Implement sales management system
P06 E007 HRM Implement sales HRM system
P07 E002 Library Implement library management system
P09 E001 Inventory Implement Inventory management system
P09 E007 Inventory Implement Inventory management system
(i) Write down the output of the following SQL statement:
SELECT Employee.FullName, Employee.Salary
FROM Employee, Assign_Project
WHERE Assign Project Employeeld = Employee Employeeld;
(ii) Write an SQL statement to display the names of the employees who are assigned to project
aP04.
(iii) In which normal form does the Assign_Project table exist?
(iv) What needs to be done to convert the Assign_Project table into its next normal form? Justify
ayour answer.
(v) Give an example SQL query where the update anomaly can occur in Assign_Project table.
[See page fourteen
AL/2022(2023)/20/E-II -14- #ictfromabc
(b) Assume that the time period the operating system allocates to each process to run on the processor
in a single instance is Q.
Explain why W (the time period the web browser process runs at the second instance) is less than
Q as shown in the graph.
(c) Assume that we have a computer that can use 16-bit virtual addresses from O up to 64 K. Assume
further that this computer has only 32 KB of physical memory and that the page size in this
computer is 4 KB.
The above 16-bit virtual address is made up of the bits of the page number followed by offset bits.
User runs a particular program having a size of 32 KB on this computer. A few selected fields of the
page table of that process at a particular time are shown in the figure below.
Assume that in the above process the virtual address 0001 0000 0000 0011 is wanted. Is that page
available in physical memory? If your answer is ‘yes’, then write down the 15-bit physical address
that the above virtual address will be mapped into. If your answer is ‘no’, then write down the
actions that the operating system will take on behalf of that process for the said requirement.
(d) Give two reasons as to why a page of a process may not be in physical memory.
(e) Explain how the operating system could find the blocks of a file when the files are stored on a hard
disk using
(i) contiguous allocation and
(ii) index allocation.
(Hint: the use of the directory entry)
⁕⁕⁕
AL/2023(2024)/20/E-I #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிமையுமையது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka
YS% ;,xld
=j YS% ,xld úNd. fomd¾;fïka
úNd. fomd¾;fïka;=j YS% ,xld
;=júNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Instructions:
⁕ Answer all the questions.
⁕ Write your Index Number in the space provided in the answer sheet.
⁕ Instructions are also given on the back of the answer sheet. Follow those carefully.
⁕ In each of the questions 1 to 50, pick one of the alternatives from (1), (2), (3), (4), (5) which is correct or
most appropriate and mark your response on the answer sheet with a cross (x) in accordance with the
instructions given on the back of the answer sheet.
⁕ Use of calculators is not allowed.
5. Which of the following will cause the CPU to execute a different set of instructions?
A – a context switch
B – an interrupt
C – user selecting the shutdown option in the computer
(1) A only (2) B only (3) C only
(4) A and B only (5) All A, B and C
9. The address of an instruction was shown as 5A1 in hexadecimal. What is that address in decimal?
(1) 41 (2) 1441 (3) 1457 (4) 2641 (5) 23056
10. A document contains 2048 characters including spaces and line-breaks. How many bits are needed
to encode this document in ASCII also using the parity bits?
(1) 2048 (2) 2048 x 2 (3) 2048 x 7 (4) 2048 x 8 (5) 2048 / 8
11. What is the correct 2’s complement binary representation of decimal –4910 using 8-bits?
(1) 00110001 (2) 01100010 (3) 10011110 (4) 11001111 (5) 11100010
12. Consider the following logic circuit in which X indicates a two-input logic gate.
A
X C
B
Which of the following should X be so that when A = 0 and B = 1, the output C would be 0?
I – a NAND gate
II – a NOR gate
III – an XOR gate
(1) I only (2) I and II only (3) I and III only
(4) II and III only (5) All I, II and III
̅ + Y)?
13. Which of the following is the simplified form of the Boolean expression X(X
(1) X (2) Y (3) XY (4) ̅
XY (5) X + Y
14. A program in execution in a computer is called a process. Which of the following is a possible
state transition sequence of such a process?
(1) New Ready Running Terminated
(2) New Blocked Terminated
(3) New Ready Blocked Running Terminated
(4) New Running Ready Running Terminated
(5) New Blocked Ready Running Terminated
15. Amara powers on the computer and starts a spreadsheet application. Then he also opens a web
browser. Which of the following are possible execution sequences on the processor of his computer?
(1) BIOS OS spreadsheet process OS web browser process OS ...
(2) BIOS spreadsheet process OS web browser process OS spreadsheet
eeeeprocess ...
(3) BIOS spreadsheet process web browser process OS ...
(4) BIOS OS spreadsheet process web browser process OS ...
(5) BIOS OS spreadsheet process web browser process spreadsheet process
eeeeweb browser process ...
18. Which of the following is considered as an erroneously received byte in an even parity system?
(1) 01010101 (2) 10010011 (3) 10110010
(4) 11011001 (5) 11010111
19. Match the Devices labelled from A to E to the corresponding Descriptions labelled from 1 to 5.
Device Description
A. Client 1 – stores network programs and data files for the users to access
B. Hub 2 – a connecting device between Local Area Networks (LAN) and
C. Router Wide Area Networks (WAN)
D. Server 3 – when a message is received, this transmits it only on the port to
which the destination computer is attached
E. Switch
4 – requests services and content from other computers
5 – when a message is received, this broadcasts it on all ports to all
attached hosts
(1) A – 1, B – 5, C – 4, D – 2, E – 3
(2) A – 2, B – 4, C – 3, D – 5, E – 1
(3) A – 3, B – 2, C – 1, D – 4, E – 5
(4) A – 4, B – 5, C – 2, D – 1, E – 3
(5) A – 5, B – 1, C – 2, D – 3, E – 4
20. Select the answer containing the correct replacements for A and B in the following paragraph:
In the Internet, a host is identified by its IP address. In IPv4, each IP address consists of
____________
A bits to identify a host. The newer version named IPv6 consists of ____________
B bits in
an IP address.
(1) A = 32, B = 48 (2) A = 32, B = 128 (3) A = 48, B = 32
(4) A = 48, B = 128 (5) A = 128, B = 32
21. Which of the following statements regarding DNS (Domain Name System) are correct?
A – It maps web addresses to IP addresses and vice versa.
B – HTTP uses the services provided by the DNS.
C – DNS maintains a hierarchy of domain names.
(1) A only (2) A and B only (3) A and C only
(4) B and C only (5) All A, B and C
23. If Suresh wants to send an encrypted message to be read only by Amara using asymmetric key
encryption, then
(1) Suresh should encrypt his message using his public key.
(2) Suresh should encrypt his message using his private key.
(3) Suresh should encrypt his message using Amara’s public key.
(4) Suresh should encrypt his message using Amara’s private key.
(5) Suresh should encrypt his message using both private and public keys of Amara.
24. Choose the option containing most suitable deployment types for the following systems:
A – A new system to replace an existing air traffic control system at an airport
B – A system for the customers of an island-wide supermarket chain to order goods online
C – A system for the public to enter comments regarding the service experienced by them at
eeeean office
(1) A – direct, B – direct, C – parallel
(2) A – direct, B – pilot, C – parallel
(3) A – parallel, B – pilot, C – direct
(4) A – parallel, B – parallel, C – parallel
(5) A – parallel, B – parallel, C – pilot
26. During which of the following is an application tested by its developers in a setting that closely
resembles its intended deployment hardware, software, and network configuration environment?
(1) Acceptance testing (2) Integration testing (3) Parallel testing
(4) System testing (5) Unit testing
27. A company considers developing a new software application for its use. The application is expected
to re-engineer internal processes, improve collaboration, and enhance productivity. However, during
the feasibility analysis, it was identified that the new software may face some resistance from
employees who are accustomed to the existing processes. Which component of the feasibility study
would have helped to get that information?
(1) economic feasibility (2) legal feasibility
(3) operational feasibility (4) schedule feasibility
(5) technical feasibility
28. Select the option which includes most suitable replacements for the labels P to S in the following
Data Flow Diagram of a library management system.
P 1.0
Book Search
Member
Q
R 2.0
lending Book lending D1 BOOKS
information
D2 MEMBERS
S
3.0
Book return
return information
29. Which of the following is incorrect about the waterfall model of software development?
(1) It allows developers to collect and implement requirements throughout the project.
(2) It is not an iterative model.
(3) It is suitable for software with well defined requirements.
(4) It is easy to estimate the resources needed for a project.
(5) No working product is available until the latter stages of the project.
30. In addition to the required features, which of the following should also be considered when
a government institution selects a Commercial Off-The-Shelf (COTS) software to be implemented
island wide?
A – cost to deploy, maintain, upgrade and modify
B – ease of integration with existing systems
C – after sales service from the vendor
(1) A only (2) A and B only (3) A and C only
(4) B and C only (5) All A, B and C
31. Match the given entity attributes labelled from A to D to the corresponding descriptions labelled
from 1 to 4.
Entity attribute Description
A Composite attribute 1 an attribute that cannot be broken down into smaller components
B Simple attribute 2 an attribute that can be broken down into component parts
C Multivalued attribute 3 an attribute whose values can be calculated from related attribute values
D Derived attribute 4 an attribute that may take more than one value
(1) A-2, B-1, C-3, D-4 (2) A-2, B-1, C-4, D-3
(3) A-3, B-4, C-2, D-1 (4) A-4, B-2, C-3, D-1
(5) A-4, B-3, C-1, D-2
What would be the output of the following SQL query when it is applied on the Employee
relation?
SELECT COUNT(*)
FROM Employee
WHERE Salary > ANY (SELECT Salary FROM Emplyoee);
(1) 3 (2) 4 (3) 5 (4) 6 (5) 10
33. Consider the given SQL statements to create two database tables named LENDING and STUDENT:
CREATE TABLE LENDING
(BOOK_NUMBER VARCHAR(10) NOTNULL,
BOOK_NAME VARCHAR(20) NOTNULL,
AUTHOR VARCHAR(25) NOTNULL,
DESCRIPTION VARCHAR(75) NOTNULL,
ISSUED_DATE DATE,
STUDENT_ID CHAR(5) NOTNULL,
PRIMARY KEY(BOOK_NUMBER));
34. When the Employee entity of the following diagram is represented in a database which of the
following should not be included?
(1) Date_of_Birth
(2) Designation
(3) Employee_Name
(4) Employee_Number
(5) Qualifications
35. Which of the listed relations will be obtained if the following ER diagram is correctly mapped
into the relational model?
36. Which of the following gives a correct matching between ER diagram components and the relational
model?
(1) Entity Field, Attribute Table, Unique attribute Primary key, Multivalued attribute
eee Table
(2) Entity Table, Attribute Field, Unique attribute Primary key, Multivalued attribute
eee Table
(3) Entity Table, Attribute Field, Unique attribute Table, Multivalued attribute eeeee
eeePrimary key
(4) Entity Table, Attribute Primary key, Unique attribute Primary key, Multivalued
eeeattribute Table
(5) Entity Table, Attribute Table, Unique attribute Primary key, Multivalued attribute
eee Primary key
38. Which of the following statements are correct with respect to the given relations?
A – All relations are in 3rd normal form.
B – The startDate attribute in the task relation is a derived attribute.
C – adNIC is a candidate key in the adviser relation.
(1) A only (2) A and B only (3) A and C only
(4) B and C only (5) All A, B and C
39. What would be the output of the following Python code, if a = 10, b = 4, and c = 7?
ans = a % b + c // (a-b)
print(ans)
(1) 3 (2) 5 (3) 7 (4) 9 (5) 11
40. What would be the value of the 'result' variable after executing the following Python code?
def func1(a,b):
return a+b
def func2(a,b):
return a*b
result = func1(3,func2(2,4))
(1) 11 (2) 12 (3) 14 (4) 15 (5) 20
41. What would be the output of the following Python code, when it gets executed?
def modify_string(input_string):
input_string += " World"
text = "Hello"
modify_string(text)
print(text)
(1) Hello (2) Hello Hello
(3) Hello World (4) World
(5) World Hello
(5) [ ]
[1, 2, 3, 4, 5, 6]
44. Which of the data structures among Dictionary, List and Tuple in Python could be used to store
a collection of key-value pairs where the keys must be unique?
(1) Dictionary only (2) List only (3) Tuple only
(4) Dictionary and List only (5) List and Tuple only
47. Which of the following statements regarding Search Engine Optimization (SEO) are correct?
A – Meta tags on web pages help SEO.
B – It increases the visibility of a web page in search engines.
C – Powerful computers should be used to create SEO friendly web pages.
(1) A only (2) A and B only (3) A and C only
(4) B and C only (5) All A, B and C
49. Saman’s father is a carpenter. He wants to showcase his father’s work on a website. Which of
the following hosting options should Saman use in order to do it with a price that he can afford?
(1) Hosting it on a server that presents other websites also (shared hosting)
(2) Hosting it on a Virtual Private Server (VPS)
(3) Hosting it on a server dedicated to Saman (dedicated hosting)
(4) Using an e-Commerce website
(5) Using the services of a well known cloud service provider
⁕⁕⁕
AL/2023(2024)/20/E-II #ictfromabc
ishÆ u ysñlï weúßKs / முழுப் பதிப்புரிமையுமையது / All Rights Reserved ]
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
YS% ,xld úNd. fomd¾;fïka;=j
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
இலங்கைப்
Department of Examinations,Sri Lanka Department of Examinations,Sri பரீடகைத்
Lanka Department திகைக்ைளம்
of Examinations,Sri Lanka Department of Examinations,Sri Lanka Department of Examinations,Sri Lanka
YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS% ,xld úNd. fomd¾;fïka;=j YS%S ,xld úNd. fomd¾;fïka;=j
Department of Examinations,Sri Lanka
இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம் இலங்மைப் பரீைமைத் திமைக்ைளம்
Use additional reading time to go through the question paper, select the questions you will answer and
decide which of them you will prioritise.
Note: Consider the following dotted line box as the display area of the browser.
(b) A registration form for a speech competition and its labeled HTML source are given in
Figures 1.1 and 1.2 respectively.
Figure 1.1
<label for="gender">Gender:</label>
<input type=" F " name="gender" id="male" value="male">
<label for="male">Male</label>
<input type=" F " name="gender" id="female" value="female">
<label for="female">Female</label> <br><br>
Figure 1.2
For each of the labels A to N in the HTML code in Figure 1.2, choose a suitable
replacement from the given list. In the answer table, write down the number of the
replacement for each label.
List:
1: action 2: a href 3: caption 4: checkbox 5: district
6: font 7: h1 8: h2 9: h3 10: head
11: img src 12: More details 13: name 14: post 15: radio
16: select 17: submit 18: text 19: th 20: WPE logo
Answer table:
A: B : C : D: E : F: G:
H: I : J : K : L: M: N:
// Section P
$name = $_POST['name']; $gender = $_POST['gender']); $district = $_
POST['district']; $email = $_POST[‘email']; $newsletter = $_POST(['news-
letter'];
// section P end
// Section Q
$sql = "INSERT INTO applicants (name, gender, district, email,
newsletter) VALUES ('$name', '$gender', '$district', '$email',
'$newsletter')";
// section Q end
2. (a) A simple and high-level view of the data lifecycle consists of three steps. Write the 2nd and
eeeeeeethe 3rd steps of the data life cycle.
• 1st step is the creation of data
..............................
• 2nd step is ...................................................................................................
• 3rd step is ...................................................................................................
(b) (i) Modern Artificial Intelligence relies on large amounts of data, which are often
eeeemanaged with cloud-based storage solutions. What is the cloud computing service
eeeemodel used here?
....................................................................................................................................
(ii) Quantum computers, although seen as a promising type of computing machines for
the future, are still expensive to own, operate and maintain. Suggest a technical
approach to make the computing power of the quantum computers accessible to
the public users as per their needs, at an affordable price.
.....................................................................................................................................
.....................................................................................................................................
(c) For the box in each of the following statements, select a suitable replacement from the
given list and write the number of the selected replacement in the box.
eeeeList : {1 - B2B, 2 - C2B, 3 - G2C, 4 - a payment gateway, 5 - a reverse auction,
eeeeeeeeeeee6 - a virtual storefront, 7 - a web portal, 8 - an online auction, 9 - an online
eeeeeeeeeeeemarketplace}
[See page five
AL/2023(2024)/20/E-II -5- #ictfromabc
Do not
(i) A web-based platform that provides a single point of access to arrange of information write
from different sources, is known as . in this
column
(ii) When one requests to renew his/her vehicle revenue license and pays online
for it through the official website, he/she is performing an e-commerce transaction
of type.
(iii) The ABC e-commerce company does not allow buyers to explore competitor products
from other sellers within its website. ABC website operates as .
(iv) In buyers bid for the prices at which they are willing to buy a given product or
service.
(v) An online shopping website is suitable to be connected to .
(d) (i) Your friend thinks the digital divide is a tool used for arithmetic division. Briefly explain
eeeeto your friend what the digital divide is,
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
(ii) E-waste is becoming a major environmental problem in Sri Lanka. Suggest a step
that we can take to reduce the environmental impact of our e-waste.
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
`
3. (a) Write down the most suitable replacements for labels A to G in the following flowchart
eeeeeeeeewhich is drawn to calculate and display the sum of first ten even numbers.
Start
sum = 0
A : ................................................
count = 0
B : ................................................
A B C : ................................................
Is count
even?
D : ................................................
C
E : ................................................
G : ................................................
D
E
End
............................................................
(ii) Write down the output in the above Python code when the condition if i%2==0:
e is changed to if i%2 != 0:
............................................................
(c) Write down the replacements for the labels of the following Python code which has been
written to find the Largest of a set of integers.
e
def findlargest(myList):
largest = A
for i in B :
if i> C
largest = D
print("largest value is", E )
list1=[4,6,24,12,8,94,22]
findlargest ( F )
A – .................................... B – ....................................
C – .................................... D – ....................................
E – .................................... F – ....................................
4. A team in the school IT society has been requested to develop a software to help students
eeereserve computers in the school laboratory. The students are to be given the facility to update
eeetheir information. The administrator should be given the facility to add/remove students
eeeto/from the system.
(a) The following is the data flow diagram (DFD) prepared by the development team for
the above system.
e
R
Results D1 S
P
Student StudentId
2.0
Details
V
D2 T
3.0
Student Details
W Manage
Confirmation Students
P – Q – R – S –
T – U – V – W –
(b) The computers are to be made available for students only for 30-minute slots between
8 am - 5 pm on weekends. However a student is allowed to reserve only a maximum of
two 30-minute slots per weekend.
Write down one functional requirement with respect to computer reservations.
..........................................................................................................................................
..........................................................................................................................................
(c) Give one technical aspect that the development team should check when conducting the
technical feasibility study of this project.
...........................................................................................................................................
...........................................................................................................................................
(d) The waterfall model is suggested for the above development. Why is a proper requirement
analysis critical in this project to ensure its timely completion?
...........................................................................................................................................
...........................................................................................................................................
(e) Three students are to develop the reservation, update student details and manage students
modules separately. The IT teacher had taught different types of software testing. What is
meant by “integration testing” in this system?
...........................................................................................................................................
...........................................................................................................................................
(f) The IT teacher suggests the team doing a direct deployment of this software. Give one reason
as to why the teacher did not suggest a parallel deployment.
...........................................................................................................................................
...........................................................................................................................................
⁕⁕
Part B
⁕ Answer any four questions only.
5. (a) A circuit with three inputs (A, B, C) and one output (Z) is to be designed. The output should be
eeeeeeeequal to 1 when the binary value combination of the three inputs is either 1, 3 or 6. The output
eeeeeeeshould be 0 for other cases.
(i) Draw the complete truth table for the above circuit.
(ii) Complete the Karnaugh map relevant to the above circuit according to the following format:
AB
00 01 11 10
0
C
1
(iii) Using the Karnaugh map, derive the most simplified product-of-sums (POS) expression for
the output Z. Show the loops clearly on the Karnaugh map.
(iv) Draw a logic circuit for the simplified expression derived in (iii) by only using NOR gates
assuming that the complemented inputs 𝐴̅, 𝐵̅ and 𝐶̅ are also available.
(b) Using Boolean Algebra show that 𝐴̅𝐶 + 𝐴̅𝐵 + 𝐴𝐵̅𝐶 + 𝐵𝐶 is equivalent to 𝐶 + 𝐴̅𝐵.
6. (a) Draw a sketch to show how a file server (FS), a printer (P), a switch (S) and two computers
eeeeeeee(C1 and C2) should be connected in a star topology.
(b) A port number is also used along with an IP address in a network communication. Why?
(c) Consider a subnet with the network address 192.168.56.128/26.
(i) Write an example IP address that can be assigned to a host attached to this subnet (in dotted
decimal notation).
(ii) Write the first and the last usable host addresses in this network (in dotted decimal notation).
(iii) How many host addresses are available for use in this subnet?
(d) Suppose an Internet Service Provider owns the 192.168.56.32/26 IP address block. Assume that
the provider wants to create four subnets namely, Subnet A, Subnet B, Subnet C and Subnet
D from this address block with each subnet having the same number of IP addresses.
(i) Write the subnet mask of the above given IP address block in dotted decimal notation.
(ii) Write the number of host bits needed to create the required number of subnets.
(iii) Once subnetting is done, fill in the following table.
Subnet A
Subnet B
Subnet C
Subnet D
7. (a) Assume that you are given an Arduino UNO board (Figure 7.1) along with the following items:
• Passive Infrared Sensor (PIR) for motion detection (Figure 7.2)
• Sensor for ambient light detection
• LEDs, Resistors, and a Power supply
D
Figure 7.2
B
Figure 7.1
(i) Identify the parts marked as A, B, C, and D in Figure 7.1 and briefly explain each of their
functionalities.
(ii) Assume that you want to build an IoT setup that switches an LED light on when motion
is detected. It is further required to switch on this LED only during night time. Draw a
schematic diagram connecting the Arduino board and the items given above as necessary
in order to build this setup.
(b) An e-commerce warehouse automation system includes a set of agent-based robots which move
ordered goods to their respective dispatch areas to start relevant shipments.
The Figure 7.3 shows the latter part of this system. A Quality Control (QC) Officer inspects the
goods of each order as it passes on a conveyor belt and confirms to a software system (Delivery
Handler Agent) that the order has passed QC. The Delivery Handler Agent directs the package to
a mobile robot at the loading area. The robot agent reads the package barcode to determine the
appropriate dispatch area. It then navigates the robot to the relevant dispatch area, scanning the
path and avoiding obstacles while on the move. The Dispatch Handler Agent, another software,
validates each package at the dispatch areas and informs the Dispatch Officer to confirm its decision.
The Dispatch Officer can override Dispatch Handler decisions if needed and directs the confirmed
packages to the postal division.
[See page ten
AL/2023(2024)/20/E-II -10- #ictfromabc
Dispatch
Area 1
Delivery Dispatch
Dispatch
Handler Area 2 Handler
Agent Agent
Dispatch
Dispatch Officer
Area N
Quality Control
Officer Loading
Area
Conveyor Belt Package Moving Floor Area with
Multi Agent Robots
Figure 7.3
(i) Software Agents demonstrate certain characteristics which make their behaviour unique.
Briefly explain the following two characteristics of a software agent:
(a) autonomous
(b) cooperative
(ii) Name a self-autonomous agent and a user agent in the given example.
(iii) If the set of multi-agent robots behave satisfying only the autonomous characteristics but
fails to cooperate, write down one of the most likely observations that will be seen during
their operation.
(iv) If this system is redesigned by replacing the multi-agent behaviour with centralized control
and a broker agent for communication, identify one main change that will be seen with
respect to each of the following.
(a) Control of the robot mobility
(b) Decision making process (relevant to moving packages from loading area to dispatch areas)
(v) Draw a box and arrow diagram for the new solution with centralized control, mentioned in
(iv), above.
(Note: A box and arrow diagram uses boxes to show system components and arrows to show
connections between those components)
8. (a) Write the output of the Python code given in Figure 8.1.
def function1(str):
newstr = ''''
for character in str:z
if character in 'aeiouAEIOU':
newstr += '*'
else:
newstr += character
return newstr
str1 = "LibrAry"
str2 = function1(str1)
print(str2)
Figure 8.1
(b) The function in Figure 8.2 uses the bubblesort algorithm to sort a given list of numbers into
ascending order. Write down the suitable replacements for the labels P-U to complete the code.
def bubbleSort (nList):
for pNumber in range(P,Q,R):
S:
if nList[i]>nList[i+1]:
temp = nList[i]
T
U
Figure 8.2
[See page eleven
AL/2023(2024)/20/E-II -11- #ictfromabc
(c) An estate owner wants a program to determine the minimum currency note combination needed
to make the pay of each employee. (E.g., Rs. 40,000 should be paid using eight notes of Rs.
5000 and not four hundred notes of Rs. 100). The program should also output the currency
requirement for all employees. The program should use the employees.txt file which contains
employee pay details. Each line in it contains an employee's name and net pay.
A Python program written for this purpose is shown in Figure 8.3. A sample employees.txt file
and the program's output for that file are shown in Figure 8.4.
(i) Write down the suitable replacements for the ten labels A-J in the program given in Figure
e8.3.
file = A('employees.txt','r')
Program’s output for that file:
while True:
required = [0,0,0,0,0,0] # notes required for employee Raj Net pay = 40120
Rs. 5000 : 8
line = file. readline() Rs. 1000 : 0
if B line: Rs. 500 : 0
Rs. 100 : 1
C Rs. 50 : 0
Rs. 20 : 1
empDetails = line.split()
netpay = int(float (D)) Niranjala Net pay = 51670
if netpay < 0: Rs. 5000 : 10
continue Rs. 1000 : 1
Rs. 500 : 1
print("\n") Rs. 100 : 1
Rs. 50 : 1
print(empDetails[0],"Net pay =",netpay)
Rs. 20 : 1
topay = netpay
i=0
while topay > 0: TOTAL REQUIREMENT:
Rs. 5000 : 18
required[i] = E Rs. 1000 : 1
totals[i] = totals[i] + F Rs. 500 : 1
Rs. 100 : 2
topay = G Rs. 50 : 1
Rs. 20 : 2
H
# print employee netpay breakdown
for i in range(0, len(required)):
print("Rs.",notes[i],":", I)
J
print("\nTOTAL REQUIREMENT: ")
for i in range(0, len(totals)):
print("Rs.",notes[i],":",totals[i])
(ii) The net pay of employees in this estate, does not contain cents. However, what practical
problem with respect to the net pay inputs exists in this code? What modifications will
you do to fix that problem?
9. (a) Consider the following requirements relevant to a database that is expected to manage divisions,
eeeeeeeeofficers and tasks in an office.
The office consists of a number of divisions. Each division has a unique name. The division
may have several locations. A division handles a number of tasks each of which has a unique
number, a name and a date in which the task was assigned to the division. Each officer's name
(consisting of a first name and a surname), NIC (National Identity Card) number, address and
phone number is to be stored. An officer is assigned to one division but may work on several
tasks which may not be controlled by the same division. Each division is managed by one of
its officers and the starting date in which the officer started managing the division is stored.
Draw an ER diagram for this application showing the entities, attributes and relationships.
Underline primary keys.
(b) Write two advantages of converting a database table into a normal form.
(c) Consider the following Show table related to theatres and the movies that they screen.
Note:
• A theatre can screen more than one movie at the same time on different screens.
• Year field gives the year in which the relevant film was released.
(i) In which normal form does the Show table exist? Justify your answer.
(ii) Convert the Show table to its next normal form.
(i) Write the most suitable SQL statement to create the Employee table with a suitable
primary key.
e
(ii) Write the required SQL statement to insert the record for the following employee:
Emp_ID = E119, Emp_Name = “John”, DoB = “15/06/1971”, Department = “IT”,
e
(iii) Write the output obtained by applying the following SQL query:
eSELECT Emp_ID, Emp_Name
eFROM Employee
eWHERE Salary>103000;
(iv) Write the appropriate SQL query to find the names of all employees who work in the e
“Civil” department.
10. (a) (i) What is the repeating cycle that a processor in a computer is involved in since the computer
eeeeeeeeeeeeeis started till it is shutdown?
(ii) Which program's instructions get executed in the processor of a computer during a context
eswitch?
(iii) A register is a group of binary cells suitable for holding binary information and is constituted
by a collection of flip-flops. How many flip-flops are needed to make an n-bit register?
(b) A user runs the following Python codes on a computer. The code on left prints the lines of a file
on the screen while the other code docs an average computation.
fileReader.py average.py OS
A = input (“Enter filename”) total = 0
f1 = open(A, “r”) for num in range (10000): AP
for line in f1: total += num
print(line) average = total/10000
FP
f1.close() print(average)
Memory
Figure 10.1
The computer’s memory at a particular time is shown in the figure 10.1. The memory frames
occupied by the operating system, the fileReader process and the average process are indicated
on it by OS, FP and AP respectively.
Selecting from OS, AP and FP, write down the most likely place where each of the following is
stored.
(i) content of variable A of the fileReader process
(ii) the Process Control Block (PCB) of the average process
(c) Of the above two python processes, one of them will go through the RUNNING BLOCKED
state transition more than the other. Which process is that? Give the reason for it.
(d) Assume that when the fileReader process of (b) above is in progress a context switch occurs
and a different process is run. When the fileReader process is given the chance to run again, the
file is read from where it stopped. Which data structure facilitates that feature?
(e) A computer uses 32-bit virtual addresses. This computer has a 1 GB (230 bytes) physical memory
and a 4 KB page size.
(i) Write down the number of frames in physical memory as a power of 2.
(ii) Assume that in addition to memory frame information, each page table entry for a
virtual page in this computer contains some additional information consisting of a total of
four bits. If the total size of the page table required for each process on this computer
assuming that all virtual pages are in use is given as 2𝑝 × 𝑞 bits, write down the values
of 𝑝 and 𝑞.
(iii) If the virtual address 4097 of a particular process is mapped to Frame 2 of physical mem-
ory, write down in decimal form, the physical address corresponding to the virtual address
4097. (Assume that page numbers, frame numbers and addresses begin from 0)
(f) The test.py file is stored on blocks 218 and 220 respectively in a disk that uses a File
Allocation Table (FAT) to manage its storage. The disk uses 4 KB blocks.
(i) Write down an important number in the directory entry for the test.py file that will help
the operating system to find the blocks of the file.
(ii) Give an example size for test.py that will result in internal fragmentation.
(iii) Assume that block 219 is also to be added for the test.py file. Show in a diagram the
FAT entries for the test.py file after this addition.
(-1 indicates last block)
⁕⁕⁕