0% found this document useful (0 votes)
1K views168 pages

Cape Computer Science: Syllabus Specimen Paper Mark Scheme Subject Reports

Uploaded by

Anish Sankar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views168 pages

Cape Computer Science: Syllabus Specimen Paper Mark Scheme Subject Reports

Uploaded by

Anish Sankar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 168

m p u t e r

o
C ComputernceC
CAPE®

c i e
SScience e
o m
C ence p u t
c
rS puti
C o m SYLLABUS
SPECIMEN PAPER
MARK SCHEME
SUBJECT REPORTS
Macmillan Education Ltd
4 Crinan Street, London, N1 9XW
A division of Springer Nature Limited
Companies and representatives throughout the world

www.macmillan-caribbean.com

ISBN 978-0-230-48244-9 AER

© Caribbean Examinations Council (CXC®) 2021


www.cxc.org
www.cxc-store.com

The author has asserted their right to be identified as the author of this work in accordance with the
Copyright, Design and Patents Act 1988.

First published 2014


This revised edition published June 2021

Permission to copy
The material in this book is copyright. However, the publisher grants permission for copies to be
made without fee. Individuals may make copies for their own use or for use by classes of which they
are in charge; institutions may make copies for use within and by the staff and students of that
institution. For copying in any other circumstances, prior permission in writing must be obtained
from Macmillan Publishers Limited. Under no circumstances may the material in this book be used,
in part or in its entirety, for commercial gain. It must not be sold in any format.

Designed by Macmillan Education Limited


Cover design by Macmillan Education Limited and Red Giraffe
CAPE® Computer Science Free Resources

LIST OF CONTENTS

CAPE® Computer Science Syllabus Extract 3

CAPE® Computer Science Syllabus 4

2022 Specimen Papers:


Unit 1 Paper 01 51
Unit 1 Paper 01 Mark Scheme 60
Unit 1 Paper 02 61
Unit 1 Paper 02 Key and Mark Scheme 78
Unit 1 Paper 032 88
Unit 1 Paper 032 Key and Mark Scheme 97
Unit 2 Paper 01 110
Unit 2 Paper 01 Mark Scheme 120
Unit 2 Paper 02 121
Unit 2 Paper 02 Key and Mark Scheme 137
Unit 2 Paper 032 149
Unit 2 Paper 032 Key and Mark Scheme 158
Computer Science

Computer science is the study of the theoretical foundations of information and


computation and their implementation and application in computer systems. The CAPE
Computer Science Syllabus provides persons with advanced knowledge, skills and
attitudes to enable them to understand the uses and the impact of computer technologies,
and to use the technology to create new computer applications for all areas of human
activity. This syllabus provides opportunity for the acquisition of knowledge, skills and
attitudes as preparation for further studies in Computer Science and the world of work.

This syllabus consists of two Units, each comprising three Modules.

Unit 1: Fundamentals of Computer Science

Module 1 – Computer Architecture and Organisation


Module 2 – Problem-Solving with Computers
Module 3 – Programming

Unit 2: Further Topics in Computer Science

Module 1 – Data Structures


Module 2 – Software Engineering
Module 3 – Operating Systems and Computer Networks
Caribbean Advanced
Proficiency Examination®

SYLLABUS
COMPUTER SCIENCE
CXC A19/U2/21

SYLLABUS
Effective for examinations from May–June 2022

COMPUTER SCIENCE
CXC A19/U2/21
Correspondence related to the syllabus should be addressed to:

The Pro-Registrar
Caribbean Examinations Council
Caenwood Centre
37 Arnold Road, Kingston 5, Jamaica

Telephone Number: + 1 (876) 630-5200


Facsimile Number: + 1 (876) 967-4972
E-mail Address: [email protected]
Website: www.cxc.org

Copyright ©2021 by Caribbean Examinations Council


Prince Road, Pine Plantation Road, St Michael BB11091

CXC A19/U2/21 www.cxc.org


Contents
Introduction.......................................................................................................................... i
RATIONALE…… ..................................................................................................................... 1
AIMS…………….. ..................................................................................................................... 2
SKILLS AND ABILITIES TO BE ASSESSED ..................................................................................... 2
PREREQUISITES OF THE SYLLABUS ........................................................................................... 3
STRUCTURE OF THE SYLLABUS ................................................................................................ 3
APPROACHES TO TEACHING THE SYLLABUS .............................................................................. 4
UNIT 1: FUNDAMENTALS OF COMPUTER SCIENCE ..................................................................... 5
MODULE 1: COMPUTER ARCHITECTURE ........................................................................ 5
MODULE 2: PROBLEM-SOLVING WITH COMPUTERS ....................................................... 8
MODULE 3: PROGRAMMING ......................................................................................11
UNIT 2: FURTHER TOPICS IN COMPUTER SCIENCE .....................................................................14
MODULE 1: DATA STRUCTURES ..................................................................................14
MODULE 2: SOFTWARE ENGINEERING.........................................................................16
MODULE 3: OPERATING SYSTEMS AND COMPUTER NETWORKS ......................................20
OUTLINE OF ASSESSMENT .....................................................................................................24
REGULATIONS FOR PRIVATE CANDIDATES ...............................................................................35
REGULATIONS FOR RESIT CANDIDATES ...................................................................................35
ASSESSMENT GRID ...............................................................................................................36
LOGIC SYMBOLS ..................................................................................................................37
GLOSSARY…………. ................................................................................................................38

CXC A19/U2/21 www.cxc.org


NOTE TO TEACHERS AND LEARNERS

Please note that the syllabus has been revised and amendments are indicated by italics.

First issued in 2003


Revised 2008, 2017, 2018 and 2021

Please check the website www.cxc.org for updates on CXC®’s syllabuses.

Please access relevant curated resources to support teaching and learning of the syllabus at
https://learninghub.cxc.org/

For access to short courses, training opportunities and teacher orientation webinars and workshops
go to our Learning Institute.

PLEASE NOTE

This icon is used throughout the syllabus to represent key features which teachers and
learners may find useful.

CXC A19/U2/21 www.cxc.org


Introduction

T he Caribbean Advanced Proficiency Examination® (CAPE®) is designed to provide certification of


the academic, vocational and technical achievement of students in the Caribbean who, having
completed a minimum of five years of secondary education, wish to further their studies. The
examinations address the skills and knowledge acquired by students under a flexible and articulated
system where subjects are organised in 1-Unit or 2-Unit courses with each Unit containing three
Modules. Subjects examined under CAPE® may be studied concurrently or singly.

The Caribbean Examinations Council offers three types of certification at the CAPE® level. The first is
the award of a certificate showing each CAPE® Unit completed. The second is the CAPE® Diploma,
awarded to candidates who have satisfactorily completed at least six Units, including Caribbean
Studies. The third is the CXC® Associate Degree, awarded for the satisfactory completion of a
prescribed cluster of ten CAPE® Units including Caribbean Studies, Communication Studies and
Integrated Mathematics. Integrated Mathematics is not a requirement for the CXC® Associate Degree
in Mathematics. The complete list of Associate Degrees may be found in the CXC® Associate Degree
Handbook.

For the CAPE® Diploma and the CXC® Associate Degree, candidates must complete the cluster of
required Units within a maximum period of five years. To be eligible for a CXC® Associate Degree, the
educational institution presenting the candidates for the award, must select the Associate Degree of
choice at the time of registration at the sitting (year) the candidates are expected to qualify for the
award. Candidates will not be awarded an Associate Degree for which they were not registered.

CXC A19/U2/21 i www.cxc.org


Computer Science Syllabus

 RATIONALE
Computer Science describes the theory behind all things related to computing. Computing is t he
widespread application of Computer Science, as embodied in the tools and techniques for
gathering, manipulating, analysing and disseminating information. This is made possible because
of dramatic improvements in computer and telecommunications technologies, which have
significantly changed society. A large proportion of business transactions is performed over computer
networks. Multi-media computers have had a significant impact on the way in which people learn and
on the way they seek entertainment. Moreover, the increased integration of computer and
telecommunications technology, exemplified by the Internet and associated technologies, has led to
an increased globalisation of the world economy. Computer Science, including the Internet, has
significantly changed personal communication, commerce, and the way in which academic research
is conducted. Moreover, continuing developments in this field, including the increased use of mobile
networks and the further improvement and decreasing cost of computer hardware, mean that the
world has not seen the last of these changes.

Computer Science has therefore become the axis around which the development of modern economies
and human development and productivity revolve. It is the driving force which will allow nations to
take global leadership or be competitive in both human capital and resources development , and
management. In order for the Caribbean to become an integral part of this new and rapidly changing
world and to take advantage of the economic opportunities it offers, citizens need to be able to
develop new technologies and also use existing computer-based systems to create and maintain those
technologies, by acquiring a sound knowledge of the design of efficient algorithms and the
methodologies to improve upon those systems. This objective can only be obtained through a solid
foundation in Computer Science.

Thus, Caribbean students need to acquire advanced knowledge, skills and attitudes to enable them to
understand the uses and the impact of computer technologies, and to use the technology to create
new computer applications for all areas of human activity.

The syllabus is intended primarily for people who want to pursue a professional career in Computer
Science or related disciplines and provides the opportunity for the acquisition of relevant knowledge,
skills and attitudes as preparation for further studies in Computer Science and the world of work. Thus,
this programme of study encourages the development of communicative, collaborative and creative
skills through the use of authentic, learner-centred teaching and assessment approaches.

The Computer Science syllabus is designed to nurture and foster the attributes of the Ideal Caribbean
Person as articulated by CARICOM. That is, a Caribbean person who demonstrates multiple literacies,
as well as independent and critical thinking, and questions the beliefs and practices of the past and
brings this to bear on the innovative application of science and technology to problem-solving. Such a
person will inevitably demonstrate a high level of self-confidence and self-esteem, a positive work
ethic, and display and nurture creative imagination in the economic and entrepreneurial spheres and
other areas of life. Also, in keeping with the UNESCO Pillars of Learning, this course of study will
contribute to the development of a person who will learn to be, learn to know, learn to do, learn to live
together, and learn to transform oneself and society.

CXC A19/U2/21 1 www.cxc.org


 AIMS
The syllabus aims to:

1. develop creative, collaborative, communicative and critical thinking skills using appropriate
Information and Communication Technologies;

2. develop an understanding of the architecture of computer systems; and the interaction among
its components;

3. develop an understanding of problem solving using computers;

4. develop skills to create algorithms and write programs to solve problems;

5. develop an understanding of the concept of software engineering;

6. provide students with an understanding of abstract data types and their usefulness in
manipulating data;

7. develop an appreciation for the functions of operating systems;

8. develop an understanding of how computer networks can be used to connect devices;

9. equip students with the skills to design a simple computer network;

10. develop an appreciation for files and databases; and,

11. develop an appreciation for ethical and professional issues in computing.

 SKILLS AND ABILITIES TO BE ASSESSED


The skills that students are expected to have developed on completion of this syllabus have been
grouped under three headings:

1. Knowledge and Comprehension;

2. Application and Analysis; and,

3. Synthesis and Evaluation.

Knowledge and Comprehension

The ability to:

- identify, recall, and grasp the meaning of basic facts, concepts and principles;

- select appropriate ideas, match, compare and cite examples of facts, concepts, and principles
in familiar situations; and,

- explain phenomena in terms of generally applicable principles.

CXC A19/U2/21 2 www.cxc.org


Application and Analysis

The ability to:

- use facts, concepts, principles and procedures in unfamiliar situations;

- transform data accurately and appropriately and use common characteristics as a


basis for classification;

- identify and recognise the component parts of a whole and interpret the relationships
between those parts;

- identify causal factors and show how they interact with each other; infer, predict and draw
conclusions; and,

- recognise the limitations and assumptions of data gathered in an attempt to solve a problem.

Synthesis and Evaluation

The ability to:

- make reasoned judgements and recommendations based on the value of ideas and
information and their implications;

- use the computer and computer-based tools to solve problems;

- justify the appropriate application of techniques of problem-solving; and,

- select, justify and apply appropriate techniques and principles to develop data structures and
application programs for the solution of a problem.

 PREREQUISITES OF THE SYLLABUS


Any person with a good grasp of the Caribbean Secondary Education Certificate (CSEC®) Information
Technology or Mathematics syllabuses, or their equivalent, should be able to pursue the course of
study defined by this syllabus. However, successful participation in the course of study will also
depend on the possession of good verbal and written communication skills.

 STRUCTURE OF THE SYLLABUS


This syllabus consists of two Units comprising three Modules each of 50 hours. Although the Units are
independent of each other, together they provide a comprehensive introduction to the field of
Computer Science.

UNIT 1: FUNDAMENTALS OF COMPUTER SCIENCE

Module 1: Computer Architecture


Module 2: Problem-Solving with Computers
Module 3: Programming

CXC A19/U2/21 3 www.cxc.org


UNIT 2: FURTHER TOPICS IN COMPUTER SCIENCE

Module 1: Data Structures


Module 2: Software Engineering
Module 3: Operating Systems and Computer Networks

 APPROACHES TO TEACHING THE SYLLABUS


The specific objectives indicate the scope of the content and the activities that should be covered. The
students should be exposed to accurate and unbiased content and skills that will foster more creative
and prepared citizens capable of effectively participating in a dynamic society. Therefore, the role of
the teacher is to employ a collaborative, authentic, highly practical and learner-centered approach to
facilitate students’ learning.

CXC A19/U2/21 4 www.cxc.org


 UNIT 1: FUNDAMENTALS OF COMPUTER SCIENCE
MODULE 1: COMPUTER ARCHITECTURE

GENERAL OBJECTIVES

On completion of this Module, students should:

1. develop an appreciation of the characteristics and functions of components of the computer


system;

2. understand the interactions between the components of computer-based systems; and,

3. understand how data can be represented in computer systems

SPECIFIC OBJECTIVES CONTENT

Students should be able to:


1. state the purpose of the main Purpose of the main components of a computer
components of a computer system; system:

Hardware Components

Input/output devices: port connectivity; speed;


quality of output;

Specialized devices to include: braille keyboard,


sensors, touch screen, concept keyboard.

Memory types: ROM; RAM; EPROM; EEPROM.

Memory features: speed; size; word size;


volatility.

Storage devices: capacity, access speed, access


method, portability.

Device power protection: surge protectors,


voltage regulators, Uninterruptible Power
Supplies (UPS).

Types of computers: supercomputer, server,


microcomputer (desktop), mobile devices.

2. describe the basic building blocks of Computer Architecture


a computer;
Truth tables (refer to symbols on page 37)

Logic Gates (AND, OR, NOT, NAND, NOR, XOR,


XAND); Flip flops (Data, JK and SR); registers;
counters; adders; multiplexors; encoders,
decoders.

3. interpret the interaction among the Basic Building Blocks:


basic building blocks of a computer; Logic Gates
Data Flip Flops, registers

CXC A19/U2/21 5 www.cxc.org


UNIT 1
MODULE 1: COMPUTER ARCHITECTURE (cont’d)

SPECIFIC OBJECTIVES CONTENT

Students should be able to:

4. explain how data is represented in a Data Representation


computer system; and,
Bits; bytes; fixed (signed magnitude, ones and
twos complement) and floating point (sign,
mantissa and exponent) numbers and character
representation; number bases.

5. describe the main characteristics of Main characteristics of a processor:


a processor.
Central Processing Unit (CPU) components
(Arithmetic Logic Unit [ALU], Control Unit [CU],
Registers), instruction format (addresses per
instruction, fixed length vs variable length), types
(data manipulation control and input/output)
and sets; instruction fetch, decode and execute.

Clock speed, cache memory, Graphics Processing


Unit (GPU), parallel processing, and multi-core
systems.

Suggested Teaching and Learning Activities

To facilitate students’ attainment of the objectives of this Module, teachers are advised to engage
students in the teaching and learning activities listed below.

1. Organize site visits or virtual visits to computer sales companies to allow students to view the
various components of a computer system.

2. Invite computer professionals to talk to students on topics related to the components of a


computer system. This may be facilitated face-to-face or virtually.

3. Divide class into groups and each group asked to conduct research on a topic related to the
components of a computer system. Students should be encouraged to gather current
information from various sources such as the Internet, computer magazines, books and by
interviewing computer professionals. Each group will then be required to present a report to
the class.

4. Organize for students to view interactive videos together with training materials on the
components of a computer system. Engage students in discussions about the functions of the
different components.

5. Provide students with opportunities to lead ‘Let’s Talk Computers’ sessions on assigned topics
related to the components of a computer system.

6. Allow students to open the machine case and interact with the different parts.

CXC A19/U2/21 6 www.cxc.org


UNIT 1
MODULE 1: COMPUTER ARCHITECTURE (cont’d)

7. Allow students to access the device manager in the control panel and interact with the devices
installed on the system.

8. Allow students to visit a computer store; acquire computer parts and engage in the building
and installation of computer software.

RESOURCES

Bradley, R. New Understanding Computer Science for Advanced


Level, London: Oxford University Press, 2014.

Duncan, O’Neil Information Technology and Computer Science for CAPE and
College Students, LMH Publishing Limited, Jamaica, 2017.

Heathcote, P. A Level Computing, Payne- Gallway Publishers Ltd, 2005.

Parsons, J. and Oja, D. Computer Concepts, Albany, New York:


International Thomson Publishing Company, 2004.

Shelly, G., Cashman, T. and Discovering Computers, Boston: Thomson Course Technology,
Vermaat, M. 2014.
Upton, E., Duntemann, J., Learning computer architecture with Raspberry Pi.
Roberts, R., Mamtora, T., & Indianapolis, IN: Wiley, 2016
Everard, B.

Electronic Resources

https://www.oreilly.com/library/view/designing-embedded-hardware/0596007558/ch01.html

https://www.just.edu.jo/~cis99/Computer%20Basics(CH01)/ls01/Ls01.html

http://www.cs.aucegypt.edu/~csci106k/Chapter1-Introduction%20to%20Computer.pdf

https://edu.gcfglobal.org/en/computer-science/

CXC A19/U2/21 7 www.cxc.org


UNIT 1
MODULE 2: PROBLEM-SOLVING WITH COMPUTERS

GENERAL OBJECTIVES

On completion of this Module, students should:

1. understand the problem-solving process;

2. appreciate the role and importance of algorithms in the problem-solving process; and,

3. understand the process of developing algorithms.

SPECIFIC OBJECTIVES CONTENT

Students should be able to:

1. explain concepts related to Explanation of problem-solving, problem,


problem-solving; solution, algorithm, (algorithm as a problem-
solving strategy; its role and importance in the
problem-solving process), and program.

2. apply approaches to problem Problem-Solving Methods: top-down, bottom-up


