You are on page 1of 461

ADNAN SALEEM

University of Cambridge International Examinations 9608


(Cambridge Assessment International Education)

A2 Level Paper 4
Computer Science
Paper 4: Further Problem-solving and
Programming Skills

Topical Practice Book


Including
 Questions from 2005-2017
 Mark Scheme
 May and November Both Sessions and Variants
 CAIE Latest Syllabus Attached
 Example Candidate Response for P4 (High-Medium-Low)

ADNAN SALEEM
Exclusively Available at
STUDENTS RESOURCE® ANEES BOOK CORNER
Shop 23-24, A.B Height Plaza Main Market Gulberg
Basement Faysal Bank,
Near Toyota Motors Airport, Lahore NEW & OLD BOOK SHOP
0321/320-4567519 / 0423-5700707 Opp. Punjab Bank, H-DHA,Ph-I

STUDENTS RESOURCE® BOOKTOWN


Opp. Beaconhouse JT Branch. G1 Market Johar Town
PIA Society, Shadewal Chowl, For Country-wide Home Delivery Visit us at:
Johar Town Lahore www.studentsresource.net
0313-4567519 / 0423-522 7007 Or Call us at: 0321-4567519 / 03134567519
Book Title: CAIE A2 Level Computer Science 9608 Classified Paper 4 (Topical Question & MS)
Code 1164
Compiler: Adnan Saleem (03224125423 / aqsaleem@gmail.com)

Published by: STUDENTS RESOURCE® Airport Road Lahore


Designed By: M. Rehan Tahir 0323-4567 519
Edition: 2018-19
Syllabus CAIE 2018-2022
Price: 795/-

---------------------------------------------------------------------------
All Rights Reserved.
This Book or Parts thereof may not be reproduced in an form, stored in any retrieval system, or
transmitted in any form by any means – electronic, mechanical, photocopy, recording, or otherwise-
without prior written permission of the STUDENTS RESOURCE® Airport Road (publisher)
---------------------------------------------------------------------------
NOTICE (warning)
NO FURTHER NOTICE (Legal Warning) WOULD BE ISSUED FOR THIS PURPOSE.

A CATALOGUE RECORD FOR THIS PUBLICATION IS SUBMITTED AND AVAILABLE


in IPO (Intellectual Property Organization of Pakistan)
---------------------------------------------------------------------------
Questions were taken with thanks from
CIE Examinations and it is the property of Cambridge University.

Legal Advisor
Salik Aziz Vaince
M.Sc. LLB.
Advocate High Court
CEO Vaince Law
Chamber
Visiting Lecturer of Law

Write a comment…….
Your feedback is warmly welcomed. Feel free to suggest us for improvements if you have any
comments; kindly send us at aqsaleem@gmail.com or +923224125423.
The Author
Topic 23 Computational Thinking & Problem-Solving ……. 5
Topic 24 Algorithm Design Methods ……………………….. 93
Topic 25 Recursion ……………………………………………161
Topic 26 Further Programming…………………………….. 173
Topic 27 Object-Oriented Programming (OOP) ………… 199
Topic 28 Low level Programming …………………………..293
Topic 29 Declarative Programming.………………………. 343
Topic 30 Software Development ……………………………365
CAIE Latest Syllabus Content……………………………………389
Example Candidate Responses for P4 ……………………….. 401
Topic 23
Computational Thinking &
Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

5
AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 1

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 6 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 7 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 8 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 9 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 2

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 10 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 11 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 12 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 13 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 3

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 14 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 15 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 16 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 4


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 17 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 18 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 19 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 20 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 5


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 21 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 22 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 6


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 23 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 24 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 25 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 7

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 26 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 27 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 28 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 29 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 8

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 30 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 31 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 32 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 33 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 9

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 34 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 35 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 36 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 37 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 38 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 10


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 39 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 40 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 41 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 42 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 43 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 44 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 11


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 45 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 46 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 47 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 48 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 49 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 50 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 12


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 51 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 52 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 53 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 54 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 55 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 13

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 56 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 57 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 58 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 59 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 60 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 61 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 62 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 63 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 14

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 64 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 65 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 15

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 66 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 67 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 68 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 69 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 70 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 71 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 72 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 73 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 16

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 74 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 75 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 76 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 77 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 78 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 17


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 79 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 80 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 81 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 82 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 18


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 83 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 84 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

QUESTION # 19


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 85 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION

QUESTION # 20

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 86 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 87 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 88 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 89 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 90 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 23: Computational Thinking & Problem-Solving


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 91 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
1

EM
LE
SA
AN
N
AD

92
AS Computer Science Paper 4
1

Topic 24
Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

93
AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

QUESTION # 1

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 94 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

SOLUTION

QUESTION # 2


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 95 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 96 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 97 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 98 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

QUESTION # 3


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 99 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 100 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

QUESTION # 4


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 101 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 102 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 103 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 104 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

QUESTION # 5


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 105 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 106 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 107 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 108 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 109 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

QUESTION # 6

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 110 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 111 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 112 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 113 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 114 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 115 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 116 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 117 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 118 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 119 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

QUESTION # 7

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 120 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 121 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 122 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

QUESTION # 8


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 123 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 124 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 125 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 126 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 127 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 128 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 129 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 130 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 131 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 132 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 133 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 134 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 135 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

QUESTION # 9

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 136 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 137 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 138 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 139 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 140 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 141 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 142 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 143 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 144 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 145 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 146 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 147 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

QUESTION # 9

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 148 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 149 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

QUESTION # 10

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 150 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 151 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 152 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 153 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

QUESTION # 11

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 154 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

SOLUTION

QUESTION # 12


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 155 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

SOLUTION
EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 156 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 157 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

QUESTION # 13

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 158 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 24: Algorithm Design Methods

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 159 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
1

EM
LE
SA
AN
N
AD

160
AS Computer Science Paper 4
1

Topic 25
Recursion


RC
U
SO
RE
TS
N
DE
U
ST

161
AS Computer Science Paper 4
A2 1 Topic 25: Recursion

QUESTION # 1

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 162 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 25: Recursion


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 163 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 25: Recursion

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 164 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 25: Recursion


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 165 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 25: Recursion

QUESTION # 2

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 166 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 25: Recursion

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 167 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 25: Recursion

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 168 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 25: Recursion

QUESTION # 3


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 169 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 25: Recursion

SOLUTION

QUESTION # 4

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 170 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 25: Recursion

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 171 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1

EM
LE
SA
AN
N
AD

172
AS Computer Science Paper 4
A2 1

