Professional Documents
Culture Documents
Instructions
Instructions
AL/2022/20/E-I
KOg;gjpg;GupikAilaJ / All Rights Reserved ]
Instructions:
Answer all the questions.
Write down 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 (1),(2),(3),(4),(5) which is correct or most
appropriate and mark a cross (X) in accordance with the instructions given on the back of the answer
sheet.
Use of calculators is not allowed.
1. “The data area that is used to store data in order to substitute the difference in operation speeds of various
amounts of data is called the ……………………..”
Which of the following is suitable to fill in the blank?
(1) Cache memory (2) Memory
(3) Virtual memory (4) Memory Management Unit (MMU)
(5) Buffer
[See page 2
AL/2022/20/E-I -2-
5. The fastest storage unit that the Arithmetic Logic Unit of the microprocessor must have is the
…………………………. .
(1) Cache memory (2) Hard disk (3) Control Unit
(4) Magnetic disk (5) Register
10 0 0
Which of the following logic circuit(s) give(s) an equivalent result as Z in the above logic circuit?
I II
B
C A
Z C
A Z
B
III
A
B
Z
C
(1) I only (2) I,II only (3) I,III only (4) II,III only (5) I,II,III all
[See page 3
AL/2022/20/E-I
-3-
10. What is the simplified expression of the Boolean expression 𝐴̅𝐵𝐶 + 𝐴𝐵̅𝐶 + 𝐴𝐵𝐶̅ + 𝐴𝐵𝐶 ?
(1) 𝐴𝐵 + 𝐵̅𝐶 + 𝐴𝐶̅ (2) 𝐴𝐵 + 𝐵𝐶 + 𝐴𝐶 (3) 𝐴𝐵̅ + 𝐵𝐶 + 𝐴𝐶
(4) 𝐴𝐵 + 𝐵̅𝐶̅ + 𝐴𝐶 (5) 𝐴̅𝐵 + 𝐵̅𝐶 + 𝐴̅𝐶̅
11. Which of the following is not an information commonly found in the Process Control Block (PCB) of the
Operating System?
(1) Process number
(2) Capacity of hard disk
(3) Process scheduling state
(4) Program counter
(5) Process state
12. The Operating System uses various techniques for the space allocation of files. Among them,
“……………………………….. creates an index table at the time of file creation.”
Which of the following is suitable to fill in the blank?
(1) Linked allocation
(2) Memory allocation
(3) Contiguous allocation
(4) Indexed allocation
(5) Hard disk allocation
13. The Operating System maintains a page table for each process. Moreover, to identify the entry of a
virtual page the virtual page number is used as the index. Which of the following is not inserted in the
Page table entries?
(1) Frame number
(2) Valid and invalid bit
(3) Page fault
(4) Referenced bit
(5) Modified bit
14. In the OSI reference model, in which layer is the router found?
(1) Physical layer (2) Application layer
(3) Data link layer (4) Network layer
(5) Presentation layer
15. Consider the IP address 192.16.5.133/29 . How many bits are needed to identify the IP addresses and
Host number respectively ?
(1) 29, 3 (2) 28, 3 (3) 30, 2 (4) 28, 4 (5) 29, 4
16. In Computer Networking, Which of the following statements is/are correct in regards to TCP ?
A - Less overhead
B - Secure data transaction
C - Connection oriented
D - Guaranteed delivery
(1) A only (2) B,C only (3) A,B only (4) A,D only (5) B,C,D only
[See page 4
AL/2022/20/E-I -4-
17. Among the media used in data communication and computer networking, which of the following groups
only has unguided media?
(1) Infra Red rays> Fiber optic cable, Radio waves
(2) Coaxial cable, Microwaves, Radio waves
(3) Infra Red rays, Microwaves, Twisted pair cable
(4) Infra Red rays, Microwaves, Radio waves
(5) Twisted pair cable, Fiber optic cable, Coaxial cable
18. The encryption method which uses the same key for encryption and decryption is called as,
(1) Symmetric encryption
(2) Asymmetric encryption
(3) Public key encryption
(4) Special key encryption
(5) Hybrid encryption
• Function modules are developed parallelly at the same time as prototypes, and then by combining them
all together an efficient system is made.
• When the user’s needs are well understood, the system can be created by the development team in a
very short period of time as a “fully functioning software.”
Which of the following Software models satisfies the above given statements?
(1) Waterfall model
(2) RAD model
(3) Spiral model
(4) Object-oriented model
(5) Agile process model
21. Which of the following is/are correct about Commercial Off the Shelf (COTS) Software?
A -They are developed to satisfy the need of particular customers
B - In comparison to customized packages, users can use most of their features
C - They are less costly in comparison to custom packages
(1) A only (2) B only (3) C only (4) A,B only (5) A,B,C all
[See page 5
AL/2022/20/E-I -5-
24. Consider the following statements about Data Flow Diagram (DFD).
A - It represents the process model.
B - The first level DFD is decomposed to obtain the second level diagram
C - In the first level DFD, external entities can be considered as data sources
Which of the above is/ are correct?
(1) A only (2) B only (3) A,B only (4) B,C only (5) A,B,C all
Pharmaceutical companies are producing drugs. Each company’s drugs are uniquely identified by their
commercial name. Each and every pharmacy sells many drugs. Each drug has its own price. One drug can be
sold at various pharmacies at a fixed price. A Pharmaceutical company holds contract with many
pharmacies. At the same time, a pharmacy holds contract with many Pharmaceutical companies.
[See page 6
AL/2022/20/E-I -6-
26. If the price of the drugs differ with each pharmacy, how should price be indicated?
(1) As an attribute of drug
(2) As an attribute of the relationship between pharmacy and drug
(3) As an attribute of the relationship between Pharmacy and pharmaceutical companies
(4) As an attribute of Pharmacy
(5) As an attribute of Pharmaceutical company
27. Consider the following SQL statements. (Consider that all tables and fields are given.)
A - SELECT * FROM Customers WHERE Country IN ('Sri Lanka', 'Australia', 'India');
B - SELECT * FROM Products WHERE Price BETWEEN 50 AND 100;
C - SELECT COUNT(CustomerID), Country FROM Customers GROUP BY Country;
Which of the above is/are syntactically correct?
(1) A only (2) B only (3) C only (4) A,B only (5) A,B,C all
If a customer places more than one order, and an order can only be placed by a maximum of one
customer, which of the following describes the relationships between the entities best?
(1) 1: N (2) M: N (3) 1: 1 (4) 0: M (5) 0: 1
29. Consider the table Inventory (PartNo, Warehouse, Location, Quantity, Weight, Colour)
Weight, Colour are dependednt on PartNo
Quantity is dependent on (PartNo, Warehouse)
Location is dependent on Warehouse
Which of the following statement is correct in relation to the table ?
(1) It is in 0NF (2) It is in 1NF (3) It is in 2NF
(4) It is in 3NF (5) It is in BCNF
[See page 7
AL/2022/20/E-I -7-
① ② ③
35. In the following python program, what is the output when the user inputs 11?
res = 'A'
n =int(input())
if n > 5:
res = 'P'
if n > 8:
res = 'Q'
else:
res = 'R'
if n > 10:
res = 'S'
else:
res='Z'
print(res)
36. What is the output after the python statement print(5 | 2 ^ 3 >> 2) is executed?
(1) 2 (2) 7 (3) 3 (4) 1 (5) 0
Start
i=1
Is No
i <= N ? Stop
Yes
Is No
N mod i =0 ?
Yes
Print i
i=i+1
[See page 9
AL/2022/20/E-I -9-
37. Which of the following statements is/are correct in relation to the above flowchart?
A - When a negative value is given to N, one output will be shown.
B - When N is given a positive whole number value it stops.
C - When N is given the value 6 the output is 1 2 3 6
(1) A only (2) B only (3) C only (4) A,B only (5) A,B,C all
38. Which of the following is/are equivalent to the python program in (37)?
I II III
i=1 i=1 n = int(input())
n = int(input()) n = int(input()) for i in range (N):
while i <= n: while True: if n % i == 0:
if n % i == 0: if n % i == 0: print(i)
print(i) print(i)
i=i+1 i=i+1
if i > N: break
(1) I only (2) II only (3) III only (4) I,II only (5) I,II,III all
39. If 5 is given as the input in the following program, what will be the output?
a = int(input())
n1, n2 = 0, 1
count = 0
while count < a:
print(n1,end=' ')
n = n1 + n2
n1 = n2
n2 = n
count += 1
[See page 10
AL/2022/20/E-I
-10-
41. Which of the following is the HTML code to insert an audio clip in a webpage?
(1) <play controls> <source src=”song.mp3” type=”audio/mp3”> </play>
(2) <audio controls> <source src=”song.mp3” type=”audio/mp3”> </audio>
(3) <video controls> <source src=”song.mp3” sound=”audio/mp3”> </video>
(4) <run controls> <source src=”song.mp3” type=”audio/mp3”> </run>
(5) <sound controls> <source src=”song.mp3” type=”audio/mp3”> </sound>
42. Which of the following is the HTML code to insert an inline frame in a webpage?
(1) <inlineframe href="demo.html" height="200" width="300" title="display"></inlineframe>
(2) <frameset src="demo.html" height="200" width="300" title="display"></frameset>
(3) <frame src="demo.html" height="200" width="300" title="display"></frame>
(4) <iframe src="demo.html" height="200" width="300" title="display"></iframe>
(5) <frames href="demo.html" height="200" width="300" title="display"></frames>
43. Which of the following is the method to use an external stylesheet in CSS?
(1) <link src = "stylesheet" type = "text/css" href = "mainstyle.css">
(2) <link rel = "stylesheet" type = "text/css" href = "mainstyle.css">
(3) <style src = "mainstyle.css">
(4) <stylesheet> mainstyle.css </stylesheet>
(5) <link url = "stylesheet" type = "text/css" href = "mainstyle.css">
[See page 11
AL/2022/20/E-I -11-
45. Which of the following statements is incorrect regarding PHP GET and POST ?
(1) With GET request the data being sent through a form is shown in the URL.
(2) GET requests has limits on the data being sent.
(3) POST requests cannot be cached.
(4) GET requests are stored in the browser history.
(5) POST requests can be bookmarked
❖ This paper comprises of two parts A and B. The For Examiner’s Use Only
Question
time allotted for the two parts is three hours Part Marks
No.
only. Additional Reading time – 10 minutes. 1
❖ Use of calculators is not allowed. 2
A
3
❑ Part A – Structured Essay
4
❖ Answer all the questions on the question paper
5
itself.
6
❖ Write your answers in the space provided for
each question. 7
expected. 10
Total
❑ Part B – Essay Percentage
❖ This part consists of six questions. Answer Final Marks
four questions only. Use the papers supplied In numbers
In words
for this purpose.
Code Numbers
❖ At the end of the time allotted for this paper, tie
Marking Examiner 1
the two papers together so that Part A is on Marking Examiner 2
top of Part B and hand them over to the Checked by
Supervisor. Supervised by
❖ You are permitted to remove only Part B of
the question paper from the Examination Hall.
<……..>
<…….> Violin </……>
<…….> - a string instrument </……>
<…….> Clarinet </…….>
<…….> - a wind instrument </…….>
</…….>
[2 marks]
(ii) Consider the following webpage.
The HTML code for the above webpage is given below. Fill in the blanks with suitable words.
<html>
<head>
<title> Registration </title>
</head>
<body>
<form action="register.php" method="post">
<fieldset>
<legend> Register </legend>
Full Name: <input type="……………………" name="name"/>
<p> Mail Address: <input type="…………………….." name="email"/> </p>
User Name: <input type="……………………." name="uname"/>
<p> Password: <input type="………………………" name="pwd"/> </p>
[see page three
AL/2022/20/E-II -3-
Do not write in
<input type="…………………………" name="Submit" value="Submit"/> this column
Tags CSS
p font → arial
font colour → red
font size → 16px
h1 font colour → red
font size → 16px
div font → arial
font size → 16px
Using the information in the table, write the external style sheet using group selectors only.
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
[2 marks]
(ii) Write the CSS code for the external style sheet ‘register.css’ to join the file ‘myfile.html’.
(Consider that, both the files are found in the same folder).
…………………………………………………………………………………………………
[1 marks]
(c) Consider the following PHP script. Select the suitable words from the given list for the labels
from ① to ④.
<?php
$conn = new ①("localhost”,”root”,”admin”,”myDB”);
if ($conn->②)
{
die("Connection failed: " . $conn->connect_error);
}
$sql = "UPDATE MyGuests SET lastname='Doe' WHERE id=2";
if ($conn->③($sql) === TRUE)
echo "④";
}
else
{
print "Error updating record: " . $conn->error;
}
$conn->close();
?>
Labels Word for the label
Start
Input
Length, Breadth
No
Yes
End
output.
[2 marks]
(ii) If 5 is given as the input in the first line, what would be the output?
………………………………………………………………………………………………………
………………………………………………………………………………………………………
[2 marks]
(c) Segments of a python program to retrieve data entries from a database are given below. They are
not given in the correct execution order. Write the labels of the program lines in execution oreder
in the blanks given below. (write only the labels).
❶ ex = conn.cursor()
❷ res = ex.fetchall()
for i in res:
print(i)
❸ ex.execute("SELECT * FROM employee")
❹ import mysql.connector
conn = mysql.connector.connect(host="localhost", user="root", password="admin",
database="myDB")
1………………………….. 2…………………………..
3………………………….. 4…………………………..
[2 marks]
(a) Select and write the suitable terms for column Y in correspondence to column X, from the list
given below.
Lists: [Technical feasibility, Economic feasibility, Operational feasibility, Cultural feasibility,
Legal feasibility, Scheduling feasibility]
Column X Column Y
(i) Studying whether the facilities needed for (A)
the system development are found. ……………………………………
[2 marks]
(b)
(i) State two advantages of database normalization.
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
[2 marks]
(ii) In a distribution company, a driver can drive any van, a van can be driven by any driver. The
following database table shows the mileage driven by each driver in each van.
Modify the above table to the 3NF state. Mention the primary key for each of the table you have
created. (Write answer in schema format.)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…..…………………………………………………………………………………………………….
[3 marks]
Lists:[Affiliate revenue model> reverse auction > e-marketing> web portal> B2C model>
virtual storefront> brick-and-mortar business> competitive advantage> Subscription
revenue model> Information broker> mobile marketing> Database marketing]
Statements:
(i) An online marketing technique that uses websites, emails, SMS, social media through Mobile
phones, laptops, etc. to reach the target audience to promote products and services.
(ii) Indicates the reasons that allow a company to produce its products and services at a better
quality or lesser cost in comparison to its competitors.
(iii) Generates revenue by receiving regular payments at a certain interval of time from the
customers.
(iv) A specially designed website that brings information from diverse sources, like emails,
online forums and search engines, together in a uniform way.
(v) A process that executes actions such as distribution of products and services, price fixing in a
planned manner to satisfy customer needs in the digitized environment such as the internet
and the World Wide Web.
(vi) A term mostly used to indicate a company which uses retail stores or warehouses for its
commercial activities.
No. Term
(i)
(ii)
(iii)
(iv)
(v)
(vi)
[3 marks]
Job details
4 Proprietor
Materials
required D2 Job
Order supplies and ⑦
do work
③ Materials D3 ⑧
provided Job start date
5 Proprietor Job details
Materials provided
⑨ Prepare invoice for D2 Job
Job estimate+material
work done
Cost of job Amount paid
⑩ D4 ④
Amount paid
Customer D1 Customer
① …………………………………………………………………
② …………………………………………………………………
③ …………………………………………………………………
④ …………………………………………………………………
⑤ …………………………………………………………………
⑥ …………………………………………………………………
⑦ …………………………………………………………………
⑧ …………………………………………………………………
⑨ …………………………………………………………………
⑩ …………………………………………………………………
[5 marks]
(b) Consider the following statements about data communication and computer networks. Select the
most suitable words to fill in the blanks from the list given below.
(ii) …………………….. is a network security device that filters the incoming and outgoing
network traffic based on predetermined security policies in a company.
(iii)…………………….. is a social engineering attack used to steal user data such as login
details and credit card numbers, by identifying itself as a trustable entity.
(iv) …………………. is a malware, it encrypts the data of the victim and demands money as
ransom to return it.
(v) …………………. is a technology that can combine many data siganals to traverse a
medium at the same time.
Lists: [DNS, Phishing, FTP, Ransomware, ALOHA, Ethernet, Firewall, Router, Trojan
horse, NAT, Multiplexing, UDP]
[5 marks]
**
[see page ten
AL/2022/20/E-II -10-
KOg;gjpg;GupikAilaJ / All Rights Reserved ]
Part B
Answer any four questions only
1 0 1 1 0 0 0 1
A medium sized garment factory has LANs for each departments such as Business Information System,
Accounting, Production, and Marketing. The table given below shows the number of machines in each
department.
Departments Number of computers in Number network printers in each
each department. department
Business Information 19 2
System
Accounting 17 1
Production 10 1
Marketing 22 2
The network administrator has been provided with an IP block, 192.146.1.0/24. The network
administrator should assign IP addresses to each node in each department. Four subnets are to be made for
this purpose, moreover, This network is connected to a public IP address to provide the employees with
Internet connectivity. All the departments are situated in different buildings within the same area. A
firewall is implemented to protect the network, furthermore, the network administrator is provided with 4
switches, suffiecient amount of network cables, a proxy server and a DHCP server. The Business
Information System has been directly connected to the Internet.
Draw the logical arrangement of the given situation. Show all the IP addresses, Network devices and
servers clearly.
Production
Marketing
[4+11=15 marks]
(7)
(a) BestFit is a business that sells readymade clothes. At present, the business continues sales through the 25
branches nationwide. The company has realized that by selling their clothes through the Internet that they
can gain many benefits.
(i) What kind of e-business model is BestFit selling readymade clothes via the Internet to the customers?
(ii) State two methods through which customers can make online payments.
(iii) Explain two benefits BestFit can gain transforming to e-business.
(iv) BestFit decides to expand its website to other businesses as well. Other businesses can sell their clothes
through this as well. State two e-revenue models that BestFit can use here.
[see page twelve
AL/2022/20/E-II -12-
(v) In (iv) above, state which e-business model it is that the business activies BestFit uses in through other
companies. [1+2+2+2+1=8 marks]
BestFit is a multi-agent system website. It helps in customers browing and purchasing clothes for them.
A Customer is contacted by a chat-bot when they enter the BestFit website. The Customer can provide
their requirements either through voice or test. During this, the data collected by the chat-bot is sent to an
extraction agent. The extraction agent summarises the extracted data and sends the information to the
Search agent. The search agent uses multiple sub agents to collect results in a quick and efficient
manner. In the end, the results collected by the sub agents are given to the search agent. After, the search
results are given to the customer
(i) Draw a simplified diagram for the above multi-agent system. Label all the entities in your diagram
and indicate the inter-relationships between each of them.
(ii) Name the self-autonomous software agents of this multi-agent system
(iii) State a reason as to why the data provided by the chat-bot was not given to the Search agent
directly.
[4+2+1=7 marks]
(8)
(a) Consider the following scenario.
Vehicle spare parts are manufactured by manufacturers. A manufacturer may produce more than one
spare part. Customers can also issue orders for spare parts. A customer can issue more than one order.
More than one spare part may appear in orders placed by customers and a particular spare part may be
present in more than one order. The order is subject to customer existence.
Each of the following data needs to be stored for this.
Draw the entity-relationship diagram for the given scenario. If any assumptions are used, state them
clearly.
[6 marks]
(b) The following data table shows the details of employees of a company.
Employees
EmployeeNo DepartmentNo EmployeeName Department
1 101 Amith HR
2 102 Divya IT
3 101 Rama HR
(i) Justify with appropriate reasons which normal form the above table is in.
(ii) Convert the table given above to next normal form. Write down the tables in the form of schema.
[2+3=5 marks]
[see page thirteen
AL/2022/20/E-II -13-
Start
Input list L
Input a number S
count = 0, j = 0,
N = Length of the list
No Is
L[j] > S ?
Yes
count = count + 1
j=j+1
Is
Yes
j<N?
No
Output count
End
[see page fourteen
AL/2022/20/E-II -14-
(i) Write the output of the flowchart if the list L consists of the numbers 5, 4, 7, 4, 4, 3, 2, 1, 5, 6 and input S
is 3.
(ii) Explain the purpose of the Flowchart.
(iii) Write down the python program for the logic given by the flowchart.
[2+2+5=9 marks]
(10)
(a)
(i) Briefly explain two reasons of why the system maintenance is needed during the last stage of software
development.
(ii) Briefly explain what user acceptance testing is, and by who it is done.
[2+2=4 marks]
(b) Consider a computer which has virtual addresses of 16-bits from 0 to 64K.The physical memory size of
this computer is 32KB. Assume that the size of a page is 4 KB.
(iii) What is the number of bits of the offset of the virtual memory?
[2+2+2=6 marks]
(c) Write down an advantage and a disadvantage of the contiguous space allocation technique used in an
operating system.
(d) Write down one characteristics of the linked space allocation technique used in an operating system.
[3+2=5 marks]
***
[End