solving; and step-wise refinement. (Represent solutions
using hierarchy chart).

3. describe the stages in the problem- Stages in the problem-solving process:


solving process;
Problem definition; problem analysis (including
functional and non-functional requirements);
identify and evaluate possible solutions; select
and justify the optimal solutions;
implementation and review.

4. identify the necessary properties Necessary properties of algorithms:


of algorithms that are well
A general solution to the problem, clearly
designed;
defined and unambiguous steps, finite number
of steps, and flow of control from one process to
another.

5. identify ways of representing Ways of representing algorithms:


algorithms;
Inclusion of narrative, flow charts and
pseudocode.

6. explain constructs used in Constructs in structured programming:


structured programming;
Input and output statements.
Control Structures:
Sequencing; selection; iteration or repetition
(bounded, for example, fixed number of
iterations and unbounded, for example, sentinel
control).
Assignment statement.

CXC A19/U2/21 8 www.cxc.org


UNIT 1
MODULE 2: PROBLEM-SOLVING WITH COMPUTERS (cont’d)

SPECIFIC OBJECTIVES CONTENT

Students should be able to:

7. interpret algorithms from case Determination of output and correctness of


problems; a given algorithm (the algorithm may be
expressed in narrative, flow charts or
pseudocode).

8. analyse algorithms from case Determination of whether an algorithm achieves


problems for correctness; its stated objective and if not, provision of the
correct algorithm. Use test plan and trace tables
to test for correctness.

9. develop algorithms from case A general solution to the case, clearly defined
problems; and, and unambiguous steps, finite number of steps,
and flow of control from one process to another.

10. explain the need for developing the Algorithms as logically sequenced instructions.
logic of a computer program.

Suggested Teaching and Learning Activities

To facilitate students’ attainment of the objectives of this Module, teachers are advised to engage
students in the teaching and learning activities listed below.

1. Engage students in a group discussion leading to the definition of a problem. The activity
should be geared to the students communicating their perspective of a problem. The teacher
should then give feedback on those perspectives by identifying problems in different
scenarios.

2. Give a set of scenarios (including videos) in which there are either opportunities or problems
encountered by an entity such as an organisation or a school. In groups, students are required
to (a) identify a problem, (b) formulate a problem statement, (c) suggest two possible
solutions, and (d) recommend one of the solutions and justify the choice.

3. Engage students in activities that require them work in groups to use algorithms to solve
simple tasks, for example, to compute the sum of a set of numbers.

4. Have students work in groups to engage in activities that require them to use different
program constructs in developing algorithms.

CXC A19/U2/21 9 www.cxc.org


UNIT 1
MODULE 2: PROBLEM-SOLVING WITH COMPUTERS (cont’d)

RESOURCES

Bradley, R. New Understanding Computer Science for Advanced


Level, London: Oxford University Press, 2014.

Duncan, O’Neil Information Technology and Computer Science for CAPE and
College Students, LMH Publishing Limited, Jamaica, 2017

Heathcote, P. A Level Computing, Payne- Gallway Publishers Ltd, 2005.

Kendall, K. and Kendall, J. Systems Analysis and Design, New Jersey: Prentice Hall, 2007.

Parsons, J. and Oja, D. Computer Concepts, Albany, New York: International


Thomson Publishing Company, 2004.

Shelly, G., Cashman, T. and Discovering Computers, Boston: Thomson Course Technology,
Vermaat, M. 2014.

Electronic Resources

http://www.cs.aucegypt.edu/~csci106k/Chapter1-Introduction%20to%20Computer.pdf

https://edu.gcfglobal.org/en/computer-science/

http://www.cs.aucegypt.edu/~csci106k/Chapter1-Introduction%20to%20Computer.pdf

CXC A19/U2/21 10 www.cxc.org


UNIT 1
MODULE 3: PROGRAMMING

GENERAL OBJECTIVES

On completion of this Module, students should:

1. appreciate the need for different programming languages and program translation; and,

2. develop the ability to implement solutions to problems using a programming language.

CANDIDATES WILL BE ASSESSED IN PROCEDURAL ‘C’ ONLY.

SPECIFIC OBJECTIVES CONTENT

Students should be able to:

1. identify the characteristics of Characteristics of the following programming


different programming paradigms; paradigms: Procedural or Imperative, Object-
oriented, Functional and Declarative.

2. explain how assemblers, compilers, Stages in the translation process: lexical analysis;
virtual machines and interpreters syntax analysis; semantic analysis; intermediate
are involved in the execution of code generation; code optimization; code
High-level programming languages; generation.

Role of preprocessors; linkers.

3. assign values to declared variables; Declare variables using appropriate names and
data types (int, float, double, char and enum).

4. use input and output statements; Input data into variables; output formatted data
from variables; print headings.

5. use conditional and iterative control Conditional; if, case statements; Iterative; for,
constructs; while statements.

6. use arrays in programs; Read data into arrays, output data from
arrays, manipulate or modify data in arrays.
(including merging and splitting arrays),
Character arrays (strings).

7. apply the techniques of structured Write simple functions; programs should be


decomposition to reorganise a clear, orthogonal (small blocks of code) and
program into smaller pieces; simple.

8. implement algorithms to solve a Write, test and debug programs; syntax and
given problem; semantic errors; use of range tests and desk
checks; code debugging strategies (trace tables,
use of ‘watches’ to examine the values of
variables).

CXC A19/U2/21 11 www.cxc.org


UNIT 1
MODULE 3: PROGRAMMING (cont’d)

SPECIFIC OBJECTIVES CONTENT

Students should be able to:

9. use records as a means of The concept of ‘struct’ in C.


grouping related information;

10. use text files to store data and File operations: open, close, read, write, append.
records;

11. develop good programming style Style: white space (proper spacing), indentation,
and documentation; appropriate comments.

Documentation: technical and user.

12. explain the need for different Appropriateness to application (web application,
programming languages; and, games, formula translation, application for
mobile devices).

13. compare how basic concepts are Variable declarations and control structures in
implemented in different the following languages:
programming languages. C, C++, Java, JavaScript, and Python.

Suggested Teaching and Learning Activities

To facilitate students’ attainment of the objectives of this Module, teachers are advised to engage
students in the teaching and learning activities listed below.

1. Engage students in activity where they are required to critique previously written programs
focusing, for example, on the use of structure, constructs, comments, indentation, variable
names and error handling.

2. Have the class work in groups to conduct research on a topic related to the implementation
of different data structures with respect to performance. Each group will then be required to
creatively present a report to the class.

3. Have students collaborate to develop test cases to illustrate the importance of testing.

4. In small groups have students research different languages, paradigms and translators and
examine the weaknesses and strengths of each language, paradigm and translator. They will
share their findings with the class.

5. Have students work in groups to engage in activities that require them to create simple
programs using different approaches.

6. Organize different opportunities for groups of students to participate in coding competitions,


for example, Hour of Code (code.org).

7. Organize a coding boot camp and have experts facilitate sessions with the students.

CXC A19/U2/21 12 www.cxc.org


UNIT 1
MODULE 3: PROGRAMMING (cont’d)

RESOURCE

Deitel, Paul., and Deitel, Harvey. C How to Program, 8th edition, Pearson, 2016.

Duncan, O’Neil Information Technology and Computer Science for CAPE and
College Students, LMH Publishing Limited, Jamaica, 2017

Shelly, G., Cashman, T. and Discovering Computers. Boston: Thomson Course Technology,
Vermaat, M. 2014.

Electronic Resources

https://edu.gcfglobal.org/en/computer-science/

http://www.cs.aucegypt.edu/~csci106k/Chapter1-Introduction%20to%20Computer.pdf

CXC A19/U2/21 13 www.cxc.org


 UNIT 2: FURTHER TOPICS IN COMPUTER SCIENCE
MODULE 1: DATA STRUCTURES

GENERAL OBJECTIVES

On completion of this Module, students should:

1. appreciate the use of abstract data types (ADTs) in the efficient manipulation of data;

2. know programming strategies in order to solve problems; and,

3. understand basic algorithms for sorting and searching.

SPECIFIC OBJECTIVES CONTENT

Students should be able to:

1. describe the concept of abstract The fundamental characteristics of ADTs:


data types (ADTs); Initialize elements of the data structure, add an
element, remove an element and find an
element.

Data type: primitive and non-primitive; Data


structures: linear and non-linear.

To include: Stacks, Queues, Circular Queues and


Singly linked lists.

2. distinguish among ADTs; Stacks (LIFO), queues (FIFO) - inclusive of


Circular queues, singly linked list (INSERT and
DELETE): definition, structure and operation.

3. perform basic operations on Stacks: Push, Pop, Empty, Full.


standard ADTs using diagrams and
algorithms; Queues, Circular queues: Enqueue,
Dequeue, Empty, Full.

4. implement basic ADTs using one- Write programs to implement Stacks,


dimensional arrays; Queues, and Circular queues.

5. implement sorting and searching Linear search; binary search; simple selection
algorithms using one-dimensional sort; bubble sort.
arrays.

CXC A19/U2/21 14 www.cxc.org


UNIT 2
MODULE 1: DATA STRUCTURES (cont’d)

Suggested Teaching and Learning Activities

To facilitate students’ attainment of the objectives of this Module, teachers are advised to engage
students in the teaching and learning activities listed below.

1. Have students work in pairs to review scenarios that illustrate the application of Abstract Data
Types.

2. Make reference to real-life situations that demonstrate ADTs in action; for example, adding
and removing plates from a stack of plates; customers in a queue (line) in a bank.

3. Have students write programs to implement stack, Queues and Circular queues and present
their programs to the class.

RESOURCES

Duncan, O’Neil Information Technology and Computer Science for CAPE


and College Students, LMH Publishing Limited, Jamaica,
2017

Heathcote, P. A Level Computing. Payne-Gallway Publishers Ltd,


2005.

Kendall, K. and Kendall, J. Systems Analysis and Design. Pearson Education


Limited, 2013.

Shelly, G., Cashman, T. and Discovering Computers. Boston: Thomson Course


Vermaat, M. Technology, 2014.

Sommerville, I. Software Engineering. Pearson Education Limited, 2016.

Electronic Resources

https://www.javatpoint.com/data-structure-introduction

https://towardsdatascience.com/8-common-data-structures-every-programmer-must-know-
171acf6a1a42

http://www.cs.aucegypt.edu/~csci106k/Chapter1-Introduction%20to%20Computer.pdf

CXC A19/U2/21 15 www.cxc.org


UNIT 2
MODULE 2: SOFTWARE ENGINEERING

GENERAL OBJECTIVES

On completion of this Module, students should:

1. understand the phases of the software development life cycle;

2. have an appreciation for the methods, processes, tools and techniques used in s oftware
engineering; and,

3. Understand the issues confronting modern computer systems, societies and users.

SPECIFIC OBJECTIVES CONTENT

Students should be able to:

1. explain the reasons for a structured Reasons for a structured approach to the
approach to the software software development process:
development process;
Increased dependence of many organisations on
their computer systems.

Crises in previous developments: for example,


increasing costs of software development;
dissatisfaction of users and management with
the quality and suitability of software; increasing
length and complexity of the software.

Requirements for standard interfaces, both to


users and to other software.

Need for tighter control and management of


process; visibility of the process; risk
management.

Importance of the need for the involvement of


end users and management.

2. explain the attributes of a well- Attributes of a well-engineered software:


engineered software product; maintainability; dependability; efficiency;
usability; portability; availability of appropriate
documentation (system and user
documentation).

3. examine the strengths and Phases of the Software Development Life Cycle.
weaknesses of different generic
software process models; Life Cycle Models: waterfall; evolutionary
development including rapid prototyping; reuse-
oriented; agile.

Strengths and weaknesses of different generic


software process models.

CXC A19/U2/21 16 www.cxc.org


UNIT 2
MODULE 2: SOFTWARE ENGINEERING (cont’d)

SPECIFIC OBJECTIVES CONTENT

Students should be able to:

4. outline the main activities, tools, Requirements and Specification Process:


techniques and deliverables of the feasibility study; requirements analysis.
analysis phase;
Tools and Techniques: Interviews,
questionnaires, observations, review internal
documents, prototyping, Data Flow Models
(Data Flow Diagrams) and their use to document
the flow of information: use of symbols to depict
data stores, process, data flows and external
entities; Data Dictionaries.

Computer Aided Software Engineering (CASE)


tools.

Deliverables: requirements specification


(feasibility report, functional and non-functional
specification).

5. apply relevant tools and techniques Design process: architectural design; interface
to create the deliverables of the design; data structure design; algorithm design.
design phase;
Tools and techniques: Structure charts, CASE
tools, Semantic Data Models (Entity-
Relationship Diagrams)

Design Methods: top-down, bottom-up, system


structuring (sub-systems, modules, programs);
Design Strategies: functional versus objected-
oriented.

Guidelines for screens, reports, user interfaces.


Deliverables: system architecture, design
specification.

6. outline the main activities, tools, Coding process.


techniques and deliverables of the
implementation phase;

7. outline the main activities, tools, Need for the testing process, test plans; software
techniques and deliverables of the inspection; software testing (unit inspection, test
validation phase; case design, and system testing); user testing
(alpha, beta, and acceptance); Blackbox and
Whitebox testing.

CXC A19/U2/21 17 www.cxc.org


UNIT 2
MODULE 2: SOFTWARE ENGINEERING (cont’d)

SPECIFIC OBJECTIVES CONTENT

Students should be able to:

8. outline the main activities, tools, Need for maintenance; Fault repairs,
techniques and deliverables of the environmental adaptation, Functionality
evolution phase; and, addition.
Types of maintenance.
Documentation review.
Regression Testing.

9. examine issues confronting modern Intellectual Property (types of software license:


computer systems, societies and Shareware and Freeware; piracy), privacy,
users. Data Protection.
Computer Misuse.
Threats (viruses, worms, distributed denial of
service attacks, malware, ransomware, hacking)
and countermeasures.

Suggested Teaching and Learning Activities

To facilitate students’ attainment of the objectives of this Module, teachers are advised to engage
students in the teaching and learning activities listed below.

1. Identify organisations that use custom-built software applications. Students should be divided
into groups and asked to interview both users and management of these organisations to
determine the following:

(a) methodology (Life Cycle model used);

(b) problems encountered during the development of the application(s);

(c) level of user involvement;

(d) lessons learned;

(e) what steps could have been done differently and why; and,

(f) other relevant considerations.

Students can creatively present their findings to the class.

CXC A19/U2/21 18 www.cxc.org


UNIT 2
MODULE 2: SOFTWARE ENGINEERING (cont’d)

2. Divide students into groups to research various Life Cycle models, tools and techniques used
during the analysis and design phases. Students should report on their findings, including the
strengths and weaknesses of models, tools and techniques.

3. Invite professionals involved in developing software to make presentations (virtual or face-to-


face) to students to give them additional perspectives on issues relevant to the topics. The
professionals should be encouraged to bring/ show samples of deliverables.

4. Identify a ‘problem’ and engage groups of students in developing a simple system which could
solve the problem.

5. Present ‘poorly-designed’ screen layouts, data structures, reports and user interfaces and ask
students to critique them, for example, focusing on the appropriate use of font type and size;
colours, spacing, labelling or instructions, ease of use.

6. Have students engage in research on ethics surrounding the use of computers including data
privacy, protection of intellectual property, crediting and validating the sources of data.
Students should use suitable computer based or web based tools to creatively present the
information to the class.

7. Have students participate in a presentation exploring professional issues in computing and


strategies for mitigating these issues. They should then collaborate to engage in additional
research and use a suitable tool to document and share problems/professional issues and
suitable strategies for addressing them.

RESOURCES

Bradley, R. New Understanding Computer Science for Advanced


Level. London: Oxford University Press, 2014.

Duncan, O’Neil Information Technology and Computer Science for CAPE and
College Students, LMH Publishing Limited, Jamaica, 2017.

Heathcote, P. A Level Computing. Payne-Gallway Publishers Ltd, 2005.

Parsons, J. and Oja, D. Computer Concepts. Albany, New York: International


Thomson Publishing Company, 2004.

Shelly, G., Cashman, T. and Discovering Computers. Boston: Thomson Course Technology,
Vermaat, M. 2014.

Sommerville, I. Software Engineering, Pearson Education Limited, 2016.

Electronic Resources

https://www.tutorialspoint.com/software_engineering/software_engineering_overview.htm

http://www.cs.aucegypt.edu/~csci106k/Chapter1-Introduction%20to%20Computer.pdf

https://edu.gcfglobal.org/en/computerbasics/understanding-operating-systems/1/

CXC A19/U2/21 19 www.cxc.org


UNIT 2
MODULE 3: OPERATING SYSTEMS AND COMPUTER NETWORKS

GENERAL OBJECTIVES

On completion of this Module, students should:

1. understand the functions of operating systems;

2. develop an appreciation for networking technology and applications; and,

3. understand the use of data stores and networks in the implementation of systems with a
wide user base.

SPECIFIC OBJECTIVES CONTENT

Students should be able to:

1. explain the concept of an operating Definition.


system;
Purpose of operating systems:

Resource management – memory, I/O,


processor; interface.

2. describe how operating systems History of operating system development.


have evolved over time from Batch processing.
primitive batch systems to Real time systems.
sophisticated multi-user systems; Multi programming (including interactive multi-
programming).
Multi-processing.

3. describe the functions of operating Operating system functions:


systems;
Bootstrap process.

Process Management:

Definition.

Process states: Running, Ready, Blocked.

How the interrupt mechanism works.

Deadlock and Deadlock resolution.

The process control block (process descriptor)


Scheduling Algorithms Pre-emptive (Shortest-
Job-First (SJF), round robin) and Non-pre-
emptive (First Come First Serve (FCFS),
Shortest-Job- First (SJF)).

CXC A19/U2/21 20 www.cxc.org


UNIT 2
MODULE 3: OPERATING SYSTEMS AND COMPUTER NETWORKS (cont’d)

SPECIFIC OBJECTIVES CONTENT

Students should be able to:

Memory Management.
Virtual Memory, paging, thrashing.

File Management:
Directories/Folders, Files, file compression.

Security (of files).


User IDs, Passwords, Lockwords, Access control
list, file encryption, Activity logs.

Interface (user):
Types of interfaces: command prompt, menu,
GUI and the manipulation of the interface

Device Management.
Device drivers.
Interrupt handling (PCB).
Input/output control.
Peripheral control, Polling, Buffering, Spooling.

Networking:
Network management (user accounts, access
logs) Networking Protocols (TCP/IP).

4. distinguish among networked, Network Architecture: Ethernet, FDDI.


client-server, and distributed;
Network topology: Star, Ring, Bus, Hybrid.

Network devices: Modems, switches, routers,