Topic 26
Further Programming


RC
U
SO
RE
TS
N
DE
U
ST

173
AS Computer Science Paper 4
A2 1 Topic 26: Further programming

QUESTION # 1

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 174 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 175 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 176 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

QUESTION # 2


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 177 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 178 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 179 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 180 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 181 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

QUESTION # 3

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 182 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 183 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 184 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 185 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 186 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

QUESTION # 4


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 187 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 188 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 189 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 190 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

QUESTION # 5


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 191 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 192 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 193 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 194 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

QUESTION # 6


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 195 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 196 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 26: Further programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 197 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
1

EM
LE
SA
AN
N
AD

198
AS Computer Science Paper 4
1

Topic 27
Object-Oriented Programming
(OOP)


RC
U
SO
RE
TS
N
DE
U
ST

199
AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

QUESTION # 1

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 200 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 201 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 202 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 203 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 204 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

QUESTION # 2


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 205 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 206 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 207 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 208 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 209 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

QUESTION # 3

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 210 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 211 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 212 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 213 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 214 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

QUESTION # 4


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 215 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 216 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 217 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

QUESTION # 5

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 218 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 219 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 220 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 221 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

QUESTION # 6

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 222 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 223 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 224 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 225 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 226 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 227 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 228 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 229 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 230 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 231 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 232 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 233 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 234 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 235 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 236 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 237 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

QUESTION # 7

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 238 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 239 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 240 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 241 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 242 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 243 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 244 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 245 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 246 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 247 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 248 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 249 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 250 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 251 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

QUESTION # 8

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 252 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 253 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 254 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 255 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 256 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 257 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

QUESTION # 9

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 258 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 259 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

QUESTION # 10

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 260 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

QUESTION # 11


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 261 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 262 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 263 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 264 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 265 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 266 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

QUESTION # 12


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 267 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 268 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 269 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 270 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 271 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 272 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 273 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

QUESTION # 13

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 274 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 275 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

QUESTION # 14

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 276 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 277 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 278 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 279 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 280 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 281 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 282 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 283 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 284 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N

QUESTION # 15
DE
U
ST

aqsaleem@gmail.com 285 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 286 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 287 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 288 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)
SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 290 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 291 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic: 27 Object-oriented programming (OOP)

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 292 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1

Topic 28
Low level Programming


RC
U
SO
RE
TS
N
DE
U
ST

293
AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

QUESTION # 1

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 294 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 295 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 296 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 297 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 298 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

QUESTION # 2


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 299 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 300 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 301 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

QUESTION # 3

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 302 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 303 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 304 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

QUESTION # 4


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 305 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 306 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 307 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

QUESTION # 5

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 308 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 309 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 310 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

QUESTION # 6


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 311 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 312 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 313 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 314 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 315 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

QUESTION # 7

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 316 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 317 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 318 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 319 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 320 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

QUESTION # 8


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 321 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 322 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 323 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 324 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 325 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 326 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 327 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 328 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 329 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

QUESTION # 9

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 330 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 331 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 332 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 333 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 334 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 335 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 336 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 337 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

QUESTION # 10


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 339 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming

QUESTION # 11

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 340 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 28: Low level programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 341 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1

Topic 29
Declarative Programming


RC
U
SO
RE
TS
N
DE
U
ST

343
AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

QUESTION # 1

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 344 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 345 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

QUESTION # 2

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 346 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 347 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

QUESTION # 3

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 348 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 349 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 350 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

QUESTION # 4


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 351 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 352 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 353 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

QUESTION # 5

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 354 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 355 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 356 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

QUESTION # 6


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 357 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 358 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

QUESTION # 7


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 359 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 360 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

SOLUTION

QUESTION # 8


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 361 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 362 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 363 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 29: Declarative programming

QUESTION # 9

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 364 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1

Topic 30
Software Development


RC
U
SO
RE
TS
N
DE
U
ST

365
AS Computer Science Paper 4
A2 1 Topic 30: Software development

QUESTION # 1

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 366 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 367 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 368 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 369 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

QUESTION # 2

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 370 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 371 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 372 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

QUESTION # 3


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 373 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 374 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 375 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 376 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

QUESTION # 4


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 377 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

SOLUTION

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 378 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

QUESTION # 5

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 379 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

QUESTION # 6

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 380 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 381 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

QUESTION # 7

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 382 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 383 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

QUESTION # 8

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 384 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

SOLUTION


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 385 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

QUESTION # 9

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 386 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 387 Sir Adnan Saleem (0322-4125423)


AS Computer Science Paper 4
A2 1 Topic 30: Software development

SOLUTION

QUESTION # 10

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 388 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses

SYLLABUS
Cambridge International AS and A Level
Computer Science

9608
For examination in June and November 2017, 2018 and 2019

Changes to syllabus for 2017, 2018 and 2019

This syllabus has been updated. The latest version is version 2, published May 2016.

Changes have been made to page 36, 3.5.4 Malware


The first bullet now reads:
3.5.4 Malware
• show understanding of malware: viruses, spyware, worms, phishing, pharming

Significant changes to the syllabus are indicated by black vertical lines either side of the text.

You are strongly advised to read the whole syllabus before planning your teaching
programme.


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 389 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses

3. Syllabus content at a glance

Section Topics

Section 1 1.1 Information representation


Theory Fundamentals 1.1.1 Number representation
1.1.2 Images
1.1.3 Sound
1.1.4 Video
1.1.5 Compression techniques
1.2 Communication and Internet technologies
1.2.1 Networks
1.2.2 IP addressing
1.2.3 Client- and server-side scripting
1.3 Hardware
1.3.1 Input, output and storage devices
1.3.2 Main memory
1.3.3 Logic gates and logic circuits
1.4 Processor fundamentals
1.4.1 CPU architecture
1.4.2 The fetch-execute cycle
1.4.3 The processor’s instruction set
1.4.4 Assembly language
1.5 System software
1.5.1 Operating system
1.5.2 Utility programs
1.5.3 Library programs
1.5.4 Language translators
1.6 Security, privacy and data integrity
1.6.1 Data security
1.6.2 Data integrity
1.7 Ethics and ownership
EM

1.7.1 Ethics
1.7.2 Ownership
LE

1.8 Database and data modelling


1.8.1 Database Management Systems (DBMS)
SA

1.8.2 Relational database modelling


1.8.3 Data Definition Language (DDL) and Data Manipulation
AN

Language (DML)
N
AD

aqsaleem@gmail.com 390 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses

Section 2 2.1 Algorithm design and problem-solving


