CSC_A_L_P2 _CRM
CSC_A_L_P2 _CRM
A
PAIX – TRAVAIL – PATRIE
…………………..
…………………..
SUBJECT TITLE
CANDIDATE NAME: ………………………………………
COMPUTER SCIENCE
CANDIDATE NUMBER: ……………………………………
CENTRE NUMBER: …………………………………………
Where an imperative programming language is required to write program code, either standard (ISO) Pascal or the
standard (ANSI C) programming language may be used.
Bit no. 15 8 7 0
a) Draw THREE Gantt charts illustrating the execution of these processes using Shortest Job First (SJF), Shortest
remaining time first (SRTF), and RR (quantum = 4) scheduling. (3 Marks)
b) Determine the average turnaround time for each of the scheduling algorithms in part a (6 Marks)
4. i. a) What is a computer network? (1 Mark)
b) Give THREE differences between peer-to-peer networking and client-server networking. (3 Marks)
ii. A company is setting up a computer network to help manage its business. The company sets up a computer that
will act as a server. The server‟s primary role will be to act as an email server. It will also allow technicians to
remotely login so that the server can be managed from other computers.
a) What is a network protocol? (1 Mark)
b) State the names of THREE application layer protocols that the server must implement and explain what each will be
used for. (6 marks)
c) The company‟s network makes use of a number of network devices. Explain the role of the following devices in the
network: Modem and Router (4 Marks)
d) Describe one security measure that can be used to protect the email server from unauthorised access. (2 Marks)
5. i. a) Explain two advantages of relational databases over flat-file databases (4 Marks)
b) Explain the conditions for a database table to be in the third normal form (3NF) (2 Marks)
ii. A company uses a relational database to store employee information and the projects employees work on. The database
design has the following two relations:
EMPLOYEE(Employee_ID, First_Name, Last_Name, DateOfBirth, Hire_Date)
PROJECT(Project_ID, Project_Name, Start_Date, End_Date)
There is a many-to-many relationship between EMPLOYEE and PROJECT.
a) Describe how this relationship is implemented in a relational database. (3 Marks)
b) Explain what is meant by referential integrity, giving an example which refers to the database above. (2 Marks)
c) Write an SQL statement to retrieve the full name and number of projects carried out by the employee for employees with
more than 5 years of service with the company? (4 Marks)
iii.. Differentiate between Data Manipulation Language and Data Definition Language (2 Marks)
6. i. Differentiate between the following pairs of terms, giving an example in each case:
a) Static data structure and Dynamic data structure (2 Marks)
b) Composite data type and Non-composite data type (2 Marks)
ii. A binary search tree is an example of a data structure
a) Insert the following names in a binary search tree in the order they are given: John, Sonia, Agatha, Williams, Ben,
Paul, & Tonia (3 Marks)
b) Explain how you would determine if the name Tonia is in the binary search tree. (2 Marks)
c) State the result of the PreOrder and PostOrder transversals of the above tree (2 Marks)
©2024 /795/CSC /P2/CRM Page 3 of 4 TURN OVER
This document is the property of the CRM and should not be reproduced without the permission of the authors
iii.. Let a and b denote positive integers. Suppose a function Q is defined recursively as follows:
1, 𝑏 = 0
𝑄(𝑎, 𝑏) = 1, 𝑏 = 𝑎
𝑄(𝑎 − 1, 𝑏 − 1) + 𝑄(𝑎 − 1, 𝑏) , 0 < b < a
Note that s.charAt(i) is the character in the ith position of string s. For example, where s is the string “abcde”,
s.charAt(2) is the character „c‟. s.length() returns the number of characters in the string s.
a) What is a subroutine? (1 Mark)
b) With the help of trace tables, dry run the subroutine for the call whatPropertyIsIt("xyzdyx")
and whatPropertyIsIt("racecar"). (4 Marks)
c) Identify the purpose of this algorithm. (2 Marks)
d) Identify the termination conditions for the loop. (2 Marks)
e) Explain the effect of changing the condition in the while loop to i j. (2 Marks)
8. i. Commercial software usually undergoes acceptance testing and integration testing.
a) Distinguish between acceptance testing and integration testing.by stating: who does the testing, when the testing occurs and the
specific purpose of each type of testing (3 Marks)
b) Name two types of maintenance that the software may require and give a reason for each. (4 Marks)
ii.. a) Explain the difference between incremental prototyping and evolutionary prototyping (2 Marks)
b) Explain the waterfall model of software development life cycle. State two of its main limitations (3 Marks)
iii.. Data representing a worker‟s hourly rate of pay is to be entered into a computer software. The minimum rate is 2500 per
hour and the maximum rate is 5500 per hour.
a) Construct an algorithm for a subroutine validate( ) to validate the inputted value. Assume that the value is of the appropriate data
type. The subroutine should return false if the data is invalid and true if the data is valid. (3 Marks)
b) Construct the part of the algorithm required to call the validation check and then ask for the value to be re-entered if it is invalid.
(2 Marks)