bridges, network interface cards (NIC), hubs.

Transmission Media: wired (twisted pair, fiber-


optics, coaxial); wireless (satellite, microwave,
Bluetooth, infrared, Wi-Fi and WiMAX).

Protocol:
Transmission Control Protocol/Internet Protocol
(TCP/IP), File Transfer Protocol (FTP), Hypertext.

CXC A19/U2/21 21 www.cxc.org


UNIT 2
MODULE 3: OPERATING SYSTEMS AND COMPUTER NETWORKS (cont’d)

SPECIFIC OBJECTIVES CONTENT

Students should be able to:

Transfer Protocol (HTTP); Hypertext Transfer


Protocol Secure Sockets Layer (HTTPS);
IEEE802.11a/b; IEEE802.16g; characteristics of
Voice Over Internet Protocol;
Open System Interconnection (OSI) model.

Networking consideration:
cost, security, management, expandability,
interconnectivity, wired vs wireless

Network Configuration:
Types: Multi-user; client server, centralised vs.
distributed system, peer to peer.

Network Security:
Firewalls.

5. draw diagrams to represent Components of simple networks (may include


connections between the routers, ISPs, switches, modems,
components of simple networks; microcomputers, mobile devices, wireless access
and, points, servers, hubs, network attached storage
[NAS]).

Use of diagrams to design networks.

6. explore data strategies for large Flat file storage, Relational databases;
scale systems. Platforms to include (MYSQL, SQL Server);
Primary keys, secondary keys, foreign keys, and
candidate keys.

Simple SQL statements (SELECT, INSERT, JOIN


(inner join only) UPDATE, DELETE);
Query Strings and Stored Procedures; and,
Database connections and Web services.

CXC A19/U2/21 22 www.cxc.org


UNIT 2
MODULE 3: OPERATING SYSTEMS AND COMPUTER NETWORKS (cont’d)

Suggested Teaching and Learning Activities

To facilitate students’ attainment of the objectives of this Module, teachers are advised to engage
students in the teaching and learning activity below.

1. Divide class into groups and have each group conduct research on the functions of one type of
operating system with respect to convenience, efficiency, and the ability to evolve. Each group
will then be required to present a report to the class. Students should be encouraged to gather
current information from various sources such as the Internet, computer magazines, books and
by interviewing computer professionals.

2. Allow students to use virtualisation software such as VirtualBox to install operating systems,
and databases.

3. Allow students to compare different aspects – the interfaces, filing systems.

4. Have students participate in a game such as Jeopardy which should be designed to assess their
knowledge of concepts covered in the Module. Students could compete in groups.

RESOURCES

Duncan, O’Neil Information Technology and Computer Science for CAPE


and College Students, LMH Publishing Limited, Jamaica,
2017.

Ritchie, C. Operating Systems Incorporating UNIX and Windows,


London: Letts Educational, 2006.

Shelly, G., Ashman, T. and Vermaat, M. Discovering Computers, Boston: Thomson Course
Technology, 2014.

Silberschstz, Abraham, Galvin, Peter Operating System Concepts Essentials, 2nd Edition. John
Baer, and Gagne, Greg Wiley and Sons Inc. 2014.
Tanenbaum, A., & Bos, H Modern operating systems. Boston [u.a.]: Pearson, 2015.

Electronic resources

https://edu.gcfglobal.org/en/computerbasics/understanding-operating-systems/1/

http://www.cs.aucegypt.edu/~csci106k/Chapter1-Introduction%20to%20Computer.pdf

http://www.cs.nthu.edu.tw/~ychung/slides/CSC3150/Abraham-Silberschatz-Operating-System-
Concepts---9th2012.12.pdf

https://learninghub.cxc.org/

CXC A19/U2/21 23 www.cxc.org


 OUTLINE OF ASSESSMENT

Each Unit of the syllabus will be assessed separately. The scheme of assessment for each Unit will be
the same. Candidate’s performance on each Unit will be reported as an overall grade and a grade on
each Module of the Unit. The assessment will comprise two components, one external and one
internal.

EXTERNAL ASSESSMENT (80%)

Paper 01 Forty-five multiple-choice items, 15 from each (30%)


(1 hour 30 minutes) Module. Each item is worth 1 mark.

Paper 02 Six questions, two from each Module. Candidates (50%)


(2 hours 30 minutes) will be expected to answer all questions.

Paper 032 Case study. Candidates will be expected to answer (20%)


(2 hours) all questions

SCHOOL-BASED ASSESSMENT (20%)

Paper 031

Unit 1: Fundamentals of Computer Science

Candidates are expected to choose a problem for which a software solution is appropriate and create
an algorithm for the solution using sequencing, selection, assignments, iteration (bounded and
unbounded). They should represent their algorithms using any combination of narrative, flow charts
and pseudocode. Candidates are expected to implement the algorithm in C using arrays with no less
than five functions and create a test plan.

Unit 2: Further Topics in Computer Science

Candidates are expected to choose a problem for which a software solution exists and then develop
the software using software engineering techniques. In particular, they are expected to demonstrate
the tools and techniques used in the analysis of the software to be developed. They are then expected
to design, code, and test their software using appropriate techniques.

Paper 032

Private candidates are required to write the Paper 032 an Alternative Paper to the School-Based
Assessment. The Paper 032 will be a case study and questions.

MODERATION OF SCHOOL-BASED ASSESSMENT

A School-Based Assessment Record Sheet will be sent each year to schools submitting students for the
examinations.

The School-Based Assessment Record Sheets are also available online via the CXC®’s website
https://www.cxc.org/. All School-Based Assessment Record of marks and sample of projects must be

CXC A19/U2/21 24 www.cxc.org


submitted online, using the SBA data capture module of the Online Registration System (ORS) on the
Council’s Website for moderation purposes. These assignments must be electronically submitted. The
assignments will be reassessed by CXC® Examiners who moderate the School-Based Assessment. The
marks assigned by the classroom teacher may therefore be adjusted to bring them in alignment with
CXC®’s standards. The Examiners’ comments will be sent to schools.

Copies of the students’ submissions must be retained by the school until three months after publication
by CXC® of the examination results.

ASSESSMENT DETAILS

External Assessment

Paper 01, Paper 02 and Paper 032

The external assessment consists of two written papers. They are externally set and externally
assessed. Together the Paper01 and Paper 02 contribute 80 per cent of the final mark.

Paper 01 (1 hour 30 minutes)

1. Composition of the Paper

The paper will consist of 45 multiple-choice items, 15 from each Module. All questions are
compulsory

2. Syllabus Coverage

Knowledge of the entire Syllabus is required. The paper will assess the candidate’s
knowledge across the breadth of the Syllabus.

3. Mark Allocation

The paper is worth 45 marks, with each question being allocated 1 mark.

4. Question Type

Questions may be presented using diagrams, data, graphs, prose or other stimulus material.

Paper 02 (2 hours 30 minutes)

1. Composition of the Paper

This paper consists of six questions, two from each Module, arranged in three sections.
Candidates are required to do all questions in each section.

2. Mark Allocation

This paper is worth 90 marks; each question is worth 15 marks.

CXC A19/U2/21 25 www.cxc.org


3. Question Type

Each question may present a situation related to a specific topic in the syllabus and consists of
three or four sub- questions. The required responses to a sub-question may range in length.

4. Award of marks

Marks will be awarded for knowledge and comprehension, application and analysis, and
synthesis and evaluation.

Paper 032 (2 hours)

1. Composition of the Paper

This paper consists of a Case Study and structured questions, which cover each Module,
arranged in sections. Candidates are required to do all questions in each section.

2. Mark Allocation

This paper is worth 60 marks.

3. Question Type

Each question may present a situation related to a specific topic in the syllabus and consists of
three or four sub- questions. The required responses to a sub-question may range in length.

4. Award of marks

Marks will be awarded for knowledge and comprehension, application and analysis , and
synthesis and evaluation.

Paper 031-The School-Based Assessment (20% of Total Assessment)

School-Based Assessment is an integral part of student assessment in the course covered by this
syllabus. It is intended to assist students in acquiring certain knowledge, skills and attitudes that are
associated with the subject. The activities for the School-Based Assessment are linked to the syllabus
and should form part of the learning activities to enable the students to achieve the objectives of the
syllabus. Students are encouraged to work in groups.

During the course of study for the subject, students obtain marks for the competence they develop
and demonstrate in undertaking their School-Based Assessment assignments. These marks contribute
to the final marks and grades that are awarded to students for their performance in the examination.

The guidelines provided in this syllabus for selecting appropriate tasks are intended to assist teachers
and students in selecting assignments that are valid for the purpose of School-Based Assessment. The
guidelines provided for the assessment of these assignments are intended to assist teachers in
awarding marks that are reliable estimates of the achievement of students in the School-Based
Assessment component of the course. In order to ensure that the scores awarded by the teachers are
not out of line with the CXC® standards, the Council undertakes the moderation of a sample of the
School-Based Assessment assignments marked by each teacher.

CXC A19/U2/21 26 www.cxc.org


School-Based Assessment provides an opportunity to individualise a part of the curriculum to meet
the needs of students. It facilitates feedback to the student at various stages of the experience. This
helps to build the self- confidence of students as they proceed with their studies. School-Based
Assessment also facilitates the development of critical skills and abilities emphasised by this CAPE®
subject and enhances the validity of the examination on which candidate performance is reported.
School-Based Assessment, therefore, makes a significant and unique contribution to both the
development of relevant skills and the testing and rewarding of students for the development of those
skills.

The Caribbean Examinations Council seeks to ensure that the School-Based Assessment scores are
valid and reliable estimates of accomplishment. The guidelines provided in this syllabus are intended
to assist in doing so.

Candidates’ total School-Based Assessment mark for any Unit should be divided in three and allocated
to each Module equally. Students are encouraged to work in small groups to complete the SBA.

Fractional marks should not be awarded. Wherever the Unit mark is not divisible by three, then:

(a) when the remainder is 1 mark, it should be allocated to Module 1; and,

(b) when the remainder is 2, one of the marks should be allocated to Module 2 and the
other mark to Module 3.

Paper 031

UNIT 1: Fundamentals of Computer Science

1. The aims of the project are to:

(a) develop candidates’ personal insights into the fundamentals of Computer science;
and,

(b) provide opportunities for all candidates to show, with confidence, that they have
mastered the Syllabus.

2. Requirements

Candidates are expected to choose a problem for which a software solution is appropriate and
create algorithms for the solution using sequencing, selection, assignments, and iteration
(bounded and unbounded). They should represent their algorithms using narrative format and
either flow charts or pseudocode. Candidates are expected to implement their algorithms as
C programs using arrays with no less than five functions and using at least one file. They must
also create a test plan that is used to test their implemented programs for correctness.

3. Integration of Project into the course

(a) The activities related to Project work should be integrated into the course so as to
enable candidates to learn and practise the skills of undertaking a successful project.

CXC A19/U2/21 27 www.cxc.org


(b) Some time in class should be allocated for general discussion of project work. For
example, discussion of how data should be collected, how data should be analysed
and how data should be presented.

(c) Class time should also be allocated for discussion between teacher and students, and
student and student.

4. Management of Project

(a) Planning

An early start to planning project work is highly recommended and the schedule of
the dates for submission should be developed by teachers and candidates.

(b) Length

The length of the report of the project should not exceed 1500 words excluding
diagrams, graphs, tables and bibliography.

(c) Guidance

Even if the SBA is completed in groups, each candidate should know the requirements
of the project and its assessment process.

Although candidates may consult with resource persons besides the teacher the
candidates’ submission should be their own work.

Candidates are not expected to work on their own. The teacher is expected to give
appropriate guidance at all stages of project work, for example, chapters to read,
alternative procedures to follow and other sources of information.

(d) Authenticity

Teachers are required to ensure that all projects are the candidates’ work.

A recommended procedure is to:

(i) engage candidates in discussion;

(ii) ask candidates to describe procedures used and summarise findings either
orally or written; and,

(iii) ask candidates to explain specific aspects of the analysis.

CXC A19/U2/21 28 www.cxc.org


ASSESSMENT CRITERIA FOR THE PROJECT

General

It is recommended that candidates be provided with the assessment criteria before commencing
the project.

1. The following aspects of the project will be assessed:

(a) Definition of problem;

(b) Narrative and flow charts or pseudocode;

(c) Coding of program;

(d) Testing and presentation; and,

(e) Communication of Information.

2. For each component, the aim is to find the level of achievement reached by candidates.

3. For each component, only whole numbers should be awarded.

4. It is recommended that the assessment criteria be available to candidates at all times.

CRITERIA FOR MARKING SCHOOL-BASED ASSESSMENT PROJECT (UNIT 1)

The project will be graded out of a total of 60 marks and marks will be allocated to each task as outlined
below. Candidates will be awarded marks for communicating information in a logical way using correct
grammar. These marks are awarded under Task 5 below.

1. Identification of Specifications [4]


• Functional requirements (2)
- All functional requirements identified 2
- OR Most functional requirements identified (over 50 %) 1
• Non-Functional Requirements (2)
- All non-functional requirements identified 2
- OR Most non-functional requirements identified (over 50 %) 1

2. Design [21]
• Algorithms expressed as flow charts or pseudocode (6)
- Flow chart/Pseudocode is logical, easy to follow and is an 5-6
accurate description of a solution using the appropriate
symbols or algorithmic structures
- Flow chart/Pseudocode is organised, easy to follow for the 3-4
most part, and is a clear description of a solution using the
appropriate symbols or algorithmic structures
- Flow chart/Pseudocode is not well organised, and description 1-2
of solution lacks clarity

CXC A19/U2/21 29 www.cxc.org


• Use of Files (4)
Selection and Justification of file structure (2)
- Appropriate selection and justification of file structure 2
- Appropriate selection but no justification of file structure 1
• Description of File Inputs and Outputs (2)
- States sources and types of inputs 1
- States uses of outputs 1
• Use of appropriate data structures (6)
- Data structure chosen were appropriate for the problem 5-6
definition
- Data structure chosen were reasonable but not appropriate 3-4
- Data structure chosen were inappropriate 1-2
• Demonstration of structured programming concepts (5)
- Design demonstrates excellent use of structured 5
programming concepts
- Design demonstrates good use of structured programming 3-4
concepts
- Design demonstrates limited use of structured programming 1-2
concepts

3. Coding of Program [19]


• Structured decomposition using functions (6)
- Overall, program comprises functions as independent units 5-6
- Program comprises most functions as independent units 3-4
- Program comprises some functions as independent units 1-2
• Demonstration of the concept of structured programming (3)
- Evidence of looping structures 3
- Evidence of conditional statements 2
- Evidence of other structures (for example assignment, input, 1
output)
• Appropriate programming style and documentation (4)
- Appropriate document in significant areas 3-4
- Standard indentation of code 1-2
• Evidence that code matches algorithm (4)
- Code matches sequencing of algorithm 4
- Code matches MOST of the sequencing of algorithm 3
- Code matches SOME of the sequencing of algorithm 2
- Sequencing of code inconsistent with algorithm 1
• Evidence of file manipulation (2)
- Correct file types used, for example, text, binary, sequential, 2
random
- File used appropriately 1

4. Testing and presentation [11]


• Test Plan (3)
- Test Plan with exhaustive data set 3
- Test Plan with acceptable data set 2
- Test Plan with minimal data set 1
• Test Results (5)
- Normal input giving correct results 5
- Extreme input giving correct results or appropriate error 3-4
message

CXC A19/U2/21 30 www.cxc.org


- Erroneous input (for example, text when number 2
required) giving appropriate error message
- Incomplete input giving appropriate message 1
• Overall presentation (3)
- Appropriate cover page 1
- Use of table of contents 1
- Sequencing in document easy to follow 1

5. Documentation [5]
• Technical Documentation (3)
- Presents a System Architecture that shows clearly defined 2
inputs, outputs, processing and storage points
- OR System architecture is not clearly defined 1
- Guidelines for updating programs and data as the programme 1
is used over an extended period of time

• User Documentation (2)


- Communicates information in a logical way using 2
correct grammar and appropriate jargon ALL of the time
- Communicates information in a logical way using 1
correct grammar and MOST of the time

TOTAL 60

UNIT 2: Further Topics in Computer Science

1. The aims of the project are to:

(a) develop candidates’ personal insights into further topics in Computer Science; and,

(b) provide opportunities for all candidates to show, with confidence, that they have
mastered the syllabus.

2. Requirements

Candidates are expected to choose a problem for which a software solution exists and then
develop the software using software engineering techniques. In particular, candidates are
expected to demonstrate appropriate choice of the tools and techniques used in the analysis
of the software to be developed. They are then expected to design, code, and test their
software using appropriate techniques.

The following are examples of the kinds of projects that students can develop for the School-
Based Assessment:

(a) simple process scheduler for an operating system;


(b) vehicle parking system to allocate spaces to vehicles in a parking lot;
(c) system to manage a music collection; and,
(d) student registration system to keep track of student information, course grades and
registration details.

CXC A19/U2/21 31 www.cxc.org


3. Integration of Project into the course

(a) The activities related to Project work should be integrated into the course so as to
enable candidates to learn and practise the skills of undertaking a successful project.

(b) Some time in class should be allocated for general discussion of project work. For
example, discussion of how data should be collected, how data should be analysed
and how data should be presented.

(c) Class time should also be allocated for discussion between teacher and students, and
student and student.

4. Management of Project

(a) Planning

An early start to planning project work is highly recommended and the schedule of
the dates for submission should be developed by teachers and candidates.

(b) Length

The length of the report of the project should not exceed 1500 words excluding
diagrams, graphs, tables and bibliography.

(c) Guidance

Even if the SBA is completed in groups, each candidate should know the requirements
of the project and its assessment process.

Although candidates may consult with resource persons besides the teacher the
candidate’s submission should be his or her own work.

Candidates are not expected to work on their own. The teacher is expected to give
appropriate guidance at all stages of project work, for example, chapters to read,
alternative procedures to follow and other sources of information.

(d) Authenticity

Teachers are required to ensure that all projects are the candidates’ work.

A recommended procedure is to:

(i) engage candidates in discussion;

(ii) ask candidates to describe procedures used and summarise findings either
orally or written; and,

(iii) ask candidates to explain specific aspects of the analysis.

CXC A19/U2/21 32 www.cxc.org


ASSESSMENT CRITERIA FOR THE PROJECT

General

It is recommended that candidates be provided with the assessment criteria before commencing
the project.

1. The following aspects of the project will be assessed:

(a) Specification of requirements;

(b) Design Specification;

(c) Coding and Testing; and,

(d) Communication of Information.

2. For each component, the aim is to find the level of achievement reached by the candidates.

3. For each component, only whole numbers should be awarded.