Fundamental 2.1.1 Algorithms
Problem-solving and
2.1.2 Structure chart
Programming
2.1.3 Corrective maintenance
2.1.4 Adaptive maintenance
2.2 Data representation
2.2.1 Data types
2.2.2 Arrays
2.2.3 Files
2.3 Programming
2.3.1 Programming basics
2.3.2 Transferable skills
2.3.3 Selection
2.3.4 Iteration
2.3.5 Built-in functions
2.3.6 Structured programming
2.4 Software development
2.4.1 Programming
2.4.2 Program testing
2.4.3 Testing strategies


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 391 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses

Section 3 3.1 Data representation


Advanced Theory 3.1.1 User-defined data types
3.1.2 File organisation and access
3.1.3 Real numbers and normalised floating-point representation
3.2 Communication and Internet technologies
3.2.1 Protocols
3.2.2 Circuit switching, packet switching and routers
3.2.3 Local Area Networks (LAN)
3.3 Hardware
3.3.1 Logic gates and circuit design
3.3.2 Boolean algebra
3.3.3 Karnaugh Maps
3.3.4 Flip-flops
3.3.5 RISC processors
3.3.6 Parallel processing
3.4 System software
3.4.1 Purposes of an operating system (OS)
3.4.2 Virtual machine
3.4.3 Translation software
3.5 Security
3.5.1 Asymmetric keys and encryption methods
3.5.2 Digital signatures and digital certificates
3.5.3 Encryption protocols
3.5.4 Malware
3.6 Monitoring and control systems
3.6.1 Overview of monitoring and control systems
3.6.2 Bit manipulation to monitor and control devices

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 392 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses

Section 4 4.1 Computational thinking and problem-solving


Further Problem-solving 4.1.1 Abstraction
and Programming Skills
4.1.2 Algorithms
4.1.3 Abstract Data Types (ADT)
4.1.4 Recursion
4.2 Algorithm design methods
4.2.1 Decision tables
4.2.2 Jackson Structured Programming (JSP)
4.2.3 State-transition diagrams
4.3 Further programming
4.3.1 Programming paradigms
Low-level programming
Imperative programming
Object-oriented programming
Declarative programming
4.3.2 File processing
4.3.3 Exception handling
4.3.4 Use of development tools / programming environments
4.4 Software development
4.4.1 Stages of software development
4.4.2 Testing
4.4.3 Project management


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 393 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses

4. Assessment at a glance

For Cambridge International AS and A Level Computer Science, candidates may choose:
• to take Papers 1, 2, 3 and 4 in the same examination series, leading to the full Cambridge International
A Level
• to follow a staged assessment route by taking Papers 1 and 2 (for the AS Level qualification) in one
series, then Papers 3 and 4 (for the full Cambridge International A Level) in a later series
• to take Papers 1 and 2 only (for the AS Level qualification).

Components Weighting (%)


AS A

Paper 1 Theory Fundamentals 50 25


This written paper contains short-answer and structured questions.
There is no choice of questions.
75 marks
Externally assessed 1 hour 30 minutes
Paper 2 Fundamental Problem-solving and Programming Skills 50 25
This written paper contains short-answer and structured questions.
There is no choice of questions.
Topics will include those given in the pre-release material.1
75 marks
Externally assessed 2 hours
Paper 3 Advanced Theory – 25
This written paper contains short-answer and structured questions.
There is no choice of questions.
75 marks
Externally assessed 1 hour 30 minutes
Paper 4 Further Problem-solving and Programming Skills – 25
This written paper contains short-answer and structured questions.
There is no choice of questions.
Topics will include those given in the pre-release material.1
75 marks
Externally assessed 2 hours
EM

Advanced Subsidiary (AS) forms 50% of the assessment weighting of the full Advanced (A) Level.
LE

1
SA

1
On receipt of estimated entry forms by the required date stated in the Administrative Guide, the
pre-release material for Paper 2 and Paper 4 will be made available to Centres the January before
AN

the June examination, and the July before the November examination. The material will be sent in hard
copy form. When the material has been received, it should be shared with the relevant teachers in the
Centre and issued to candidates immediately, as teachers and candidates need the material to prepare for
N

the examinations. Candidates are not permitted to bring any prepared material into the examination.
AD

aqsaleem@gmail.com 394 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses

5.3 Relationship between assessment objectives and components


The approximate weightings allocated to each of the assessment objectives are summarised below.

Assessment objective Paper 1 Paper 2 Paper 3 Paper 4 AS Level A Level


(%) (%) (%) (%) (%) (%)

AO1 Knowledge with understanding 20 5 20 5 50 50

AO2 Skills 5 20 5 20 50 50

6. Syllabus content

Annual technical updates


Technical updates will be published each year to take account of emerging technologies relevant to
the Syllabus content. Please refer to the updates page for this syllabus on the Cambridge website
http://www.cie.org.uk/9608 for the relevant year of examination.

This syllabus is set out in the form of teaching sections. Each teaching section is assessed by its associated
paper. The AS Level syllabus consists of teaching Sections 1 and 2 only, and the A Level syllabus consists of
all four teaching sections.

The subject content for each section is shown below.

Syllabus Paper Section title


content
section

1 1 Theory Fundamentals

2 2 Fundamental Problem-solving and Programming Skills

3 3 Advanced Theory

4 4 Further Problem-solving and Programming Skills


RC
U

Each section is presented as a set of sub-sections, each with details of content and associated learning
SO

outcomes.
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 395 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses

Section 4 Further problem-solving and programming skills


4.1 Computational thinking and problem-solving
Candidates should be able to:

4.1.1 Abstraction
• show understanding of how to model a complex system by only including essential details, using:
– functions and procedures with suitable parameters (as in procedural programming, see
Section 2.3)
– ADTs (see Section 4.1.3)
– classes (as used in object-oriented programming, see Section 4.3.1)
– facts, rules (as in declarative programming, see Section 4.3.1)

4.1.2 Algorithms
• write a binary search algorithm to solve a particular problem
• show understanding of the conditions necessary for the use of a binary search
• show understanding of how the performance of a binary search varies according to the number of
data items
• write an algorithm to implement an insertion sort
• write an algorithm to implement a bubble sort
• show understanding that performance of a sort routine may depend on the initial order of the data
and the number of data items
• write algorithms to find an item in each of the following: linked list, binary tree, hash table
• write algorithms to insert an item into each of the following: stack, queue, linked list, binary tree,
hash table
• write algorithms to delete an item from each of the following: stack, queue, linked list
• show understanding that different algorithms which perform the same task can be compared by
using criteria such as time taken to complete the task and memory used

4.1.3 Abstract Data Types (ADT)


• show understanding that an ADT is a collection of data and a set of operations on those data
• show understanding that data structures not available as built-in types in a particular programming
language need to be constructed from those data structures which are built-in within the language
TYPE <identifier1>
DECLARE <identifier2> : <data type>
DECLARE <identifier3> : <data type>
EM


ENDTYPE
LE

• show how it is possible for ADTs to be implemented from another ADT


• describe the following ADTs and demonstrate how they can be implemented from appropriate
SA

built-in types or other ADTs: stack, queue, linked list, dictionary, binary tree
AN
N
AD

aqsaleem@gmail.com 396 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses

4.1.4 Recursion
• show understanding of the essential features of recursion
• show understanding of how recursion is expressed in a programming language
• trace recursive algorithms
• write recursive algorithms
• show understanding of when the use of recursion is beneficial
• show awareness of what a compiler has to do to implement recursion in a programming language

4.2 Algorithm design methods


Candidates should be able to:

4.2.1 Decision tables


• describe the purpose of a decision table
• construct a decision table for a given problem with a maximum of three conditions
• simplify a decision table by removing redundancies

4.2.2 Jackson Structured Programming (JSP)


• construct a JSP structure diagram showing repetition
• construct a JSP structure diagram showing selection
• write equivalent pseudocode from such structure charts
• construct a JSP structure diagram to describe a data structure
• construct a JSP data structure diagram:
– using sequence
– using selection
– using iteration
• construct a JSP diagram for a program design

4.2.3 State-transition diagrams


• use state-transition diagrams to document an algorithm
• use state-transition diagrams to show the behaviour of an object E®
RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 397 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses

4.3 Further programming


Candidates should already have practical experience of the content in Section 2.3 Programming. Candidates
should be able to:

4.3.1 Programming paradigms


• show understanding of what is meant by a programming paradigm
• show understanding of the characteristics of a number of programming paradigms (low-level,
imperative (procedural), object-oriented, declarative)
– low-level programming
○ demonstrate an ability to write low-level code that uses various address modes:
immediate, direct, indirect, indexed and relative (see Section 1.4.3 and Section 3.6.2)
– imperative programming
○ see details in Section 2.3 (procedural programming)
– object-oriented programming (OOP)
○ demonstrate an ability to solve a problem by designing appropriate classes
○ demonstrate an ability to write code that demonstrates the use of classes, inheritance,
polymorphism and containment (aggregation)
– declarative programming
○ demonstrate an ability to solve a problem by writing appropriate facts and rules based on
supplied information
○ demonstrate an ability to write code that can satisfy a goal using facts and rules

4.3.2 File processing (see also Section 2.2.3)


• write code to define a record structure
• write code to perform file-processing operations: open or close a file; read or write a record to a
file
• use pseudocode for random file handling:
OPENFILE <filename> FOR RANDOM
SEEK <filename>, <address> // move a pointer to the disk address for the record
GETRECORD <filename>, <identifier>
PUTRECORD <filename>, <identifier>
• write code to perform file-processing operations on serial, sequential and random files

4.3.3 Exception handling


• show understanding of an exception and the importance of exception handling
EM

• show understanding of when it is appropriate to use exception handling


• write code to use exception handling in practical programming
LE

4.3.4 Use of development tools / programming environments


SA

• describe features in editors that benefit programming


• know when to use compilers and interpreters
AN

• describe facilities available in debuggers and how and when they should be deployed
N
AD

aqsaleem@gmail.com 398 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses

4.4 Software development


Candidates should be able to:

4.4.1 Software development resources


• show understanding of the possible role of program generators and program libraries in the
development process

4.4.2 Testing
• show awareness of why errors occur
• show understanding of how testing can expose possible errors
• appreciate the significance of testing throughout software development
• show understanding of the methods of testing available: dry run, walkthrough, white-box,
black-box, integration, alpha, beta, acceptance
• show understanding of the need for a test strategy and test plan and their likely contents
• choose appropriate test data (normal, abnormal and extreme/boundary) for a test plan

4.4.3 Project management


• show understanding that large developments will involve teams
• show understanding of the need for project management
• show understanding of project planning techniques including the use of GANTT and Program
Evaluation Review Technique (PERT) charts
• describe the information that GANTT and PERT charts provide
• construct and edit GANTT and PERT charts


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 399 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses

7. Description of components

7.1 Scheme of assessment


Each examination paper will consist of a variable number of short-answer and structured questions of
variable mark value. Candidates must answer all questions. Candidates will answer on the question paper.

Calculators are not allowed in these papers.

Paper 1 Theory Fundamentals


This is a compulsory paper consisting of questions set on Section 1 of the syllabus.

Paper 2 Fundamental Problem-solving and Programming Skills


This is a compulsory paper consisting of questions set on Section 2 of the syllabus.

Paper 3 Advanced Theory


This is a compulsory paper consisting of questions set on Section 3 of the syllabus.

Paper 4 Further Problem-solving and Programming Skills


This is a compulsory paper consisting of questions set on Section 4 of the syllabus.

The assessment is by written papers, but the learning should be done in a mainly practical way: problem-
solving and programming. Questions will require the candidate to think, use knowledge with understanding
and demonstrate understanding gained through practising practical skills.

7.2 Paper 2 and Paper 4 Problem-solving and Programming Skills


pre-release material
The pre-release material for Paper 2 and Paper 4 will be made available to Centres the January before the
June examination and the July before the November examination. Centres are advised to encourage their
candidates to develop solutions to tasks using a high-level programming language. Centres must choose a
high-level programming language from this list: Visual Basic (console mode), Pascal/Delphi (console mode)
or Python. The purpose of the pre-release material tasks is to direct candidates to some of the topics which
will be examined in Paper 2 and Paper 4. Teachers are expected to incorporate these tasks into their lessons
and give support in finding methods and reaching solutions. Questions will be included that test candidates’
understanding gained from developing programmed solutions to these tasks. The tasks will be appropriate
for all ability levels.

The examination questions will require candidates to have practical programming experience, including
EM

writing their own programs, executing (running), testing and debugging them. Candidates are to be
encouraged to extend their practical programming beyond the scope of these tasks.It is appreciated that in
LE

an examination, candidates will not have access to a compiler, interpreter or any other aid to writing correct
syntax. Therefore, minor syntax errors in candidates’ programs will be ignored.
SA
AN
N
AD