4. It is recommended that the assessment criteria be available to candidates at all times.

CRITERIA FOR MARKING SCHOOL-BASED ASSESSMENT PROJECT (UNIT 2)

The project will be graded out of a total of 60 marks and marks will be allocated to each task as outlined
below. Candidates will be awarded a total of 5 marks for communicating information in a logical way
using correct grammar. The marks are awarded as shown in the mark scheme below.

1. Specification of requirements [25]

• Definition of problem (5)


- Complete accurate description of the problem 5
- Generally accurate description for the problem 4
- Partially accurate description for the problem 3
- Weak description for the problem 1-2

• Techniques of analysis used (5)


- Sound and relevant techniques used 5
- Mostly sound and relevant techniques 3-4
- Techniques were partially sound and relevance was limited 1-2

• Use of Data Flow diagrams and E-R diagrams (9)


Data Flow Diagrams (DFD) (3)
Context Level
- Complete and accurate diagram of all relevant entities, data 3
flows
- Accurate diagram of most relevant entities, data flows 2
- Accurate diagram of few relevant entities, data flows 1

CXC A19/U2/21 33 www.cxc.org


• Level 1 Diagram (3)
- Complete and accurate diagram of all relevant processes, 3
data flows and major data stores
- Accurate diagram of most relevant processes, data flows and 2
major data stores
- Accurate diagram of few relevant processes, data flows 1
and major data stores

• Entity Relation Diagram (ERD) (3)


- Complete and accurate diagram of all relevant entities and 3
relationships.
- Accurate diagram of most relevant entities and relationships. 2
- Accurate diagram of few relevant entities and relationships. 1

• Functional and non-functional requirements (6)


Functional Requirements (3)
- Complete and accurate description of all requirements 3
- Complete and accurate description of most requirements 2
- Complete and accurate description of few requirements 1

• Non Functional Requirements (3)


- Complete and accurate description of all requirements 3
- Accurate description of most requirements 2
- Accurate description of some requirements 1

2. Design Specification [14]


• System structuring (4)
- Complete and accurate diagram of all processes 4
- Accurate diagram of most processes 3
- Accurate diagram of some processes 2
- Accurate diagram of few processes 1
• User interface design (2)
- Thorough analysis and appropriate justification of interface 2
design
- Partial analysis and justification of interface design 1
• Report design (2)
- Appropriate and well implemented 2
- Generally appropriate and satisfactorily implemented 1
• Algorithm design (3)
- Appropriate and well implemented algorithm design 3
- Generally appropriate algorithm design 2
- General understanding of algorithm design 1
• Choice of appropriate data structures (3)
- Appropriate and well implemented 3
- Generally appropriate 2
- Partially appropriate and implementation was limited 1

CXC A19/U2/21 34 www.cxc.org


3. Coding and Testing [15]
• Code achieves functionality (5)
- Code achieved functionality (documentation, error 5
trapping, correct output, usability and reporting)
- Code achieved some functionality (documentation, 3-4
error trapping, correct output, usability and reporting)
- Functionality was limited 1-2
• Code corresponds to design (5)
- Code achieves all the design specifications 5
- Code achieves most of the design specifications 3-4
- Code achieves few of the design specifications 1-2
• Test plans (5)
- Test Plan with exhaustive data set 5
- Test Plan with acceptable data set 3-4
- Test Plan with minimal data set 1-2

4. Communication and Presentation [6]


• Communicates information in a logical way using correct 5-6
grammar and appropriate jargon ALL of the time
• Communicates information in a logical way using correct 3-4
grammar and appropriate jargon MOST of the time
• Communicates information in a logical way using correct 1-2
grammar and appropriate jargon SOME of the time

TOTAL 60

 REGULATIONS FOR PRIVATE CANDIDATES


Candidates who are registered privately will be required to sit Paper 01, Paper 02 and Paper 032.
Paper 032 will test the student’s acquisition of the skills in the same areas of the syllabus identified
for the School-Based Assessment. Consequently, candidates are advised to undertake a project similar
to the project that the school candidates would normally complete and submit for SBA. It should be
noted that private candidates would not be required to submit a project document.

 REGULATIONS FOR RESIT CANDIDATES


Resit candidates must complete Paper 01 and Paper 02 of the examination for the year for which they
reregister.

CAPE® candidates may reuse any moderated SBA score within a two-year period. In order to assist
candidates in making decisions about whether or not to reuse a moderated SBA score, the Council will
continue to indicate on the preliminary results if a candidate’s moderated SBA score is less than 50 per
cent in a particular Unit. Candidates reusing SBA scores should register as “Resit candidates” and must
provide the previous candidate number when registering.

Resit candidates must be entered through a school, approved educational institution or the local
Registrar’s office.

CXC A19/U2/21 35 www.cxc.org


 ASSESSMENT GRID
The Assessment Grid for each Unit showing marks assigned to each paper and to Modules, and the
percentage contribution of each paper to the total scores.

Papers Module 1 Module 2 Module 3 Total (%)


External Assessment
Paper 01
Multiple Choice
(1 hour 30 minutes) (15) (15) (15) (45) (30)

Weighting 30 30 30 90
Paper 02
Essay
(2 hours 30 minutes) 30 30 30 90 50

(50 ) (50 ) (50 ) (150)


Paper 031-School-Based
Assessment

The Alternate to the SBA-Paper 032 20 20 20 60 (20)


(2 hours)

Total 100 100 100 300 (100)


*Weighted scores in brackets.

CXC A19/U2/21 36 www.cxc.org


 LOGIC SYMBOLS
p, q, r propositions
∧ conjunction
∨ (inclusive)
disjunction
∼ negation
→ conditionality
↔ bi-conditionality
· implication
⇔ equivalence

AND gate OR gate


NOT gate
true
false
T, 1
F,

CXC A19/U2/21 37 www.cxc.org


 GLOSSARY
WORD DEFINITION/MEANING NOTES

analyse examine in detail

annotate add a brief note to a label Simple phrase or a few words


only.
Make inferences/conclusions.
apply use knowledge/principles to solve
problems
assess present reasons for the importance of Compare the advantages and
particular structures, relationships or disadvantages or the merits and
processes demerits of a particular
structure, relationship or
process.

calculate arrive at the solution to a numerical Steps should be shown; units


problem must be included.

classify divide into groups according to


observable characteristics

comment state opinion or view with supporting


reasons
compare state similarities and differences An explanation of the
significance of each similarity
and difference stated may be
required for comparisons which
are other than structural.

construct use a specific format to make and/or Such representations should


draw a graph, histogram, pie chart or normally bear a title,
other representation using data or appropriate headings and
material provided or drawn from legend.
practical investigations, build (for
example, a model), draw scale
diagram

deduce make a logical connection between


two or more pieces of information;
use data to arrive at a conclusion

define state concisely the meaning of a word or This should include the
term defining equation/formula
where relevant.

demonstrate show; direct attention to...

CXC A19/U2/21 38 www.cxc.org


WORD DEFINITION/MEANING NOTES

derive to deduce, determine or extract from This relationship etc., may be


data by a set of logical steps some general or specific.
relationship, formula or result

describe provide detailed factual information Description may be in words,


of the appearance or arrangement of a drawings or diagrams or any
specific structure or a sequence of a appropriate combination.
specific process Drawings or diagrams should be
annotated to show appropriate
detail where necessary.

determine find the value of a physical quantity

design plan and present with appropriate Where hypotheses are stated
practical detail or when tests are to be
conducted, possible outcomes
should be clearly stated and/or
the way in which data will be
analysed and presented.

develop expand or elaborate an idea or


argument with supporting reasons

diagram simplified representation showing the


relationship between components

differentiate/ state or explain briefly those differences


distinguish between or among items which can be
(between/ used to define the items or place them into
among) separate categories

discuss present reasoned argument; consider


points both for and against; explain the
relative merits of a case

draw make a line representation from In the case of drawings


specimens or apparatus which shows an specimens, the magnification
accurate relation between the parts always be stated.

estimate make an approximate quantitative


judgement

evaluate weigh evidence and make judgements The use of logical supporting
based on given criteria reasons for a particular point of
view is more important than
the view held; usually both
sides of an argument should be
considered.

CXC A19/U2/21 39 www.cxc.org


WORD DEFINITION/MEANING NOTES

explain give reasons based on recall; account for

find locate a feature or obtain as from a graph

formulate devise a hypothesis

Identify name or point out specific components or


features

illustrate show clearly by using appropriate


examples or diagrams, sketches

interpret explain the meaning of

justify explain the correctness of

investigate use simple systematic procedures to


observe, record data and draw logical
conclusions

label add names to identify structures or parts


indicated by pointers

list itemise without detail

measure take accurate quantitative readings using


appropriate instruments

name give only the name of No additional information is


required.
note write down observations

observe pay attention to details which Observations may involve all


characterise a specimen, reaction or the senses and/or extensions of
change taking place; to examine and note them but would normally
scientifically exclude the sense of taste.

outline give basic steps only

plan prepare to conduct an investigation

predict use information provided to arrive at a


likely conclusion or suggest a possible
outcome

record write an accurate description of the full This includes the values for any
range of observations made during a given variable being investigated;
procedure where appropriate, recorded
data may be depicted in graphs,
histograms or tables.

CXC A19/U2/21 40 www.cxc.org


WORD DEFINITION/MEANING NOTES

relate show connections between; explain how


one set of facts or data depend on others
or are determined by them
sketch make a simple freehand diagram showing
relevant proportions and any important
details

state provide factual information in concise


terms outlining explanations

suggest offer an explanation deduced from No correct or incorrect solution


information provided or previous is presumed but suggestions
knowledge. (... a hypothesis; provide a must be acceptable within the
generalization which offers a likely limits of scientific knowledge.
explanation for a set of data or
observations.)

test to find out, following set procedures

Western Zone Office


8 April 2021

CXC A19/U2/21 41 www.cxc.org


CARIBBEAN EXAMINATIONS COUNCIL

Caribbean Advanced Proficiency Examination®


CAPE ®

COMPUTER SCIENCE

Specimen Papers and


Mark Schemes/Keys

Specimen Papers and Mark Schemes:

Unit 1 Paper 01
Unit 1 Paper 02
Unit 1 Paper 032

Unit 2 Paper 01
Unit 2 Paper 02
Unit 2 Paper 032
TEST CODE 02115010
SPEC 2021/02115010
CARIBBEAN E XAM I NAT I O N S COUNCIL
CARIBBEAN ADVANCED PROFICIENCY EXAMINATION®

COMPUTER SCIENCE

SPECIMEN PAPER

UNIT 1 – Paper 01
1 hour 30 minutes

READ THE FOLLOWING INSTRUCTIONS CAREFULLY.

1. This test consists of 45 items. You will have 1 hour and 30 minutes to answer them.

2. In addition to this test booklet, you should have an answer sheet.

3. Do not be concerned that the answer sheet provides spaces for more answers than there are items
in this test.

4. Each item in this test has four suggested answers lettered (A), (B), (C), (D). Read each item
you are about to answer and decide which choice is best.

5. On your answer sheet, find the number which corresponds to your item and shade the space
having the same letter as the answer you have chosen. Look at the sample item below.

Sample Item

How many selection lines does an 8 × 1 multiplexer have?


Sample Answer

(A) 1 A B C D
(B) 2
(C) 3
(D) 8

The best answer to this item is “3”, so (C) has been shaded.

6. If you want to change your answer, erase it completely before you fill in your new choice.

7. When you are told to begin, turn the page and work as quickly and as carefully as you can. If
you cannot answer an item, go on to the next one. You may return to that item later.

8. You may do any rough work in this booklet.

9. Figures are not necessarily drawn to scale.

10. The use of silent, non-programmable calculators is allowed.

DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO.

Copyright © 2020 Caribbean Examinations Council


All rights reserved.
-2-

Items 1–2 refer to the following binary string 4. Which of the following descriptions BEST
sequence. suits the function of cache memory?

1 0 0 1 1 1 0 1 (A) It gives the CPU more rapid access


to data.
1. The string sequence is the 8 bit sign- (B) It increases the data transfer rate
magnitude representation of the decimal between the computer and
value printer.
(C) It speeds up access to data on the
(A) –99 hard disk.
(B) –98 (D) It stores the operating system when
(C) –29 the computer ‘boots’.
(D) –25

5. A computer’s word size is the


2. The string sequence is the 8 bit two’s
complement representation of the decimal (A) length of an instruction
value (B) maximum number of characters in
a typed word
(A) –25 (C) storage capacity of the computer’s
(B) –29 memory
(C) –98 (D) number of bits that the CPU can
(D) –99 manipulate at one time

3. What is the logical expression implemented 6. What is the purpose of the program counter
in the following circuit? in a microcomputer?

(A) To determine how many programs


can be opened at one time
(B) To determine the sequence in which
the program instructions are to be
executed
(A) A AND (NOT B) (C) To hold the number of the last
(B) B AND (NOT A) instruction executed
(C) A OR (NOT B) (D) To keep a count of the number of
(D) B OR (NOT A) instructions in memory

7. ‘Flash memory’ is a type of

(A) ROM
(B) EEPROM
(C) RAM
(D) EPROM

GO ON TO THE NEXT PAGE


02115010/CAPE 2021/SPEC
-3-

8. Which of the following gives the slowest 11. Which of the following statements about
access when retrieving data? flip-flops are true?

(A) Floppy disk I. Flip-flops are examples of defective


(B) Hard drive logic circuits.
(C) Cache memory II. Flip-flops are two-state devices that
(D) Random Access Memory can only store 1’s and 0’s.
III. Registers are made up of flip-flops.

9. Which of the following is the truth table of (A) I and II only


a NAND gate? (B) I and III only
(C) II and III only
(A) A B A NAND B (D) I, II and III
0 0 1
0 1 0
1 0 0 Items 12–13 refer to the following compo-
1 1 1 nents.

(B) A B A NAND B (A) ALU


0 0 0 (B) CU
0 1 1 (C) Registers
1 0 1 (D) RAM
1 1 0
Match EACH item below with ONE of
(C) A B A NAND B the components above. Each option may
0 0 1 be used once, more than once or not at all.
0 1 1
1 0 1 12. Which of the components handles statements
1 1 0 like “If x < 0”?

(D) A B A NAND B
0 0 0 13. Which of the components coordinates the
0 1 0 saving of a file to a hard drive?
1 0 0
1 1 1
14. Which of the following type of computers
is BEST suited for a weather application at
10. Which of the following BEST defines the the National Hurricane Center in Florida,
term ‘clock speed’? USA?

(A) The number of clock cycles which (A) Mainframe computer


occur within a nanosecond (B) Microcomputer
(B) The speed at which the micro- (C) Minicomputer
processor executes instructions (D) Supercomputer
(C) The speed at which the micro-
processor transfers data from
secondary storage to primary
memory
(D) The number of bits transferred
across a medium in a second
GO ON TO THE NEXT PAGE
02115010/CAPE 2021/SPEC
-4-

Item 15 refers to the following program segment written in low-level instructions.

LOAD X // load contents of X to accumulator register

ADD inc // add contents of inc to accumulator register

STORE X // store contents of accumulator register to X

15. Which address instruction format is used by the computer?

(A) Zero address


(B) One address
(C) Two address
(D) Three address

16. Which of the following can be used to Items 17–18 refer to the following algorithm.
represent an algorithm graphically?
Num = 5
(A) Data flow diagrams For I = 1 to Num do
(B) HIPO charts Print I *2
(C) GANTT charts EndFor
(D) Flow charts
17. This algorithm is an example of

(A) selection
(B) recursion
(C) unbounded iteration
(D) bounded iteration

18. What is the output of the algorithm?

(A) 11
(B) 1 2 3 4 5
(C) 2 4 6 8 10
(D) I*2 I*2 I*2 I*2 I*2

GO ON TO THE NEXT PAGE


02115010/CAPE 2021/SPEC
-5-

19.
Which of the following represent(s) the 22. An assigment statement is used to
properties of a well-designed algorithm?
(A) debug an algorithm
I. Clearly defined and unambiguous (B) terminate an algorithm
steps (C) perform input in an algorithm
II. Finite number of steps (D) set a variable to take the value of
III. Gives a general solution to the an expression
problem

(A) I only 23. Which of the following control structures


(B) II only can be used when attempting to read data
(C) II and III only from a file where the number of records is
(D) I, II and III not known?

(A) A for loop


20. What is a sentinel value in an algorithm? (B) A sentinel control loop
(C) Switch control structure
(A) A value which helps to terminate a (D) An ‘If ... else’ control structure
loop
(B) Any inpput that the users enter
(C) A print statement 24. The following algorithm is needed to print
(D) A control instruct half the sum of two positive integers entered
by the user.

21. “Implementation” of the “Implementation (1) Read A


and Review” stage of the problem-solving (2) Read B
process involves (3) Sum = (B + A)/2
(4) Print ‘Sum is, sum’
(A) evaluation of alternative solutions
(B) installation of software Which line contains an error?
(C) analysis of the problem
(D) writing algorithms (A) Line 1
(B) Line 2
(C) Line 3
(D) Line 4

GO ON TO THE NEXT PAGE


02115010/CAPE 2021/SPEC
-6-

Items 25–26 refer to the following algo- Item 28 refers to the following algorithm.
rithm.
if a == b then
I. I=1 print (“Equal)
II. While I < > 12 do else if a > b then
III. product = I * I print (“A is larger”)
IV. print (product) else
V. I=I+1 print (“B is larger”)
VI. Endwhile End if

25. The algorithm above BEST illustrates an 28. What is the output generated by the
example of using algorithm if a is 15 and b is 22?

(A) input and output commands (A) Equal


(B) a selection statement (B) A is larger
(C) test first iteration (C) B is larger
(D) test last iteration (D) A is larger
B is larger

26. Which of the following BEST describes


the type of statement used in line V? 29. What are the values of p and r after
execution of the following algorithm?
(A) Conditional statement
(B) Incremental statement p=8
(C) Recursion q=4
(D) Variable declaration r=8

if (p > q) AND (q > r)


Item 27 refers to the following algorithm. p=+1
else
Fn (int N) { r=r-1
if (N < 1) return; end if
Fn (N/2);
print (N); (A) p = 7, r = 8
} (B) p = 8, r = 7
(C) p = 7, r = 7
27. What is the output of the above algorithm (D) p = 9, r = 7
if it is called with N = 7?

(A) 731
(B) 7331
(C) 137
(D) 1337

GO ON TO THE NEXT PAGE


02115010/CAPE 2021/SPEC
-7-

Item 30 refers to the following symbol. 32. Which of the following variable declarations
is valid in C?

(A) Char ch = ‘53x’;