aqsaleem@gmail.com 400 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses

Example Candidate Responses

In order to help us develop the highest quality Curriculum Support resources, we are
undertaking a continuous programme of review; not only to measure the success of our
resources but also to highlight areas for improvement and to identify new development needs.

Cambridge International AS & A Level


Computer Science

9608

Paper 4


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 401 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Paper 4 – Further Problem-solving and Programming Skills


Question 1

Mark scheme

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 402 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – high

Examiner comment – high


Here the candidate correctly labelled the states. The possible events when the turnstile is in the locked state
are correctly identified. The candidate did not appreciate that from the unlocked state there can’t be the
same event resulting in two different states. The event ‘attempt to insert coin’ was not identified.

Total marks awarded = 4 out of 5



RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 403 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – middle

Examiner comment – middle


The candidate correctly labelled the states and the events that result in a different state. The events that do
not change the current state were applied to the wrong states.

Total marks awarded = 3 out of 5


EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 404 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – low

Examiner comment – low


The candidate correctly labelled the states, noting that the turnstile starts in the locked state, as given in the
introduction of the question. However, the candidate did not appreciate that the arrows in the diagram
represent events.

Total marks awarded = 1 out of 5



RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 405 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Question 2

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 406 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Question 2, continued

Mark scheme


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 407 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – high

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 408 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Examiner comment – high


In part (a) the candidate converted the given facts correctly into clauses, taking care to show that atoms and
predicates are written with a lower case first letter.

In part (b) the candidate knew that the variable ‘ThisCity’ would instantiate first to London and then to
Manchester.

In part (c) the candidate realised that the clauses ‘city_visited’ and ‘city_in_country’ are needed to find out
which countries the travel writer has visited. The candidate also realised that variables were required.
However, the variables for ‘city_in_country’ were not in the correct order as the second variable represents
the country and therefore needs to match the variable used in the head of the rule. The response then
continues as an imperative IF statement rather than the required declarative statement making a rule.

Marks awarded for part (a) = 4/4


Marks awarded for part (b) = 2/2
Marks awarded for part (c) = 2/4

Total marks awarded = 8 out of 10

Example candidate response – middle


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 409 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Examiner comment – middle


In part (a) the candidate converted the given facts correctly into clauses. However, the response does not
clearly show that atoms and predicates are written with a lower case first letter.

In part (b) the candidate knew that the variable ‘ThisCity’ would instantiate first to London and then to
Manchester.

In part (c) the candidate realised that the clauses ‘city_visited’ and ‘city_in_country’ are needed to find out
which countries the travel writer has visited. The candidate also realised that variables were required.
However, the response is written as an imperative IF statement rather than the required declarative
statement representing a rule.

Marks awarded for part (a) = 3/4


Marks awarded for part (b) = 2/2
Marks awarded for part (c) = 1/4
EM

Total marks awarded = 6 out of 10


LE
SA
AN
N
AD

aqsaleem@gmail.com 410 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – low


RC
U
SO
RE
TS
N

Candidate script = 654551214


DE

(file name or centre & candidate number or Scoris/Assessor ID)


U
ST

aqsaleem@gmail.com 411 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Examiner comment – low


In part (a) the candidate converted the given facts correctly into clauses. However, the response clearly
shows the atoms written with an upper case first letter.
In part (b) the candidate correctly stated that the variable ‘ThisCity’ would instantiate to London. The
candidate did not appear to be aware that the variable could instantiate to other atoms when testing the
remainder of the knowledge base.
In part (c) the candidate responded with an imperative IF statement using some of the facts in the knowledge
base, but this is not a rule for a declarative program.
Marks awarded for part (a) = 3/4
Marks awarded for part (b) = 1/2
Marks awarded for part (c) = 0/4

Total marks awarded = 4 out of 10

Question 3

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 412 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Question 3, continued


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 413 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Mark scheme

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 414 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Mark scheme, continued


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 415 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – high

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 416 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – high, continued


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 417 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Examiner comment – high


In part (a) the candidate correctly ticked just one action for each combination of conditions.

In part (b) the candidate was able to distinguish which conditions could not be simplified. When the condition
that goods totalled more than $20 was not satisfied then all other conditions were irrelevant and so could be
replaced by a dash. So the candidate correctly replaced the four final columns in part (a) by just one column,
removing redundancies.

In part (c) the candidate used Visual Basic to answer this part. The function header included the parameters
but did not show the data type for the return value of the function. The candidate did not appreciate that a
local variable of the same name as the function is not possible. The candidate tried to deal with the last
column of the answer in part (b) first but did not realise that the opposite to testing for GoodsTotal > 20 is in
fact testing for GoodsTotal <= 20. The candidate used nested IF statements to some extent, but could have
improved on this rather than writing complex conditions involving AND.

Marks awarded for part (a)= 4/4 Marks awarded for part (b)= 5/5 Marks awarded for part (c) = 3/6
Total marks awarded = 12 out of 15
Example candidate response – middle

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 418 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – middle, continued


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 419 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Examiner comment – middle


In part (a) the candidate identified the correct actions when the goods totalled more than $20, but did not
appreciate that as soon as the goods do not total more than $20 no discount is given.
In part (b) the candidate recognised some of the conditions which could not be simplified, but did not notice
that when goods do not total more than $20 then all other conditions are irrelevant as no discount is given.
In part (c) the candidate used Python to answer this part. The code is correctly indented and the nested IF
statements correctly formed. This suggests practical programming experience. The function header correctly
showed the parameters but the function body does not return a result. The question stated that the
parameter HasDiscountCard is Boolean. However, the candidate handles the parameter values as though
they were character values Y or N. The candidate does not check whether the goods total is over $20 but
less than or equal to $100.

Marks awarded for part (a)= 3/4 Marks awarded for part (b)= 3/5 Marks awarded for part (c) = 2/6
Total marks awarded = 8 out of 15

Example candidate response – low

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 420 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – low, continued


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 421 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Examiner comment – low


In part (a) the candidate identified the correct actions when the goods totalled more than $20, but did not
appreciate that as soon as the goods do not total more than $20 no discount is given.

In part (b) the response is a deduction from part (a). However, the candidate needed to check whether this
answer makes sense. The question stated that discount is only given when goods total more than $20. So
completing the first row with the ‘don’t care’ symbol is clearly incorrect.

In part (c) the candidate used Python to answer this part. The function header correctly showed the
parameters and the function body returns the calculated result. The question stated that the parameter
HasDiscountCard is Boolean. However, the candidate handles the parameter values as though they were
character values Y or N. The candidate does not check whether the goods total is over $20 but less than or
equal to $100.

Marks awarded for part (a) = 3/4


Marks awarded for part (b) = 0/5
Marks awarded for part (c) = 2/6

Total marks awarded = 5 out of 15

Question 4

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 422 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 423 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Mark scheme

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 424 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Mark scheme, continued

Example candidate response – high


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 425 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 426 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4
Examiner comment – high
In part (a) the candidate correctly drew the superclass and the two subclasses, and connected each
subclass to the superclass. The candidate did not complete the inheritance diagram showing the relationship
with an arrow pointing from the subclass to the superclass.
In part (b) the candidate should have stated the programming language as VB.Net in the first line of the
answer space. The candidate shows excellent knowledge of how to declare a superclass.
In parts (c)(i) and (ii) the candidate correctly states the extra properties required for the subclasses
HourlyPaidEmployee and SalariedEmployee but does not state the additional methods required.
In part (d) the candidate recognised that the feature used here is polymorphism.
Marks awarded for part (a) = 2/3 Marks awarded for part (c) = (i) 2/4, (ii) 1/2
Marks awarded for part (b) = 5/5 Marks awarded for part (d) = 1/1
Total marks awarded = 11 out of 15
Example candidate response – middle


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 427 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – middle, continued

Examiner comment – middle


In part (a) the candidate correctly drew the superclass and the two subclasses, and connected each
subclass to the superclass. The candidate did not complete the inheritance diagram showing the relationship
with an arrow pointing from the subclass to the superclass. The inclusion of the properties is not required for
an inheritance diagram.

In part (b) the candidate displayed some knowledge of how to declare a class in VB.Net. The class heading
and ending is correct and one method is provided, although three methods were required as part of the
question. The properties of a class should be declared using the keyword Private rather than Dim.

In parts (c)(i) and (ii) the candidate correctly states the extra properties required for the subclasses
HourlyPaidEmployee and SalariedEmployee. The candidate also realised that the method CalculatePay
needs to be redeclared for each of the subclasses.

In part (d) by stating ‘overriding’ the candidate demonstrates some understanding of what the question is
asking but this is not the correct term required here.

Marks awarded for part (a) = 2/3


Marks awarded for part (b) = 2/5
EM

Marks awarded for part (c) = (i) 3/4, (ii) 2/2


Marks awarded for part (d) = 0/1
LE

Total marks awarded = 9 out of 15


SA
AN
N
AD

aqsaleem@gmail.com 428 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – low


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 429 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – low, continued

Examiner comment – low


In part (a) the candidate correctly drew the superclass and the two subclasses, and connected each
subclass to the superclass. The candidate did not complete the inheritance diagram showing the relationship
with an arrow pointing from the subclass to the superclass. The inclusion of properties and methods is not
required for an inheritance diagram.

In part (b) the candidate does not appear to have any knowledge of how to declare a class in VB.Net. The
answer given here is an attempt at the declaration of a record. The keyword Dim is not appropriate here.

In parts (c)(i) and (ii) the candidate included the properties required for the subclasses HourlyPaidEmployee
and SalariedEmployee as well as the inherited properties which did not need listing here. The candidate
misinterpreted the term ‘method’ and described how the calculation of pay should be performed rather than
giving the identifier of the subclass methods required.

In part (d) the candidate provides an object-oriented programming term that applies to all classes, not the
required term for methods that behave differently for different subclasses.

Marks awarded for part (a) = 2/3


EM

Marks awarded for part (b) = 1/5


Marks awarded for part (c) = (i) 2/4, (ii) 1/2
Marks awarded for part (d) = 0/1
LE

Total marks awarded = 6 out of 15


SA
AN
N
AD

aqsaleem@gmail.com 430 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Question 5


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 431 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Question 5, continued

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 432 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Question 5, continued


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 433 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Mark scheme

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 434 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – high


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 435 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – high, continued

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 436 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – high, continued

Examiner comment – high


In parts (a)(i) and (ii) the candidate demonstrates excellent understanding of the insertion sort algorithm. The
only inaccuracy is that the second condition for the WHILE loop would terminate the loop too early. The
candidate correctly recognises that the WHILE loop will not execute at all when the NameList is already in
order. However, the fact that the FOR loop will execute 9 times regardless of the state of NameList is not
mentioned.

In part (b)(i) the response here is not very clear. The candidate needs to state that each FOR loop will
RC

execute 9 times as they are not dependent on any condition. In part (b)(ii) the candidate demonstrates
excellent understanding of how a bubble sort operates and where changes are possible to improve
U

efficiency. The candidate realises that the outer loop can be changed to a conditional loop, so it terminates
SO

when there are no more changes, and the inner loop does not need to examine every element every time.
RE

With each iteration of the outer loop, another element will be in its correct position and therefore the upper
value of the FOR loop can be decreased.
TS

Marks awarded for part (a) = (i) 6/7, (ii) 2/3


N

Marks awarded for part (b) = (i) 1/2, (ii) 5/5


DE

Total marks awarded = 14 out of 17


U
ST

aqsaleem@gmail.com 437 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – middle

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 438 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – middle, continued


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 439 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – middle, continued

Examiner comment – middle


In part (a)(i) the candidate demonstrates very good understanding of the insertion sort algorithm. There is
some confusion over which pointer to use when moving a list item to the correct location. In part (a)(ii) the
candidate correctly recognises that the WHILE loop will not execute at all when the NameList is already in
order and that the FOR loop will execute nine times regardless of the state of NameList.
EM

In parts (b)(i) and (ii) the candidate appears to have some understanding that for each iteration of the outer
LE

loop the inner loop is executed a set number of times. The misunderstanding that each loop iterates 8 times
rather than 9 times results in the answer of 64 rather than a total of 81 iterations. The candidate realised that
one way of making efficiency gains is to restrict the number of times the inner loop iterates for each iteration
SA

of the outer loop.

Marks awarded for part (a) = (i) 5/7, (ii) 3/3


AN

Marks awarded for part (b) = (i) 0/2, (ii) 2/5

Total marks awarded = 10 out of 17


N
AD

aqsaleem@gmail.com 440 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – low


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 441 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – low, continued

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 442 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – low, continued

Examiner comment – low


In part (a)(i) the candidate clearly understands that the FOR loop needs to iterate once for every list item
except the first one. The complex condition of the WHILE loop is correct although the candidate is not clear
how to move a list item to the next location. The candidate seems unaware that although Pointer is set to
one less than ThisPointer before the WHILE loop, the value of Pointer changes within the WHILE loop.