(B) Float n = 84.321;
30. The flow chart symbol above represents (C) Int m = {5, 9, 3, 1, 4};
(D) In x = 700000;
(A) a decision box
(B) an input/output box
(C) a process box 33. Which of the following programming
(D) a terminator paradigms encourages a modular approach
to program construction?
31. A programming paradigm that models real (A) Declarative paradigm
world entities with attributes and behaviours (B) Functional paradigm
is (C) Imperative paradigm
(D) Extreme-programming paradigm
(A) object-oriented
(B) functional
(C) procedural
(D) scripting

Item 34 is based on the array below.

34. What is printed by the following code?

int j = 1;
while (j < 8) {
printf(“%d”, num [j]);
j = j * 2;

(A) 20 30 40 50 60 70 80 90
(B) 10 30 50 90
(C) 20 30 50
(D) 20 30 50 90

GO ON TO THE NEXT PAGE


02115010/CAPE 2021/SPEC
-8-

35. Which of the following is NOT a valid 38. Which of the following is NOT a numeric
identifier for a variable? data type?

(A) _hello (A) Boolean


(B) 2ndmark (B) Double
(C) marker-2 (C) Float
(D) SUM4 (D) Integer

36. What is the error in the following C pro- 39. Which of the following programs translates
gram which is intended to print the string all program instructions at one time and
constant ‘C programming is fun’? produces a stand-alone object program that
can be executed on its own?
#include <stdio.h>
{printf(“C programming is fun”); } (A) A generator
(B) A compiler
(A) The brackets ( and ) should be on (C) An assembler
different lines. (D) An interpreter
(B) The function main is missing.
(C) The braces { and } should be on
different lines. 40. Given a variable ‘num’ declared as follows:
(D) Single quotation marks ‘and’ should double num;
be used.
Which of the following statements will
correctly read a value entered by a user into
37. You are given the following C declaration ‘num’?

int vals [15]; (A) scanf (“%d”, num);


(B) scanf (“%d”, &num);
Which option below shows how 15 integers (C) scanf (“%lf “, num);
can be stored in the array? (D) scanf (“%lf “, &num);

(A) for (j = 1; j <= 15; j++)


vals[j] = j; 41. The compilation process can be broken
up into THREE main stages. The correct
(B) for (j = 0; j < 15; j++) order of the stages is
vals[j] = j;
(A) syntax analysis, lexical analysis,
(C) for (j = 0; j < 15; j++) code generation
vals = [ j]; (B) lexical analysis, code generation,
syntax analysis
(D) for (j = 1; j <= 15; j++) (C) lexical analysis, syntax analysis,
j = vals[j]; code generation
(D) code generation, lexical analysis,
syntax analysis

GO ON TO THE NEXT PAGE


02115010/CAPE 2021/SPEC
-9-

Item 42 is based on the following C program. 44. Which of the BEST ‘data type’ in C allows
a programmer to use a set of named integer
1. #include <stdio.h> constants?
2. void main (void) {
3. int n; (A) Char
4. FILE *fp; (B) Struct
5. fp = fopen (“\\mh.dat”, “r”); (C) Array
6. scanf (fp, “%d”, &n); (D) Enum
printf (“n is %d”, n);
7. }
Item 45 refers to the following code?
Content of “mh.dat”
int a, b, c;
4 5 a = 1;
for (i = 1; i < 5; 1 + +)
a = a * i;
42. Which of the following is true?
b = a * 5;
(A) There is a syntax error in line 5.
45. What is the value of a after execution of
(B) There is a syntax error in line 6.
the code?
(C) There are no syntax errors and the
program prints 4.
(A) 5
(D) There are no syntax errors and the
(B) 8
program prints 4 5.
(C) 24
(D) 120
43. The method of manually stepping through
a program without the use of a computer
and recording the values of variables as they
change is BEST described as

(A) tracing
(B) processing
(C) syntax analysis
(D) semantic analysis

END OF TEST

IF YOU FINISH BEFORE TIME IS CALLED, CHECK YOUR WORK ON THIS TEST.

02115010/CAPE 2021/SPEC
CARIBBEAN EXAMINATIONS COUNCIL

SECONCARY EDUCATION CERTIFICATE


EXAMINATION

CAPE COMPUTER SCIENCE UNIT 1

SPECIMEN PAPER 2021

Item Key Syllabus Module Item Key Syllabus Module


No. Reference No. Reference
1 C 1.4 1 31 A 3.1 3
2 D 1.4 1 32 B 3.3 3
3 A 1.2 1 33 D 3.1 3
4 A 1.1 1 34 C 3.7 3
5 D 1.1 1 35 B 3.3 3
6 B 1.1 1 36 B 3.9 3
7 B 1.1 1 37 B 3.7 3
8 A 1.1 1 38 A 3.3 3
9 C 1.2 1 39 B 3.2 3
10 B 1.1 1 40 D 3.3 3
11 C 1.3 1 41 C 3.2 3
12 A 1.5 1 42 C 3.9 3
13 B 1.5 1 43 A 3.9 3
14 D 1.1 1 44 D 3.3 3
15 B 1.5 1 45 C 3.9 3
16 D 2.5 2
17 D 2.6 2
18 C 2.7 2
19 D 2.4 2
20 A 2.6 2
21 B 2.2 2
22 D 2.6 2
23 B 2.6 2
24 D 2.7 2
25 C 2.6 2
26 B 2.6 2
27 C 2.7 2
28 C 2.7 2
29 B 2.7 2
30 D 2.5 2

Module 1 – COMPUTER ARCHITECTURE AND ORGANISATION


Module 2 – PROBLEM-SOLVING WITH COMPUTERS
Module 3 – PROGRAMMING
TEST CODE 02115020
SPEC 2021/02115020
CARIBBEAN E XAM I NAT I O N S COUNCIL

CARIBBEAN ADVANCED PROFICIENCY EXAMINATION®

COMPUTER SCIENCE

SPECIMEN PAPER

FUNDAMENTALS OF COMPUTER SCIENCE

UNIT 1 – Paper 02

2 hours 30 minutes

READ THE FOLLOWING INSTRUCTIONS CAREFULLY.

1. This paper consists of SIX questions. Answer ALL questions.

2. Write your answers in the spaces provided in this booklet.

3. Do NOT write in the margins.

4. If you need to rewrite any answer and there is not enough space to do so on the
original page, you must use the extra lined page(s) provided at the back of this
booklet. Remember to draw a line through your original answer.

5. If you use the extra page(s) you MUST write the question number clearly in
the box provided at the top of the extra page(s) and, where relevant, include
the question part beside the answer.

DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO.

Copyright © 2020 Caribbean Examinations Council


All rights reserved.
‘‘*’’Barcode Area”*”
02115020/CAPE 2021/SPEC Sequential Bar Code
-2-

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
SECTION A

COMPUTER ARCHITECTURE AND ORGANIZATION

Answer BOTH questions.

1. (a) Draw a clearly labelled block diagram of a 2 to 1 line multiplexer.

[5 marks]

(b) Construct the truth table for the following circuit which is a combination of basic logic
gates.

[7 marks]

GO ON TO THE NEXT PAGE


02115021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-3-
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

(c) Consider the following floating point representation.



1-bit sign, 3-bit exponent, 5-bit mantissa

Calculate the decimal representation of 001110110.



.............................................................................................................................................

.............................................................................................................................................

..............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

..............................................................................................................................................

.............................................................................................................................................

..............................................................................................................................................
[3 marks]

Total 15 marks

GO ON TO THE NEXT PAGE


02115021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-4-

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
2. (a) Differentiate between the following items as they pertain to computer systems.

(i) ROM and RAM

.................................................................................................................................

................................................................................................................................

................................................................................................................................

..............................................................................................................................
[2 marks]

(ii) EPROM and EEPROM

.................................................................................................................................

................................................................................................................................

................................................................................................................................

................................................................................................................................
[2 marks]

(b) (i) State what is meant by the ‘instruction set’ of a central processing unit (CPU).

.................................................................................................................................

................................................................................................................................

................................................................................................................................

................................................................................................................................
[1 mark]

GO ON TO THE NEXT PAGE


02115021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-5-
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

(ii) Briefly describe TWO types of instructions that are typically included in an instruction
set.

................................................................................................................................

....................................................................................................................................

.................................................................................................................................

....................................................................................................................................

....................................................................................................................................

....................................................................................................................................

.................................................................................................................................

....................................................................................................................................
[4 marks]

(c) Explain how the ‘fetch’, ‘decode’, ‘execute’ cycle works in relation to the execution of an
instruction by the CPU?

............................................................................................................................................

.............................................................................................................................................

............................................................................................................................................

.............................................................................................................................................

............................................................................................................................................

.............................................................................................................................................

............................................................................................................................................

.............................................................................................................................................
[6 marks]

Total 15 marks

GO ON TO THE NEXT PAGE


02115021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-6-

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
SECTION B

PROBLEM-SOLVING WITH COMPUTERS

Answer BOTH questions.

3. (a) Define the term ‘algorithm’.

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................
[2 marks]

(b) Structured algorithms and programs are designed using three basic control constructs. State
ALL three constructs.

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................
[3 marks]

GO ON TO THE NEXT PAGE


02115021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-7-
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

(c) A secondary school is conducting a survey on the popularity of certain colours. Students are
asked to vote for any of four choices: red, blue, green, none. If red, blue or green is not the
favourite, students vote for ‘none’.

Write a pseudocode to find and print the

(i) number of students who voted for EACH of the colours; red, blue, green

(ii) TOTAL number of students who voted for red, blue and green.

Assume that on the day of the survey, 150 students are present. Also assume that all votes are
valid.

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................
[10 marks]

Total 15 marks

GO ON TO THE NEXT PAGE


02115021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-8-
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

4. (a) Construct a flow chart to represent the following algorithm.

begin
prompt for numDays
read numDays
set day to 1
set totalComm to 0
while day <= numDays do
read numItemsSold
if numItemsSold < 500 then
comm = numItemsSold * 4
else
comm = numItemsSold * 5
endif
totalComm = totalComm + comm
print comm
add 1 to day
endwhile
print numDays, totalComm
stop

[12 marks]
GO ON TO THE NEXT PAGE
02115021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-9-

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
(b) An algorithm is shown below.

read j
sum = 0
while j < 6 do
sum = sum + j
print j
read j
endwhile
print ‘sum =’, sum

What would the algorithm print given the line of input data below?

3 2 1 5 7 4

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................
[3 marks]

Total 15 marks

GO ON TO THE NEXT PAGE


02115021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 10 -
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

SECTION C

PROGRAMMING

Answer BOTH questions.


5. (a) Briefly outline TWO programming paradigms.

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................
[4 marks]

(b) Explain THREE differences between a ‘complier’ and an ‘interpreter’.

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................
[6 marks]

GO ON TO THE NEXT PAGE


02115021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 11 -

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
(c) (i) A grocer needs to store some products. Each product has an ID (integer), a quan-
tity in stock (integer) and a price (floating point).

Write a declaration for a struct productRec that can store the record for each product.

................................................................................................................................

................................................................................................................................

................................................................................................................................

................................................................................................................................

................................................................................................................................

...............................................................................................................................
[2 marks]

(ii) Assume that the two productRec items, Item3 and Item4, are already loaded with
data. Write a code to exchange the values in Item3 and Item4.

................................................................................................................................

................................................................................................................................

................................................................................................................................

................................................................................................................................

................................................................................................................................

................................................................................................................................
[3 marks]

Total 15 marks

GO ON TO THE NEXT PAGE


02115021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 12 -
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

6. (a) Why is it reccommended that comments be used in programming codes?

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................
[2 marks]

GO ON TO THE NEXT PAGE


02115021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 13 -
(b) An integer array P contains m positive integers and an integer array Q contains n positive

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
integers. Write a fragment of C code to merge the positive integers in array P with those in
array Q to create a new array R, with the order of the elements of P and Q being reversed
in the new array. Show all relevant declarations, and assume that P and Q are already
loaded with integers.

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................
[13 marks]

Total 15 marks
END OF TEST

IF YOU FINISH BEFORE TIME IS CALLED, CHECK YOUR WORK ON THIS TEST.

02115020/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 14 -
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

EXTRA SPACE

If you use this extra page, you MUST write the question number clearly in the box provided.

Question No.

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

02115020/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 15 -

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
EXTRA SPACE

If you use this extra page, you MUST write the question number clearly in the box provided.

Question No.

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

02115020/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 16 -
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

EXTRA SPACE

If you use this extra page, you MUST write the question number clearly in the box provided.

Question No.

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

02115020/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 17 -

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
EXTRA SPACE

If you use this extra page, you MUST write the question number clearly in the box provided.

Question No.

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

02115020/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
02115020/KMS/CAPE SPEC/2021

CARIBBEAN EXAMINATIONS COUNCIL

ADVANCED PROFICIENCY EXAMINATION

COMPUTER SCIENCE

UNIT 1 - PAPER 02

KEYS AND MARK SCHEME

SPECIMEN PAPER 2021


2

02115020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 02
KEY AND MARK SCHEME

SECTION A

COMPUTER ARCHITECTURE AND ORGANISATION

Subject Objectives: 1.2, 1.3, 1.4

Question Key
1.
(a)

[5 marks]

Input 0 1 mark
Input 1 1 mark
Selection line 1 mark
Output 1 mark
Block diagram looks OK overall 1 mark

(b)
A B C D E F Z [7 marks]
0 0 1 1 0 0 0
0 1 1 0 1 0 1
1 0 0 1 0 1 1
1 1 0 0 0 0 0

2 marks input

1 mark each

5 output

(c) 001110110 [3 marks]

Sign bit = 0
Mantissa = 10110
Exponent = 011 = 3 (1)

Number represented 0.10110 × 23 = 101.1 = 5.5


(1) (1)

TOTAL 15 marks
3

02115020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 02
KEY AND MARK SCHEME

Question 2

Subject Objectives: 1.1, 1.5

(a) (i) ROM is read only (1) RAM ... (1)


[2 marks]

(ii) EPROM is erased by ultraviolent light (1) and


EEPROM is erased by electricity (1)
[2 marks]

(b) (i) The operation of a CPU is determined by the instructions it


executes (1). The collection of different instructions that
the CPU can execute is referred to as the CPU’s instruction
set (1).
[1 mark]

(ii) Data processing (1): instructions that perform arithmetic


(addition, subtraction, etc.) and logic operations
(comparisons, etc.) (1).

Data storage (1): instructions to store data in memory and


retrieve data from memory (1).

Data movement (1): instructions to input/output data from/to


input/output devices (1).

Control (1): instructions that test conditions and branch to


other instructions (1).

Any TWO [2 x 2 = 4 marks]


[4 marks]

(c) Fetch – Instruction is obtained from physical memory (1) and sent
to a register (1).

Decode – Determine what the instruction is (1). Determine the


operands (1).

Execute – Perform the operation (1) and store results if necessary


(1)
[6 marks]

TOTAL 15 marks
4

02115020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 02
KEY AND MARK SCHEME

SECTION B

PROBLEM-SOLVING WITH COMPUTERS

Question 3

Subject Objectives: 2.3, 2.6, 2.9

(a) An algorithm represents a solution to the problem (1) in a


sequence of unambiguous steps (1). [2 marks]

(b) Sequential (1):Steps are performed in a strictly sequential manner, each step
executed exactly once (1).

Selection (1):One of several alternative actions is selected and executed. (1)

Repetition (1):One or more steps is performed repeatedly (1).

[3 marks]

(c) rCount = bCount = gCount = nCount = 0


1
for j = 1 to 150 do ‘For’ or other loop = 1 Loop limits correct = 1

input choice 1
if choice = ‘red’ then 1
rCount = rCount + 1
else if choice = ‘blue; then 1
bCount = bCount + 1
else if choice =‘green’ then 1
gCount = gCount + 1
else nCount = nCount + 1 {Assumes all choices are valid} 1
end for

print ‘Red = ‘, rCount, ‘Blue = ‘, bCount, ‘Green = ‘, gCount 1


totalColorVotes = rCount + bCount + gCount 1
Note that one print
print ‘Total color votes =’, totalColorVotes command can have all the
required info

[10 marks]

Total 15 marks
5

02115020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 02
KEY AND MARK SCHEME

Question 4

Subject Objectives: 2.5, 2.7, 2.8

(a)

Each symbol correct (4 symbols) = 4


marks
First decision box = 2
marks
Second decision box = 2
marks
Read numItemsSold = 1
mark
Add 1 to day = 1
mark
Looping to correct decision box = 1
mark
Set Day to 1, total comm to 0 = 1
mark

[12 marks]
6

02115020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 02
KEY AND MARK SCHEME

Question 4 cont’d

(b)

3 2 1 sum = 6

2 marks 1 mark
[3 marks]

Total 15 marks
7

02115020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 02
KEY AND MARK SCHEME

SECTION C

PROGRAMMING
Question 5

Subject Objectives: 3.1, 3.2, 3.3, 3.9, 3.10

(a) (i) Imperative (1) — Variables are manipulated in storage using


expressions (1)

Functional (1) — Logic is implemented by the use of


functions (1)

Object-oriented (1) — Modelling is done using classes and


objects (1)

[2 x 2 marks]
[4 marks]

(b) A compiler translates the entire program before execution (1)


while an interpreter translates one line, executes that line and
then translates the next line. (1)

A compiler creates a list of errors after compilation (1) while


an interpreter stops after the first error. (1)

A compiler produces an independent executable file (1) while an


interpreter program needs the interpreter each time it is run (1)

[6 marks]

(c) (i) struct productRec{


int ID;
int quantity;
double price
}

Outer part (1)


Declaration of variables within struct (1)
[2 marks]
8

02115020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 02
KEY AND MARK SCHEME

(ii) struct product Rec temp;


temp = Item3;
Item3 = Item4;
Item4 = temp;

Three lines of code above in correct order (3)


Two lines of code correct (2)
One line of code above (1)

[3 marks]

Total 15 marks
9

02115020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 02
KEY AND MARK SCHEME

Question 6

Subject Objectives: 3.6, 3.7, 3.8, 3.11

(a) Comments explain important steps (1) in a program do users can


easily understand code. (1)
[2 marks]

(b) //declarations
int i = m - 1; //elements of array P. They can also start
at 0, but the loop would be different
int j = n -1; //elements of array Q. They can also start
at 0, but the loop would be different
int k = 0; //elements of array R 3 marks

//add elements of P to the merged array R. A for loop can


also be used
while(i >= 0){ 1 mark
R[k] = P[i]; 2 marks
k++; 1 mark
i- 1 mark
}

//add elements of Q to the merged array R. A for loop can


also be used
while(j >= 0){ 1 mark
R[k] = Q[j]; 2 marks
k++; 1 mark
j--; 1 mark
}

[13 marks]

Total 15 marks
CARIBBEAN E XAM I NAT I O N S COUNCIL

CARIBBEAN SECONDARY EDUCATION CERTIFICATE®


EXAMINATION
‘‘*’’Barcode Area”*”
Front Page Bar Code
SPECIMEN PAPER

FILL IN ALL THE INFORMATION REQUESTED CLEARLY IN CAPITAL LETTERS.

TEST CODE 0 2 1 1 5 0 3 2

SUBJECT COMPUTER SCIENCE – SPEC

PROFICIENCY ADVANCED

REGISTRATION NUMBER

SCHOOL/CENTRE NUMBER

NAME OF SCHOOL/CENTRE

CANDIDATE’S FULL NAME (FIRST, MIDDLE, LAST)

DATE OF BIRTH D D M M Y Y Y Y
‘‘*’’Barcode Area”*”
Current Bar Code

HOW MANY ADDITIONAL PAGES


HAVE YOU USED IN TOTAL?

SIGNATURE __________________________________________________

‘‘*’’Barcode Area”*”
TEST CODE 02115032
SPEC 2021/02115032
CARIBBEAN E XAM I NAT I O N S COUNCIL

CARIBBEAN ADVANCED PROFICIENCY EXAMINATION®

COMPUTER SCIENCE

SPECIMEN PAPER

UNIT 1 – Paper 032

2 hours

READ THE FOLLOWING INSTRUCTIONS CAREFULLY.

1. This paper consists of SEVEN questions.

2. Answer ALL questions.

3. Write your answers in the spaces provided in this booklet.

4. DO NOT write in the margins.

5. If you need to re-write any answer and there is not enough space to do so on
the original page, there are two extra pages provided at the back of this booklet.
Remember to draw a line through your original answer and correctly number
your new answer in the box provided.

6. If you use extra pages you MUST write your registration number and question
number clearly in the boxes provided at the top of EVERY extra page.

DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO.

Copyright © 2020 Caribbean Examinations Council


All rights reserved.
‘‘*’’Barcode Area”*”
02115032/CAPE 2021/SPEC Sequential Bar Code
-3-
Answer ALL questions.

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
CASE STUDY

A local community college wishes to automate the course registration process whereby students register
to undertake courses that are part of their degree programme. The college is seeking your assistance in
developing a user-friendly course registration system that allows students to register for up to three courses.

The system will present a menu from which students would be able to view all courses, register for a course
or de-register. To register, students would select the corresponding menu option and enter the course ID.
The system would use the master course file to show details such as course ID, course name, lecturer,
number of students already registered and the maximum number of students allowed to register. If a space
is available, a student would input his/her student identification number to register for the selected course.
The relevant system files would then be updated and a message sent to the student indicating whether the
course registration was successful.

Identification of Specifications

1. Describe FIVE functional requirements of the case study.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
[5 marks]

2. List THREE non-functional requirements of the case study.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
[3 marks]

GO ON TO THE NEXT PAGE



02115032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-4-
Design
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

3. (a) Write the structure of the master course text file. Include all the fields.

............................................................................................................................................


............................................................................................................................................

.............................................................................................................................................

............................................................................................................................................

............................................................................................................................................
[3 marks]

(b) Show sample contents of the master course text file using THREE records.


............................................................................................................................................

.............................................................................................................................................

............................................................................................................................................

............................................................................................................................................

............................................................................................................................................

............................................................................................................................................
[2 marks]

GO ON TO THE NEXT PAGE


02115032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-5-

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
4. Using the fields identified in Question 3 (a) and the following functions

1. findCourse – use course ID to check the master course file

2. updateCourse - update the course data

3. updateMasterFile - update the master file data.

Design an algorithm (flow chart/pseudocode) that would provide a solution for the function
registerCourse, which registers a student for a course.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
[15 marks]
GO ON TO THE NEXT PAGE
02115032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-6-
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

5. Coding and Program Documentation

Write and document the C code for the algorithm in Question 4. Assume all variables are already
declared.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
[21 marks]
GO ON TO THE NEXT PAGE
02115032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-7-
6. Trace Table

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
(a) The following code finds and displays the course with the highest number of registered
students. Complete the trace table. Assume that the maximum registration for each
course is 25 students.

courseID = “ ”
noRegistered= 0
highestNum= 0
courseTally = 0
maxCourseID= “ ”

WHILE MASTERCOURSE <> EOF DO


noRegistered = MASTERCOURSE_RECORD.noRegistered
courseID = MASTERCOURSE_RECORD.courseID
IF noRegistered > highestNum THEN
highestNum = noRegistered
maxCourseID = courseID
END IF
courseTally = courseTally + 1
NEXT MASTERCOURSE_RECORD
END WHILE
Print CourseTally, highestNum, maxCourseID

MF < > EOF noReg CourseTally CourseID noRegistered> highestNum maxCourseID Display
highestNum
0 0 - 0 -
15 1 Math01
5 2 Eng03
25 3 Span01

[5 marks]

GO ON TO THE NEXT PAGE


02115032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-8-
Documentation

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

7. Draw the hierarchy chart for the program given that the main module for the program will display the
menu as shown below. Assume that each menu option will make a call to a function.


COURSE REGISTRATION

1. View courses
2. Register for a course
3. De-register
4. Exit

[6 marks]

Total 60 marks

END OF TEST

IF YOU FINISH BEFORE TIME IS CALLED, CHECK YOUR WORK ON THIS TEST.

02115032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-9-
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

EXTRA SPACE

If you use this extra page, you MUST write the question number clearly in the box provided.

Question No.

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

02115032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 10 -

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
EXTRA SPACE

If you use this extra page, you MUST write the question number clearly in the box provided.

Question No.

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

021115032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
02115032/KMS/CAPE SPEC/2021

CARIBBEAN EXAMINATIONS COUNCIL

ADVANCED PROFICIENCY EXAMINATION

COMPUTER SCIENCE

UNIT 1 - PAPER 032

KEYS AND MARK SCHEME

SPECIMEN PAPER 2021


02115032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 032
KEY AND MARK SCHEME

CASE STUDY

A local community college wishes to automate the course registration


process whereby students register to undertake courses that are a part
of their degree programme. The college is seeking your assistance to
develop a user-friendly course registration system that can allow
students to register up to three courses.

The system will present a menu from which the student would be able to
view all courses, register for a course or de-register. To register, the
student should select the corresponding menu option and enter the course
ID. The system would use the master course file to show details such
as course ID, course name, lecturer, number of students already
registered and maximum number of participants allowed to register. If a
space is available, the student should input his/her student
identification number to register for the selected course. The relevant
system files would then be updated and a message sent to the student
indicating whether the course registration was successful.
02115032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 032
KEY AND MARK SCHEME

Identification of Specification [8 marks]

1. Describe FIVE functional requirements of the Case Study.

● Store student successful course registration


● Keep track of the students already registered
● System should send messages to students about
registration status (e.g. successfully registered or
not)
● System can retrieve information on who is the
lecturer/teacher of course and other details as
determined
● Allow students to register or deregister or view courses
● The system should show number of students already
registered.
(Any 5 * 1)
[5 marks]

2. List THREE non-functional requirements of the Case Study:

● system will be user-friendly,


● provide real-time updates
● any other appropriate response backup/recovery system/
availability of system

(Any 3 * 1)
[3 marks]
02115032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 032
KEY AND MARK SCHEME

Design [20 marks]

3. (a) Write the structure of the Master Course text file. Include
all the fields.
Master Course file (course ID, course name, lecturer,
maximum number of participants, number of candidates
registered)
3 marks for if Structure name and 4 or more fields included
2 marks for no Structure name and 4 or more fields included
1 mark for Structure name and less than 3 fields included
[3 marks]

(b) Show sample contents of the master Course text file using
THREE records.

ADM001 Mathematics Mr. Constantine 25 10


CHEM01 Chemistry Ms. Forrester 15 5
BUS101 Business Basics Mr. Roger 45 25

Using the candidates answer in part (a). NO penalty for formatting.


1 mark for 3 records

1 mark for correctly populating records

[2 marks]
02115032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 032
KEY AND MARK SCHEME

4. Design an algorithm (flowchart/pseudocode that would provide a


solution for the function registerCourse, which registers a
student for a course

Sample pseudocode given in mark scheme

Pseudocode
begin
enter courseID.
// check master course file and return course information
Call function findCourse.
Output course information
//Check for available space in course
If course space < maximum // 1 mark for IF-THEN-ELSE
Then UpdateCourse (to enter StudentID to course)
// update number of students registered for course)
updateMasterFile
Update numberOfCourses
Output ‘successful registration’
Else
Output ‘course full’
If numberOfCourses = 3 // 1 mark for IF-THEN-ELSE
Then output message
Else
loop to enter courseID search for another course
end
02115032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 032
KEY AND MARK SCHEME

Input CourseID 1
findCourse – use CourseID to check the 1
master course file and
output course course information 1
If available space, 2 (1 IF-THEN-ELSE; 1 condition)
(enter studentID)
Then updateCourse (course ID and 1
studentID to update the course file)
updateMasterFile - update number of 1
students registered for course in
master course file.
Update numberOfCourses 1
Display message on successful 1
registration.
Else If course is full 2 (1 IF-THEN-ELSE; 1 condition)
Then display ‘class full’ 1
Loop to register for a maximum of three 2
courses.
Correct indentation or correct symbols 1
15

(15 marks)
02115032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 032
KEY AND MARK SCHEME

Coding and Program Documentation (21 marks)

5. Write and document the C code for the algorithm in Question 4.


Assume all variables are already declared.

FUNCTION registerCourse()
BEGIN
count = 0 // initializing
variables
[1 mark]
choice = ”N”
DO // for
looping appropriately (1 mark)
PRINT “Enter course ID to register”
READ courseID // reading course ID [1 mark]
Course = findCourse(courseID) // call function[1 mark]
noRegistered = Course.noRegistered
maxParticipants = Course.maxParticipants
IF noRegistered < maxParticipants THEN // use of IF
statements (1 mark), condition [1 mark]
PRINT "Enter student ID"
READ studID // reading student ID
[1 mark]
noRegistered = noRegistered + 1 // increment the
students registered [1 mark]
count = count + 1 // incrementing the course
counter (1 mark)
updateCourse(courseID, studID) // function call
[1 mark]
02115032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 032
KEY AND MARK SCHEME

updateMasterFile( courseID, noRegistered ) //


function call (1 mark)

PRINT "Successful Registration for course",


Course.Name, “- Course ID:”, courseID // display
successful message
[1 mark]
ELSE
PRINT "Sorry, course is full" // display unsuccessful
message (1 mark)
END IF
PRINT “ Would you like to register for another course (Y/N)”
READ choice
WHILE choice == “Y” AND count < =3 // condition in the
while loop
[1 mark]
PRINT “Number of courses registered: “, count // displaying
number courses registered
[1 mark]
RETURN

(21 marks)
02115032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 032
KEY AND MARK SCHEME

An example of the C Code

void registerCourse()
{
count = 0;
choice = ‘N’; // or strcpy(choice, "No”);
do {
printf("Enter course ID to register: ");
scanf("%s", courseID);
Course = findCourse(courseID);
noRegistered = Course.noRegistered;
maxParticipants = Course.maxParticipants;
if (noRegistered < maxParticipants)
{
printf("Enter student ID");
scanf("%s", studID);
noRegistered = noRegistered + 1;
count = count + 1;
updateCourse(courseID, studID);
updateMasterFile(courseID, noRegistered);
printf("Successful Registration for course %s, %s",
Course.Name, courseID);
}
else
printf("Sorry, course is full");
printf(“ Would you like to register for another course
(Y/N)”);
scanf("%c", &choice);
02115032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 032
KEY AND MARK SCHEME

} while (choice == ‘Y’ && count <=3); //or while


(strcmp(choice,“YES”)==0 && count <=3);
printf (“Number of courses registered: %d", count);
}

Documentation (3 marks)

2 marks - white space and indentation

1 mark - comments
02115032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 032
KEY AND MARK SCHEME

Trace Table [5 marks]

6. The following code finds and displays the course with the highest
number of registered students. Complete the trace table. Assume
that the maximum registration of each course is 25 students.

courseID = “ ”
noRegistered= 0
highestNum= 0
courseTally = 0
maxCourseID= “ ”
WHILE MASTERCOURSE <> EOF DO
noRegistered = MASTERCOURSE_RECORD.noRegistered
courseID = MASTERCOURSE_RECORD.courseID
IF noRegistered > highestNum THEN
highestNum = noRegistered
maxCourseID = courseID
END IF
courseTally = courseTally + 1
NEXT MASTERCOURSE_RECORD
END WHILE
Print CourseTally, highestNum, maxCourseID
02115032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 032
KEY AND MARK SCHEME

MF <> noRe courseTa Course noRegistered highestNum maxCours Display


EOF g lly ID >highestNum eID

0 0 0

T 15 1 Math01 True 15 Math01

T 5 2 Eng13 False

T 25 3 Span01 True 25 Span01

F 3,25,Span01

(5 marks - 1 mark each correct row)

(5 marks)
02115032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 1 – Paper 032
KEY AND MARK SCHEME

Documentation [6 marks]

7 Draw the hierarchy chart for the program given that the main
module for the program will display the menu as shown below.
Assume that each menu option will make a call to a function

COURSE REGISTRATION
1. View courses
2. Register for a course
3. De-Register
4. Exit

All parts labelled correctly (5)


Hierarchy correct (1)
[6 marks]

Total 60 marks
TEST CODE 02215010
SPEC 2021/02215010
CARIBBEAN E XAM I NAT I O N S COUNCIL
CARIBBEAN ADVANCED PROFICIENCY EXAMINATION®
COMPUTER SCIENCE
SPECIMEN PAPER

UNIT 2 – Paper 01
1 hour 30 minutes

READ THE FOLLOWING INSTRUCTIONS CAREFULLY.

1. This test consists of 45 items. You will have 1 hour and 30 minutes to answer them.

2. In addition to this test booklet, you should have an answer sheet.

3. Do not be concerned that the answer sheet provides spaces for more answers than there are items
in this test.

4. Each item in this test has four suggested answers lettered (A), (B), (C), (D). Read each item
you are about to answer and decide which choice is best.

5. On your answer sheet, find the number which corresponds to your item and shade the space
having the same letter as the answer you have chosen. Look at the sample item below.

Sample Item

How many selection lines does an 8 × 1 multiplexer have?


Sample Answer

(A) 1 A B C D
(B) 2
(C) 3
(D) 8

The best answer to this item is “3”, so (C) has been shaded.

6. If you want to change your answer, erase it completely before you fill in your new choice.

7. When you are told to begin, turn the page and work as quickly and as carefully as you can. If
you cannot answer an item, go on to the next one. You may return to that item later.

8. You may do any rough work in this booklet.

9. Figures are not necessarily drawn to scale.

10. The use of silent, non-programmable calculators is allowed.

DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO.

Copyright © 2020 Caribbean Examinations Council


All rights reserved.

02215010/CAPE 2021/SPEC
-2-

1. Which abstract structure would be Items 5–6 are based on the following one-
implemented by the system to handle print dimensional array.
requests from users?
15 45 23 52 21 53
(A) Queue 0 1 2 3 4 5
(B) Array
(C) Stack 5. How many swaps of distinct numberes are
(D) Linked list performed if the array is reordered using a
selection sort process?

2. An ADT is (A) 0
(B) 2
(A) the logical properties of data (C) 3
(B) a combination of data types within (D) 4
a record
(C) a combination of data object and
associated operations 6. Which of the following numbers maintain
(D) a list of variables their original positions in the array if a
selection sort process is used to reorder the
array?
3. Which ADT is BEST described as a LIFO
structure? (A) All of the numbers are moved to
different positions
(A) A variable (B) 15, 23, 53
(B) A pointer (C) 15 alone
(C) A queue (D) 15, 53
(D) A stack
7. Which of the following combinations is a
stack operation?

Item 4 refers to the following diagram. (A) Enqueue; push


(B) Dequeue; pop
(C) Pop; enqueue
R D S A F C B (D) Push; pop

4. What will the array above look like after the


first three passes of selection sort?

(A) A B C R D S F

(B) A B C R F S D

(C) A B C D R S F

(D) A B C D F R S

GO ON TO THE NEXT PAGE


02215010/CAPE 2021/SPEC
-3-

Item 8 refers to the statements about the Items 11–12 refer to the following diagram.
following array.

8 9 4 5 6 9 2 NULL

I. The binary search cannot be


peformed on this array since 11. What is the abstract data type depicted above?
there are duplicate values.
II. Eight would be found after one (A) Stack
comparison using the binary (B) Queue
search. (C) Enum
III. The binary search cannot be (D) Linked list
performed since the list is
unordered.
12. Which of the following operations is
8. Which of the statements is/are true? associated with the ADT above?

(A) I only (A) Insert


(B) II only (B) Enqueue
(C) III only (C) Dequeue
(D) I and III only (D) Pop

9. Which of the following is true for BOTH 13. A circular queue is implemented with
a linear search and a binary search? pointer front and rear. Assuming that the
locations range from 1 to 4, what would
(A) On average they search half the list. the queue look like after the following
(B) In the worst-case scenario they operations?
search the entire list. 1. Insert job 1
(C) They can be used for searching an 2. Insert job 2
ordered list. 3. Insert job 3
(D) They require that the list be 4. Print job 1
ordered. 5. Insert job 4
6. Print job 2
7. Insert job 5
10. The binary search is BEST described as

(A) a search of only a section of a given


list of elements
(B) a search which takes a divide and
conquer approach
(C) being very fast when using a very
short list
(D) a search of un-order elements

GO ON TO THE NEXT PAGE


02215010/CAPE 2021/SPEC
-4-

14. A stack is implemented using an array. A 15. A queue is implemented using a one-
pointer top indicates the position at the top dimensional array. Which of the following
of the stack. What would be the state of BEST describes the dequeue operation
the stack after the following operations? performed using the array?

I. Initialize stack (A) Check that the queue is empty then


II. Push (Elaine) return the first element in the
III. Push (Howard) array and shift the remaining
IV. Pop stack elements up one place.
V. Push (Joanne) (B) Return the first element in the array
VI. Push (Tom) and shift the remaining elements
VII. Pop stack up one place.
(C) Check that the queue is not empty,
(A)
then return the first element in
the array and shift the remaining
elements up one place.
(D) Return the last element in the array.
Top Tom
Joanne
Howard
Elaine

(B)

Top Joanne
Howard
Elaine

(C)

Top Tom
Joanne
Elaine

(D)

Top Joanne
Elaine
GO ON TO THE NEXT PAGE
02215010/CAPE 2021/SPEC
-5-
Item 16 refers to the following scenario. 17. Which of the following is NOT an attribute
A doctor is assigned to one or more than of a well-engineered software product?
one patient on a specific ward. Attributes
of a patient include his/her patient ID and (A) Efficiency
information on his/her condition. The (B) Creativity
ward also has an ID. (C) Maintainability
(D) Appropriate documentation
16. Which of the ER diagrams below BEST
illustrates this information?
18. The MAIN goal of component testing is to

(A) expose faults in the components


(B) demonstrate that the system meets
its requirements
(C) increase the supplier’s confidence
that the system meets requirements
(D) test how one component interacts
with others in the system

19. Software evolution refers to

(A) improving software by addressing


bugs
(B) developing new software from an
existing system
(C) automatically adapting software
to changing customer needs and
wants
(D) modifying software to satisfy
changes in customer and market
requirements

20. Software that is NOT associated with the


wasting of resources is said to have the
property of

(A) reliability
(B) efficiency
(C) dependability
(D) acceptability

GO ON TO THE NEXT PAGE


02215010/CAPE 2021/SPEC
-6-

21. Which of the following is TRUE of 24. What are the TWO phases of the require-
the waterfall approach to the software ments engineering process (software speci-
development process? fication)?

I. Cascades from one phase of the (A) Feasibility study and user
process to another. and systems requirements
II. The following stage should not start documentation
before the previous has finished. (B) Feasbility study and production of
III. This approach caters to changing interface specification
user requirements. (C) Interface specification and data
structure specification
(A) I and II only (D) Sub-system testing and maintenance
(B) I and III only
(C) II and III only
(D) I, II and III 25. A feasibility study

(A) states a cost effective means of


22. Which of the following is NOT a phase in the developing the proposed system
software development life cycle? (B) discusses whether the proposed
system will be cost effective
(A) Design (C) is usually a lengthy and costly
(B) Analysis process
(C) Prototyping (D) outlines how current software and
(D) Implementation hardware can be used to develop
the proposed system

23. Which of the following are examples of non-


functional requirements?

I. Platform constraints
II. Reliability
III. Fault tolerance

(A) I and II only
(B) I and III only
(C) II and III only
(D) I, II and III

GO ON TO THE NEXT PAGE


02215010/CAPE 2021/SPEC
-7-
Item 26 refers to the following data flow diagram which utilizes the following symbols.

26. Which statement BEST describes the processing represented by the diagram?

(A) Create Invoice uses information from data store Customer Records and sends an Invoice
to Customer, and updates Product Records.
(B) A Customer requests an Invoice that is created by Create Invoice which in turn updates
Customer Records and Product Records.
(C) Create Invoice uses information from Customer Records and Product Records to produce
and send an Invoice to Customer.
(D) Create Invoice updates Customer Records and Product Records and sends an Invoice to
Customer.

27. Which of the following system models 28. Which of the following design processes
depict data transformation as data is pro- refers to the identification of subsystems
cessed? and their relationships?

(A) Entity–relationship diagrams (A) Data path


(B) Data flow diagrams (B) Component
(C) Data dictionaries (C) Architectural
(D) Class diagrams (D) Processor structure

GO ON TO THE NEXT PAGE


02215010/CAPE 2021/SPEC
-8-

29. Which of the following might NOT be 32. What kind of information is contained in a
output as a result of using a CASE tool? process control block?

(A) Prototype I. Amount of CPU time used


(B) Feasibility study II. Estimated time to complete
(C) Program definition III. Job priority
(D) Cost/benefit analysis
(A) I and II only
(B) I and III only
30. When the individual modules of a software (C) II and III only
system were tested, no errors were discovered. (D) I, II and III
However, when all the modules were merged
and tested, the system failed.
33. Which of the following statements is true
Which of the following would MOST likely about files and folders?
help in identifying the failure?
I. Folders may contain zero or more
(A) Acceptance testing files.
(B) Integration testing II. Files within folders must be related.
(C) Testing using live data III. File names within a folder must be
(D) Testing individual modules unique.

(A) I and II only


31. Which transmission media is BEST suited (B) I and III only
for the transfer of large volumes of data (C) II and III only
over continents? (D) I, II and III

(A) Fibre optic cables 34. Which of the following is NOT a process
(B) Coaxial cable state?
(C) Microwave
(D) Satellite (A) Completed
(B) Running
(C) Blocked
(D) Ready

GO ON TO THE NEXT PAGE


02215010/CAPE 2021/SPEC
-9-

35. Which of the following is NOT a method of 38. Which of the following is the BEST reason
securing files being transmitted on a network? for compressing a file?

(A) Compression (A) To encrypt the file to protect its


(B) Encryption contents
(C) Firewall (B) To make the file compatible with
(D) Password other applications and hardware
(C) To increase transmission time over
a network
Item 36 refers to the following statements. (D) To occupy less space on storage
media
I. Smaller computer systems
communicate with one another
through the host. 39. Which of the following user interfaces
II. A signal is broadcast to all the allows the user to navigate the interface,
nodes but only the destination making little use of the keyboard?
node responds to the signal.
III. A disadvantage of this topology (A) Menu-driven interface
is, if connection is broken, the (B) Graphical user interface
entire network stops working. (C) Objective driven interface
(D) Command-driven interface
36. To which network topologies does EACH
of the above statements refer?
40. Which protocol is used by web pages to
(A) I–STAR II–RING III–BUS transmit information?
(B) I–RING II –STAR III–BUS
(C) I–RING II –BUS III–STAR (A) HTTP
(D) I –STAR II –BUS III–RING (B) HTML
(C) FTP
(D) TCP/IP
37. Which layer of the OS model handles data
transmission between host computers?

(A) Network layer


(B) Transport layer
(C) Application layer
(D) Presentation layer

GO ON TO THE NEXT PAGE


02215010/CAPE 2021/SPEC
- 10 -

Items 41–42 refer to the following diagram. 43. Which of the following correctly represents
the mapping relationship between TCP/IP and
the OSI model?

(A) Ethernet, network layer


Y
(B) Ethernet, physical layer
X (C) TCP, presentation layer
(D) TCP, session layer

44. Which of the following systems processes


data received and produces immediate
41. The diagram above is an example of a results?

(A) star topology (A) Batch processing


(B) hybrid topology (B) Offline processing
(C) bus topology (C) Centralized processing
(D) FDDI (D) Real-time processing

42. Identify the items labelled X and Y 45. A running process initiates an input request
respectively. to get data from the keyboard. Which of the
following state transitions will take place
(A) Server and workstation when the data is made available?
(B) Workstation and node
(C) Server and hub (A) Ready to running
(D) Hub and node (B) Running to ready
(C) Blocked to ready
(D) Blocked to running

END OF TEST

IF YOU FINISH BEFORE TIME IS CALLED, CHECK YOUR WORK ON THIS TEST.

02215010/CAPE 2021/SPEC
CARIBBEAN EXAMINATIONS COUNCIL

SECONCARY EDUCATION CERTIFICATE


EXAMINATION

CAPE COMPUTER SCIENCE UNIT 2

SPECIMEN PAPER 2021

Item Key Syllabus Module Item Key Syllabus Module


No. Reference No. Reference
1 A 1.2 1 31 D 3.4 3
2 C 1.1 1 32 C 3.3 3
3 D 1.2 1 33 B 3.3 3
4 B 1.6 1 34 A 3.3 3
5 C 1.6 1 35 A 3.3 3
6 B 1.6 1 36 D 3.4 3
7 D 1.3 1 37 B 3.4 3
8 C 1.6 1 38 D 3.3 3
9 C 1.6 1 39 B 3.3 3
10 B 1.6 1 40 A 3.4 3
11 D 1.2 1 41 A 3.4 3
12 A 1.2 1 42 D 3.4 3
13 D 1.3 1 43 B 3.4 3
14 D 1.3 1 44 D 3.2 3
15 C 1.3 1 45 C 3.3 3
16 C 2.5 2
17 B 2.2 2
18 A 2.7 2
19 C 2.3 2
20 B 2.2 2
21 A 2.3 2
22 C 2.3 2
23 D 2.4 2
24 A 2.2 2
25 B 2.4 2
26 C 2.4 2
27 B 2.4 2
28 C 2.5 2
29 A 2.4 2
30 B 2.7 2

Module 1 – DATA STRUCTURES


Module 2 – SOFTWARE ENGINEERING
Module 3 – OPERATING SYSTEMS, COMPUTER NETWORKS AND ENTERPRISE SYSTEMS
TEST CODE 02215020
SPEC 2021/02215020
CARIBBEAN E XAM I NAT I O N S COUNCIL

CARIBBEAN ADVANCED PROFICIENCY EXAMINATION®

COMPUTER SCIENCE

SPECIMEN PAPER

FUNDAMENTALS OF COMPUTER SCIENCE

UNIT 2 – Paper 02

2 hours 30 minutes

READ THE FOLLOWING INSTRUCTIONS CAREFULLY.

1. This paper consists of SIX questions. Answer ALL questions.

2. Write your answers in the spaces provided in this booklet.

3. Do NOT write in the margins.

4. If you need to rewrite any answer and there is not enough space to do so on the
original page, you must use the extra lined page(s) provided at the back of this
booklet. Remember to draw a line through your original answer.

5. If you use the extra page(s) you MUST write the question number clearly in
the box provided at the top of the extra page(s) and, where relevant, include
the question part beside the answer.

DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO.

Copyright © 2020 Caribbean Examinations Council


All rights reserved.
‘‘*’’Barcode Area”*”
02215020/CAPE 2021/SPEC Sequential Bar Code
-2-

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
SECTION A

DATA STRUCTURES

Answer BOTH questions.

1. (a) Explain how a stack ADT is implemented.

.............................................................................................................................................

..............................................................................................................................................

.............................................................................................................................................

..............................................................................................................................................
[3 marks]

(b) A stack is required to store a set of characters. Assume that ‘top’ is global.

(i) Write a code to declare the variables that will be needed by the stack. Assume that
the stack size is 1000 characters.

.................................................................................................................................

.................................................................................................................................

.................................................................................................................................

.................................................................................................................................
[2 marks]

(ii) Write the function, using C code, that pushes a character, c, onto the stack. You
must cater for stack overflow.

.................................................................................................................................

.................................................................................................................................

.................................................................................................................................

.................................................................................................................................

.................................................................................................................................

.................................................................................................................................
[4 marks]

GO ON TO THE NEXT PAGE


02215021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-3-
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

(iii) Write the function, using C code, that pops a character from the stack. You must cater
for stack underflow.

....................................................................................................................................

....................................................................................................................................

....................................................................................................................................

....................................................................................................................................

....................................................................................................................................

....................................................................................................................................

....................................................................................................................................

....................................................................................................................................
[6 marks]

Total 15 marks

GO ON TO THE NEXT PAGE


02215021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-4-
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

2. (a) The following bubbleSort() function implements the bubble sort algorithm on an array of
integers.

void bubbleSort (int a[ ], int numItems)


{
int i, j, temp;

for (i=0; i<numItems−1; i++) {


for (j=0; j<numItems−i−1; j++) {
if (a [j] > a [j+1]) {
temp = a [j] ;
a [j] = a [j+1];
a [j+1] = temp;
}
}
}
}

(i) Explain the purpose of the outer ‘for’ loop.

....................................................................................................................................

....................................................................................................................................

....................................................................................................................................
[2 marks]

(ii) Explain carefully the process that occurs in the inner ‘for’ loop.

....................................................................................................................................

....................................................................................................................................

....................................................................................................................................

....................................................................................................................................

....................................................................................................................................
[3 marks]

GO ON TO THE NEXT PAGE


02215021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-5-
(iii) State why the upper limit for j in the inner ‘for’ loop is (numItems−i−1) and not

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
(numItems−1).

....................................................................................................................................

....................................................................................................................................
[1 mark]


(b) Write C code which performs a linear search on an array called ‘num’ containing
100 elements. Your code must check if the key is present by accepting an integer key
‘key’ from the user.

.............................................................................................................................................

..............................................................................................................................................

.............................................................................................................................................

..............................................................................................................................................

.............................................................................................................................................

..............................................................................................................................................

.............................................................................................................................................

..............................................................................................................................................

.............................................................................................................................................

..............................................................................................................................................

.............................................................................................................................................

..............................................................................................................................................
[9 marks]

Total 15 marks

GO ON TO THE NEXT PAGE


02215021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-6-

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
SECTION B

SOFTWARE ENGINEERING

Answer BOTH questions

3. (a) State ONE advantage and ONE disadvantage of the evolutionary approach to soft-
ware development.

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................
[2 marks]

GO ON TO THE NEXT PAGE


02215021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-7-
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

(b) A company receives an order from customers and an acknowledgement of receipt of


the order is sent to the customer. A check is then made for the availability of the items or-
dered. If there are items that are not in stock, the customer is informed and given the oppor-
tunity to cancel. If the order is not cancelled, the order is processed for the items that are in
stock. An internal order form is generated and used for processing payment and an invoice
is prepared and sent to the customer. The customer’s payment is received, verified and ac-
knowledged and a receipt is generated for the customer, after which the items delivered.

Draw a level one diagram DFD which demonstrates the operations taking place in the Order
Processing System.

[13 marks]

Total 15 marks

GO ON TO THE NEXT PAGE


02215021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-8-
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

4. (a) State THREE important considerations when conducting a feasibility study to develop
an application.

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................
[3 marks]

GO ON TO THE NEXT PAGE


02215021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-9-
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

(b) A certain university has a number of colleges. Each college has one or more depart-
ments. A lecturer is hired by one or more departments. A department can teach many
courses and a course can be taught by one or more lecturers. The following informa-
tion is stored on a course: code (primary key), name, credit hours.

Draw an entity–relationship (ER) model for the scenario above.

[12 marks]

Total 15 marks

GO ON TO THE NEXT PAGE


02215021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 10 -

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
SECTION C

OPERATING SYSTEMS AND COMPUTER NETWORKS

Answer BOTH questions.



5. (a) Batch systems, multi-programming systems, and multi-user systems were significant
developments in the history of operating systems. Briefly describe any TWO types of the
preceding operating systems.

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................


..............................................................................................................................................
[4 marks]

(b) A user is running a game on a computer. Indicate what situation would cause the game process
to move from

(i) ready to running


(ii) running to blocked.


..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................


..............................................................................................................................................
[4 marks]

GO ON TO THE NEXT PAGE


02215021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 11 -
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

(c) A user is playing a game that accesses a small file on a disk to get a high score. The game
processor reads the file, gets the value and uses it in the process itself.

Briefly explain how an interrupt is handled by the processor above.

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................
[4 marks]

(d) Briefly explain how the round-robin scheduling algorithm works.

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................


..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................


..............................................................................................................................................
[3 marks]

Total 15 marks

GO ON TO THE NEXT PAGE


02215021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 12 -
6. You are required to design a computer network. Briefly explain why network security and
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

interconnectivity should be considered when designing this network.

..............................................................................................................................................


..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................


..............................................................................................................................................
[4 marks]

(b) Select any TWO layers of the open system interconnection (OSI) model for computer com-
munication and describe the role EACH plays in data communication.

..............................................................................................................................................


..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................


..............................................................................................................................................
[4 marks]

GO ON TO THE NEXT PAGE


02215021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 13 -

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
(c) The following is a schema of a database for keeping track of Coronavirus test results in a
given country.

Patient (PatientID, FirstName, LastName, Address, DOB)


PatientTesting (TestID, PatientID, TestTypeID, TestDate, TestResult)
TestBatch (TestTypeID, TestName, Description)

Using the schema above, write an SQL query that return the names and address of all positive
cases, where TestResult contains the values ‘Positive’ or ‘Negative’.

..............................................................................................................................................


..............................................................................................................................................


..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................


..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................


..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................


..............................................................................................................................................

..............................................................................................................................................

[7 marks]

GO ON TO THE NEXT PAGE


02215021/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 14 -
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

(d) With the aid of a diagram, explain the role of a hub in a local area network.

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................


..............................................................................................................................................


..............................................................................................................................................
[3 marks]

Total 15 marks

END OF TEST

IF YOU FINISH BEFORE TIME IS CALLED, CHECK YOUR WORK ON THIS TEST.

02215020/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 15 -

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
EXTRA SPACE

If you use this extra page, you MUST write the question number clearly in the box provided.

Question No.

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

02215020/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 16 -
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

EXTRA SPACE

If you use this extra page, you MUST write the question number clearly in the box provided.

Question No.

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

02215020/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
02215020/KMS/CAPE SPEC/2021

CARIBBEAN EXAMINATIONS COUNCIL

ADVANCED PROFICIENCY EXAMINATION

COMPUTER SCIENCE

UNIT 2 - PAPER 02

KEYS AND MARK SCHEME

SPECIMEN PAPER 2021


2 02215020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 02
KEY AND MARK SCHEME

SECTION A

DATA STRUCTURES

Question 1

Specific Objectives: 1.1, 1.3, 1.4

(a)
An array can be used to store the elements (1). A top
pointer keeps track of the topmost elements of the stack
(1). When an element is added, top is incremented and
when an element is deleted, top is diverted (1).
[3 marks]

(b) (i) int top = (Candidates can use top = 0); (1)
char items [1000]; (1)
[2 marks]

(ii) void push (char c) (1)

{
(1)
if (top == 999)
printf (“Stack overflow.\n”);
else {
top++; (1)
items [top] = c; (1)
}
}
[4 marks]

(iii) char pop (char items[ ]) (1)


{

char c = ʽ ʽ; (1)
if (top == -1) (1)
printf (“Stack empty.\n”);
else {
c = items [top]; (1)
top --; (1)
}
return c; (1)
} [6 marks]

Total 15 marks
3 02215020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 02
KEY AND MARK SCHEME

Question 2

Specific Objectives: 1.6

(a) (i) The outer for loop is used to make numitems passes (1)
where each pass will result in one element of the array
being placed in its correct position.(1)

[2 marks]

(ii) It goes through the unsorted elements of the array


starting from the beginning and compares adjacent
elements. (1) If an element on the left is greater than
an element on the right, the elements are swapped using a
temporary variable. (1)

[3 marks]

(iii) Each pass of the outer for loop places the one element in
its correct position (starting from the right). So, the
inner for loop only considers the unsorted elements which
go from 0 to numItems-i-1
)

[1 mark]

(b)
int x;
for (x = 0; x < 100; x++)
if (num [x] == key) {
printf(“%d found at location %d”, key, x);
break;
}
if (x == 100)
printf(“Key Not found\n”);
[9 marks]

For or other repetition used (1)


Repetition limits correct (1)
If statement with key check (2) slight error (1)
Printed correct location where found(2) slight error(1)
Breaking out when found(1)
Printing not found correctly (2)slight error(1)

Total 15 marks
4 02215020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 02
KEY AND MARK SCHEME

SECTION B

SOFTWARE ENGINEERING

Question 3

Specific Objectives: 2.3, 2.4

(a) Advantage: Software can be developed incrementally (1) and


functionality can be made available to end users even though
the entire system is not yet finished (1). (Any 1)

Disadvantages: Systems are often poorly structured (1).

Continual change tends to corrupt the software structure (1).


(Any 1)
[2 marks]
5 02215020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 02
KEY AND MARK SCHEME

(b)
Internal Order Form

Process 1
Customer Order Process 2
Acknowledgment Sales
Order details
Warehouse
Item amount details
Financial details
Financial details

Invoice INVENTORY

Dispatch Instrucitons
Invoice
Dispatch Instructions
Process 4

Accounts
Process 3

Dispatch Instructions
Dispatch

Invoice details

INVOICE

Customer Entity: 1 mark


Data Stores: 1 mark
6 Processes: (1 each 6 marks
Dataflows: (15-13) 5 marks
(12-10) 4 marks
(9-7) 3 marks
(6-4) 2 marks
(3-1) 1 mark

[13 marks]
Total 15 marks
6 02215020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 02
KEY AND MARK SCHEME

Question 4

Specific Objectives: 2.3, 2.5

(a) Any THREE considerations: (1 mark for factor).

 Technical feasibility: investigating whether the technology


exists to implement the proposed system OR whether it is
even practical

 Economic feasibility: cost effectiveness of the proposed


system

 Legal feasibility: determines any legal issues which may


conflict with its implementation (e.g. protecting data)

 Operational feasibility: looks to determine if current work


practices and procedures are adequate for new system

Schedule feasibility: length of time for system to be


developed and implemented.
[3 marks]
7 02215020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 02
KEY AND MARK SCHEME

(b)
University

Contains

College

Contains

Department

Hires
code
Offers

name Course Lecturer


Teaches

credit
hours
8 02215020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 02
KEY AND MARK SCHEME

All five entities correctly drawn and labelled: 3 marks

3-4 entities correctly drawn and labelled: 2 marks


1-2 entities correctly drawn and labelled: 1 mark

Attributes of course correctly shown: 1 mark


Primary key of course (code) clearly shown: 1 mark

Five relationships between entities correctly drawn and labelled: 4 marks

Four relationships between entities correctly drawn and labelled:


3 marks
Three relationships between entities correctly drawn and labelled:
2 marks
1-2 relationships between entities correctly drawn and labelled: 1 mark

Correct cardinalities of five relationships: 3 marks

Correct cardinalities of 3-4 relationships: 2 marks


Correct cardinalities of 1-2 relationships: 1 mark

(12 marks)

Total 15 marks
9 02215020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 02
KEY AND MARK SCHEME

SECTION C

OPERATING SYSTEMS AND COMPUTER NETWORKS

Question 5

Specific Objectives: 3.2, 3.3

(a) Batch systems: A set of jobs are collected and


run in batch mode one after the other without
manual intervention. (1) Each job has all the
resources of the computer at its disposal when
it is run (1)

Multiprogramming systems: Memory is


partitioned into several pieces and a different
job is run in each partition. (1) This allowed
several jobs to be run simultaneously,
achieving greater throughput especially with
1/0 bound jobs. (1)

Multi-user systems: These systems enable many


different users to take advantage of the
computer’s resources simultaneously. (1) By
isolating users from each other, each user is
able to use the resources of the computer as if
they were completely dedicated to him/her. (1)

Any 2 x 2 = 4 [4 marks]

(b) (i) Processor can become available (1) so game


process gets to be run/executed. (1)

(ii) Game may be waiting on a particular device [4 marks]


(1) which is in use. (1)

(c) There is an i/o interrupt to access the disk


(1). The process has a context switch (1) at
that time. The file is read and then the CPU
is also interrupted (1) to continue the [4 marks]
previous process (1) OR
game is being played and it is in a running
state (1)game moves from running to waiting,
when the i/o interrupt occurs and reads the
file (1)game moves from waiting to ready on
completion of reading the file. (1)
game waits on instruction to return to
running state.(1)
[3 marks]
10 02215020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 02
KEY AND MARK SCHEME

(d) Each process is given a certain amount of CPU


time (a time slice) (1), and if it is not
finished by the end of the time slice, the
process is moved to the back of the process
queue (1), and the next process in line is
moved to the CPU (1) OR
game is being played and it is in a running
state (1)
game moves from running to waiting, when the
i/o interrupt occurs and reads the file (1)
game moves from waiting to ready on
completion of reading the file. (1) game
waits on instruction to return to running
state. (1)

Total 15 marks
11 02215020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 02
KEY AND MARK SCHEME

Question 6

Specific Objectives: 3.4, 3.5

(a) Network security concerns making sure that the network


is protected (1) from outside intrusion. (1)
[2 marks]

Interconnectivity concerns connecting the network with


other networks. (1) Issues such as compatibility with
the other networks are important. (1)
[2 marks]

(b) Network: routing packets (1), congestion control (1)

Data link: error control (1), communication between 2 nodes (1)

Physical: bits->cable signals. (1) How much volts is a 0/1. (1)

Transport: Breaks data into segments (1), error Control (1)

Session: controls the information for the sessions (1) and


the communication between applications (1)

Any two x 2 = [4 marks]


12 02215020 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 02
KEY AND MARK SCHEME

Question 6 cont’d

(c)

SELECT FirstName, LastName, Address


FROM Patient INNER JOIN PatientTesting ON Patient.PatientID =
PatientTesting.PatientID
WHERE PatientTesting.TestResult = Positive

1 mark for the SELECT clause and all correct fields


1 mark for the FROM clause and the correct table
1 mark for the INNER JOIN clause and the correct table
2 marks: 1 mark for ON clause and 1 mark for correct condition
2 marks: 1 mark for the WHERE clause and 1 mark for the
correct condition

[7 marks]

Total 15 marks
TEST CODE 02215032/SPEC
SPEC 2021/02215032
CARIBBEAN E XAM I NAT I O N S COUNCIL

CARIBBEAN ADVANCED PROFICIENCY EXAMINATION®

COMPUTER SCIENCE

SPECIMEN PAPER

UNIT 2 – Paper 032

2 hours

READ THE FOLLOWING INSTRUCTIONS CAREFULLY.

1. This paper consists of EIGHT questions.

2. Answer ALL questions.

3. Write your answers in the spaces provided in this booklet.

4. DO NOT write in the margins.

5. If you need to rewrite any answer and there is not enough space to do so on the
original page, two extra pages are provided at the back of this booklet. Remember
to draw a line through your original answer and correctly number your new
answer in the box provided.

6. If you use extra pages you MUST write your registration number and question
number clearly in the boxes provided at the top of EVERY extra page.

DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO.

Copyright © 2020 Caribbean Examinations Council


All rights reserved.
‘‘*’’Barcode Area”*”
02215032/CAPE 2021/SPEC Sequential Bar Code
-3-

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
Answer ALL questions.

CASE STUDY

A local community college wishes to automate the course management system to allow students to register
and pay for courses as part of their degree programme. A pre-registration process allows students to register
without any payment but still provides them with information concerning the payment needed. Actual
registration requires that payment be made at the time of registration.

At early registration, students must enter a course identification number for the course they wish to enter,
from a menu. The menu shows ALL the courses in the program along with the course identification
number, the registration limit and availability. Students will register and be given payment information
and the deadline for payment. They must make payments before the end of the actual registration period. A
student registering during the registration period is expected to pay the tuition at the point of registration.
The system is to inform students of the estimated tuition cost for all registered courses and the mandatory
ancillary fee of $5 500. The tuition cost per course is $10 500.

The system should allow students to view the list of available courses in a particular programme, register
for a maximum of three courses, given that the course limit has not been reached, and drop courses. A
message is to be sent to students regarding their approval status for the course. Information on the tuition
fees is updated by the billing department so that invoices can be generated. A lecturer for a particular
course is also able to view the list of registered students. If a student adds or drops a course before the
registration deadline has passed, the estimated tuition cost for the student should be updated.

Specification of Requirements

1. State THREE likely problems in the manual course registration processes that led to the proposal of
new system requirements.

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................
[3 marks]

GO ON TO THE NEXT PAGE


02215032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-4-
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

2. (a) List THREE functional requirements of the case study.

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................
[3 marks]

(b) State ONE non-functional requirement of the case study.

..............................................................................................................................................

..............................................................................................................................................
[1 mark]

3. State THREE techniques that the system analyst’s team would have used to determine the require-
ments for the course management system.

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................
[3 marks]

GO ON TO THE NEXT PAGE


02215032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-5-

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
4. Students can register for several courses at the community college. Lecturers are assigned to one or
more courses and any student can enroll in a course.

Draw an entity–relationship (ER) diagram. On your diagram, show all relationships, primary keys
and cardinalities based on the statement above.
[15 marks]

GO ON TO THE NEXT PAGE


02215032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-6-

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
Design Specifications

5. Identify the MOST appropriate interface design for the system in the case study. Justify your
response.

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................
[2 marks]

GO ON TO THE NEXT PAGE


02215032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-7-
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

6. Assuming that the registration data concerning a student is placed in a queue called EarlyRP, write a
pseudocode that will identify ALL students who have registered early for their courses and have paid
in full, and place these individuals in a queue called EarlyPaid. The students who have not paid or who
have not paid in full, should be placed in a queue called EarlyToBeProcessed. The data which is to be
placed in the queue EarlyRP is as follows:

- Student Identification Number


- Total Fee
- Amount Paid
- Balance Owing

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................

.........................................................................................................................................................
[15 marks]

GO ON TO THE NEXT PAGE


02215032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-8-
Coding and Testing

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
7. (a) Write a structure named oQueue which represents a queue. oQueue contains an array of 200
elements of type oStructure which stores the information below as well as an index to the head
and the tail.

typedef struct studentpayment{


int StudentID;
float TotalFee;
float AmountPaid;
float BalanceOwing;
char RegistrationType
} oStructure;
..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................
[6 marks]

(b) Write an ENQUEUE function that will receive oQueue and oStructure as parameters as stated
in Part (a) above.

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................

..............................................................................................................................................
[8 marks]
GO ON TO THE NEXT PAGE
02215032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
-9-
DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  

8. Using information stored for the payment (EarlyRP) in Question 6, complete the table below for each
data type by giving an example of a variable and appropriate test data.

Data Type Variable Names Appropriate Test Data


Text

Real

[4 marks]

Total 60 marks

END OF TEST

IF YOU FINISH BEFORE TIME IS CALLED, CHECK YOUR WORK ON THIS TEST.

02215032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 10 -

DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA      DO NOT WRITE IN THIS AREA  
EXTRA SPACE

If you use this extra page, you MUST write the question number clearly in the box provided.

Question No.

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

...........................................................................................................................................................................

02215032/CAPE 2021/SPEC
‘‘*’’Barcode Area”*”
Sequential Bar Code
02215032/KMS/CAPE SPEC/2021

CARIBBEAN EXAMINATIONS COUNCIL

ADVANCED PROFICIENCY EXAMINATION

COMPUTER SCIENCE

UNIT 2 - PAPER 032

KEYS AND MARK SCHEME

SPECIMEN PAPER 2021


2

02215032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 032
KEY AND MARK SCHEME

CASE STUDY

A local community college wishes to automate the course management


system to allow students to register and pay for courses as part of
their degree programme. A pre-registration process allows students
to register without any payment but still provides them with
information concerning the payment needed. Actual registration
requires that payment be made at the time of registration.

At early registration, students must enter a course identification


number for the course they wish to enter, from a menu. The menu shows
ALL the courses in the program along with the course identification
number, the registration limit and availability. Students will
register and be given payment information and the deadline for
payment. They must make payments before the end of the actual
registration period. A student registering during the registration
period is expected to pay the tuition at the point of registration.
The system is to inform students of the estimated tuition cost for
all registered courses and the mandatory ancillary fee of $5 500.
The tuition cost per course is $10 500.

The system should allow students to view the list of available courses
in a particular programme, register for a maximum of three courses,
given that the course limit has not been reached, and drop courses.
A message is to be sent to students regarding their approval status
for the course. Information on the tuition fees is updated by the
billing department so that invoices can be generated. A lecturer for
a particular course is also able to view the list of registered
students. If a student adds or drops a course before the registration
deadline has passed, the estimated tuition cost for the student should
be updated.
3

02215032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 032
KEY AND MARK SCHEME

Specification of Requirements [25 marks]

1. State THREE likely problems in the manual course registration


processes that led to the proposal of new system requirements.
● The availability of spaces may not have been updated in real-time
leading to more persons registering for a course than the maximum
number of spaces
● A student may have been allowed to register beyond the
registration deadline leading to confusion
● There may have been instances where a student was allowed to drop
a course after the registration deadline
● Tuition costs may have been miscalculated if courses were dropped
after the registration deadline
● Incorrect billing information could have been sent to the Billing
department based on incorrect tuition calculation
● Students may not have been informed of their approval status in a
timely manner
● Lecturers may not have been able to view approved list of
students
(Any other appropriate response 3 X 1)
[3 marks]

2. (a) List THREE functional requirements of the Case Study.

● Allow students to register for up to three courses


● Allow the Registrar to add courses to the course
catalogue
● Allow the Registrar to drop courses from the course
catalogue
● Allow students to view a list of available courses
● Allow students to drop a course
● System should check availability of spaces for
registration of a course
● System should inform students of estimated tuition costs
after registration
● Allow the Registrar to approve students for courses
● System should send a message to students regarding
approval for undertaking courses
● System should send information to the Billing department
for the generation of invoices
4

02215032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 032
KEY AND MARK SCHEME

● Allow lecturers to view list of students approved to


undertake courses
● Backup/recovery system/availability of system
(Any 3 X 1)
[3 marks]
(b) State ONE non-functional requirement of the Case Study

● system will be user-friendly, will not allow students to


change information for another student
● provide real-time updates
[1 mark]

3. State THREE techniques that the system analyst’s team would have
used to determine the requirements for the course management system.
● Review of existing documentation - reports, forms or descriptions
of procedures - to gather information about the current state of
the system
● Interviews with relevant users of the manual system - to gather
information about the current state of the system and to gather
opinions about the new system
● Observation and documentation of business processes - to gather
information about the current state of the system
● Questionnaires - to gather information about the current state of
the system and to gather opinions about the new system
● Reviewing other course management systems.
(Any 3 X 1)
[3 marks]
5

02215032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 032
KEY AND MARK SCHEME

4. Students can register for several courses at the community college.


Lecturers are assigned to one or more courses and any student can
enroll in a course.
Draw an entity-relationship (ER) diagram. On your diagram, show all
relationships, primary keys and cardinalities based on the statement
above.

3 entities (Student, Course, Lecturer) - 3 marks


2 Relationships (Registers, Lecturers) - 2 marks
4 Cardinalities - 4 marks
3 Primary keys - 3 marks
Correct use of symbols (entities, relationships, attributes)- 3 marks
[15 marks]
6

02215032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 032
KEY AND MARK SCHEME

Design Specifications (17 marks)

5. Identify the MOST appropriate interface design for the system in the
Case study. Justify your response.

Graphic User Interface.


o User-friendly
o Short learning curve to use the system
o Uses menu/W.I.M.P.
[2 marks]

6. Assuming that the registration data concerning a student is placed in


a queue called EarlyRP, write a pseudocode that will identify ALL
students who have registered early for their courses and have paid in
full and place these individuals in a queue called EarlyPaid. The
students who have not paid or not paid in full should be placed in
the queue called EarlyToBeProcessed. The data which is to be placed
in the queue EarlyRP is as follows:

 Student Identification Number


 Total Fee
 Amount Paid
 Balance Owing

BEGIN

WHILE EarlyRP is not empty DO

TempStruct = dequeue ( EarlyRP )

IF TempStruct. Balance Owing = 0 or Amount Paid = Total Fee THEN

IF EarlyPaid is not full THEN


Enqueue (EarlyPaid, TempStruct)
ELSE
PRINT “This queue is full”
7

02215032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 032
KEY AND MARK SCHEME

ENDIF
ELSE
IF EarlyToBeProcessed is not full THEN
Enqueue ( EarlyToBeProcessed, TempStruct)
ELSE
PRINT “This queue is full”
ENDIF
ENDIF
ENDWHILE
END

The BEGIN and END - 1 mark


WHILE loop - 2 marks (WHILE -1 and ENDWHILE -1)
1st ENQUEUE - 2 marks (name and two arguments)
2nd ENQUEUE - 2 marks (name and two arguments)
DEQUEUE - 2 marks (name and one argument)

IF STATEMENT (checking for the early payment)- 2 marks (IF -2 and ELSE
- 1)
IF STATEMENT (checking for the queue is full - 2 marks (IF -2 and ELSE
- 1)
PRINT STATEMENTS 2 marks (two print statements - 1 mark each)

[15 marks]
8

02215032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 032
KEY AND MARK SCHEME

Coding and Testing (18 marks)

7. (a) Write a queue named oQueue which is a structure that


contains an array that stores the information of the
structure given below as well as an index to the head and the
tail.

typedef struct studentpayment{


int StudentID;
float TotalFee;
float AmountPaid;
float BalanceOwing;
char RegistrationType
} oStructure;

Example
// STRUCTURE OF QUEUE
typedef struct QUEUE{ // 1 mark
int head; // 1 mark
int tail; // 1 mark
oStructure queue [200]; // 1 mark correct data
type, 1 mark array
} oQueue; // 1 mark

[6 marks]
9

02215032 KMS/SPEC/2021

COMPUTER SCIENCE
UNIT 2 – Paper 032
KEY AND MARK SCHEME

(b) Write an ENQUEUE function for oQueue and oStructure as


parameters stated in Part (a) above.
int ENQUEUE ( oQueue EP, oStructure TS){ // 3 marks
if ( isFull ( EP ) ){ // 2 marks
printf (“The Queue is Full and there will be no more
additions”); // 1 mark
return 0;
}
EP.tail = EP.tail + 1; // 1 mark
EP.queue [ EP.tail].
return 1; // 1 mark
}
[8 marks]
8. Using information stored for the payment (EarlyRP) in Question 6,
complete the table below for each data type by giving an example of
a variable and appropriate test data.

Data Type Variable Names Appropriate Test Data

Text Student ID 12456

Real Balance owing, amount 2500


paid, total fee

[4 marks]

Total 60 marks
Caribbean Examinations Council
Prince Road, Pine Plantation Road,
St Michael BB11091
Tel: (246) 227 1700
Email: [email protected]

You might also like