Therefore, when moving the contents of Temp to the correct location, (Pointer +1) must be used as index,
not ThisPointer. In part (a)(ii) the candidate understands that the WHILE loop is not entered when NameList
RC

is in order, although the explanation is a little too vague. The candidate recognises that the FOR loop will
always iterate 9 times.
U
SO

In parts (b)(i) and (ii) the candidate states that the inner FOR loop iterates 9 times. This is true, but it will do
so for each of the 9 times that the outer FOR loop iterates. The candidate seems to be unaware of this.
RE

Consequently the revised pseudocode is not an improved solution for the bubblesort algorithm. The only
th
difference to the original pseudocode is that the inner loop does not address the 9 element. This means that
TS

the last element will not necessarily be in the correct position.


N

Marks awarded for part (a) = (i) 4/7, (ii) 2/3


DE

Marks awarded for part (b) = (i) 1/2, (ii) 0/5


U

Total marks awarded = 7 out of 17


ST

aqsaleem@gmail.com 443 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Question 6

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 444 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Question 6, continued


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 445 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Question 6, continued

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 446 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Question 6, continued


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 447 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Mark scheme

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 448 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Mark scheme, continued


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 449 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – high

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 450 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – high, continued


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 451 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – high, continued

Examiner comment – high


In part (a) the candidate used the work space to write the items in the queue at different points. The answer
in the node shapes shows the correct names. However, the nodes have not been given labels, so it is open
to interpretation that the pointer values point to the correct nodes. The candidate correctly shows the final
node containing the name Jatinder with a null pointer. There are no pointers to show where the head and tail
of the queue are.

In part (b)(i) when the CreateQueue operation has been carried out, the queue is empty and all nodes are
part of the free list. The candidate correctly links all nodes with a null pointer in the final node. FreePointer
EM

correctly points to the first node in the free list and HeadPointer is the null pointer. However, as there is no
queue content, the tail pointer should also be a null pointer.In part (b)(ii) the candidate understands that
testing for an empty queue means testing for HeadPointer to be the null pointer. The candidate correctly
LE

initialises CurrentPointer and updates HeadPointer by following the pointer of the current node. The
candidate does not appreciate that if the last name in the queue has just been removed the head pointer
would now be null and therefore the tail pointer would also need to be set to null. Linking the released node
SA

to the free list means linking it to the front of the list that FreePointer is pointing to. The candidate correctly
updates FreePointer, but the released node is not linked to the front of the free list.
AN

Marks awarded for part (a) = 2/3


Marks awarded for part (b) = (i) 3/4, (ii) 5/6
N

Total marks awarded = 10 out of 13


AD

aqsaleem@gmail.com 452 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – middle


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 453 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – middle, continued

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 454 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – middle, continued

Examiner comment – middle


(a) Enter your examiner comment here

In part (a) the candidate used the work space to draw the nodes in the queue at different points. The answer
in the node shapes shows the correct names and the pointers point to the correct nodes. The final node
containing the name Jatinder should have a null pointer. There are no pointers to show where the head and
tail of the queue are.

In part (b)(i) when the CreateQueue operation has been carried out, the queue is empty and all nodes are
part of the free list. The candidate correctly links all nodes. However, the final node does not contain a null
pointer but points back to the beginning of the free list. FreePointer correctly points to the first node in the

free list. However, HeadPointer and TailPointer should be null pointers as there is no queue content. In part
(b)(ii) the candidate understands that testing for an empty queue means testing for HeadPointer to be the
RC

null pointer. The candidate correctly initialises CurrentPointer and updates HeadPointer by following the
pointer of the current node. The candidate does not appreciate that if the last name in the queue has just
U

been removed the head pointer would now be null and therefore the tail pointer would also need to be set to
SO

null. The candidate does not demonstrate that linking the released node to the free list means linking it to the
front of the list that FreePointer is pointing to, so the pointer of the released node and FreePointer need to be
RE

updated.
TS

Marks awarded for part (a) = 1/3


Marks awarded for part (b) = (i) 2/4, (ii) 4/6
N
DE

Total marks awarded = 7 out of 13


U
ST

aqsaleem@gmail.com 455 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – low

EM
LE
SA
AN
N
AD

aqsaleem@gmail.com 456 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses

Example candidate response – low, continued


RC
U
SO
RE
TS
N
DE
U
ST

aqsaleem@gmail.com 457 Sir Adnan Saleem (0322-4125423)


A2 Computer Science Paper 4 Syllabus and Example Candidate Responses
Paper 4

Example candidate response – low, continued

Examiner comment – low


In part (a) the candidate used the work space to draw the nodes in the queue at different points. The answer
in the node shapes shows the correct names and the pointers point to the correct nodes. The final node
containing the name Jatinder should have a null pointer. There are no pointers to show where the head and
tail of the queue are.

In part (b)(i) when the CreateQueue operation has been carried out, the queue is empty and all nodes are
part of the free list. The candidate correctly links all nodes with a null pointer in the final node. FreePointer
correctly points to the first node in the free list and HeadPointer is a null pointer. However, as there is no
queue content, the tail pointer should also be a null pointer. The candidate seems to assume that if
FreePointer points to the first node in the array, the queue must be empty. This is true when the queue is
first initialised, but may not be true after names have been added and removed. In part (b)(ii), in a queue
EM

ADT, the node accessed for removal is always at the head of the queue, the candidate here wrongly uses
CurrentPointer, which does not yet have a value. The candidate correctly updates HeadPointer by following
LE

the pointer of the current node, but does not appreciate that if the last name in the queue has just been
removed the head pointer would now be null and therefore the tail pointer would also need to be set to null.
The candidate does not demonstrate that linking the released node to the free list means linking it to the front
SA

of the list that FreePointer is pointing to, so the pointer of the released node and FreePointer need to be
updated.
AN

Marks awarded for part (a) = 1/3


Marks awarded for part (b) = (i) 3/4, (ii) 1/6
N

Total marks awarded = 5 out of 13


AD

aqsaleem@gmail.com 458 Sir Adnan Saleem (0322-4125423)


Price List
CIE O Level Rs:
Accounts Paper 1 Topical Unsolved 595
Accounts Paper 2 Topical Unsolved 950
Add Math Notes by Rafique Akhtar Baloch 750
Business Studies Notes Mazhar Munir 450
Business Studies Topical Solved by Asif Iqbal 850
Biology Notes by Rasheed Akhtar Chattha 350
Biology Topical Paper 1 by Rasheed Akhtar Chattha 695
Biology Topical Paper 2 by Rasheed Akhtar Chattha 950
Biology Topical Paper 6 by Rasheed Akhtar Chattha 680
Biology Notes by Iram Habib Malik 280
Biology Notes by Hamza Fayyaz (Coloured) 945
Chemistry by Niaz Ahmad Awan (Coloured) 945
Chemistry Topical Paper 1 by Niaz Ahmad Awan 550
Chemistry Topical Paper 2 by Niaz Ahmad Awan 850
Chemistry by Umar Zaman Khattak 550
Computer Scienec Notes by Fawad Khan 300
Commerce Notes by Liaqat Ali Qadri 250
Economics Notes by Amina Imtiaz 350
Environmental Management Notes by Sh. Azam Siddique 450
Islamiyat Notes by Sh. Azam Siddique 350
Islamiyat Notes by Zafar Iqbal 450
Islamiyat Paper 1 & Paper 2 Topical Solved by Azam Siddique 450
Mathematics Notes & Practice Book by Usman Aslam Baig 750
Mathematics Paper 1 & Paper 2 Topical Unsolved by Jawad Saeed 995
Mathematics Notes by Rafique Akhtar Baloch 750
Mathematics Notes by Abid Mahmood Togervi 650
Mathematics Paper 1 Topical Solved Both Variants by Afzal Ahmad 900
Mathematics Paper 2 Topical Solved Both Variants by Afzal Ahmad 900
Pakistan Studies History Notes by Azam Siddique 250
Pakistan Studies Geography Notes by Azam Siddique 450
Pakistan Studies History Notes by Zafar Iqbal 300
Pakistan Studies Geography Notes by Zafar Iqbal 350
Pakistan Studies Geography Solved Topical 2005-17 By Shakil Anwar 750
Pakistan St. History / Geography Notes by Rana Adnan Mahmood 1000
Physics Notes by Abdul Hakeem 350
Physics Topical Paper 1 43 Self Test with Answer by Shahzad Zia 950
Physics Topical Paper 1 by Abdul Hakeem 550
Physics Topical Paper 2 by Abdul Hakeem 850
Physics Topical Paper 4 by Afzal Ahmad 550
Exclusively available at
KARACHI LAHORE
 AL-KITAB CENTRE  STUDENTS RESOURCE®
21-A, Urdu Bazar 23-24, A.B Height Plaza
021-32626747 Adjacent Faysal Bank, New Airport Road,
Opp. Toyota Motors, Lahore
SIALKOT 0321-4567519 / 0423-5700707
 CANTT BOOK CENTRE
Chowk Ghanta Ghar, Cantt.
052-34297886  STUDENTS RESOURCE®
Opp. BSS Johar Town Campus Johar Town
PESHAWAR 0313-4567519 / 0423-522 7007
 AYESHA ACADEMY®
Hayatabad Road, Peshawar  ANEES BOOK CORNER
Main Makret Gulberg
Home Delivery 04235758683
(Cash on Delivery Service Available In)
 MULTAN  OLD AND NEW BOOK SHOP
Opp. Punjab Bank,
 BAHAWAPUR
H-Block ,DHA Ph-1
 SAHIWAL
 GULJRANWALA
 BOOK TOWN
 KARACHI G1 Market, Johar Town
 QUETTA 042-35316355

For order: please call at: Stay update with new series
0321-4567519 / 0320-4567519 www.fb.me/students.resource
0313-4567519 / 0323-4567519
Or visit us at
www.studentsresource.net
Price List A Level
CIE A Level Rs:
Accounts Paper 1 Topical Unsolved 595
Accounts Paper 2 Topical Unsolved 950
Accounts Paper 3 Topical Unsolved 850
Business Topical Paper 1 (2002-2017) by Asif Iqbal 750
Business Topical Paper 2(2002-2017) by Asif Iqbal 795
Business Topical Paper 3(2002-2017) by Asif Iqbal 950
Biology Topical Unsolved Paper 1 by Rasheed Akhtar Chattha 750
Biology Topical Unsolved Paper 2 by Rasheed Akhtar Chattha 995
Biology Topical Unsolved Paper 4 by Rasheed Akhtar Chattha 995
Chemistry Topical Paper 1 by Niaz Ahmad Awan 750
Chemistry Topical Paper 2 by Niaz Ahmad Awan 950
Chemistry Topical Paper 4 by Niaz Ahmad Awan 995
Chemistry Paper 5 Worked Solution by Umar Zaman Khattak 550
Computer Science Topical P1-P2-P3-P4 by Adnan Saleem 2780
Computer Science P1-P2-P3-P4 Notes by Fawad Khan 1300
Economics Notes for AS Level by Rana Irfan Mahmood 550
Economics Notes for A2 Level by Rana Irfan Mahmood 550
Mathematics Paper 1 Topical Unsolved by Jawad Saeed 350
Mathematics Paper 3 Topical Unsolved by Jawad Saeed 350
Mathematics Paper 4 (M1) Topical Unsolved by Jawad Saeed 350
Mathematics Paper 6 (S1) Topical Unsolved by Jawad Saeed 350
Mathematics Paper 1 Notes by Ehsan ul Haq 450
Mathematics Paper 3 Notes by Ehsan ul Haq 450
Mathematics Paper 4 (M1) Notes by Ehsan ul Haq 450
Mathematics Paper 6 (S1) Notes by Ehsan ul Haq 450
Law (ELS) Paper 1 and Paper 2 Notes by Salik Aziz Vaince 945
Law (Contract of Law) Paper 3 Notes by Salik Aziz Vaince 1945
Law (Tort of Law) Paper 4 Notes by Salik Aziz Vaince 2000
Sociology Notes by Azhar Nazir (Anzway Editorial Board) 550
Sociology Notes by Akbar Saqi 550
Sociology Notes by Asmar Chaudhary 550
Sociology Notes by Azhar Nazir (Anzway) 550
Physics A Level (AS) Notes by Abdul Hakeem 350
Physics A Level (A2) Notes by Abdul Hakeem 350
Physics Topical Paper 1 by Abdul Hakeem 750
Physics Topical Paper 2 by Abdul Hakeem 950
Physics Topical Paper 4 by Afzal Ahmad 995
SAT Math Notes & Practice Book by Jawad Saeed (SJ) 750
SAT Math Notes & Practice Book by Rafique Akhtar Baloch 750
SAT-I Math & English 8 Latest Practice Test with Answer by SJ 1250
Rs: 795/-

You might also like