Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
COMPUTER SCIENCE
ACCREDITED BY OFQUAL
SPECIMEN ASSESSMENT
MATERIALS
Teaching from 2015
Candidate Name
Centre Number
Candidate Number
AS COMPUTER SCIENCE
COMPONENT 1
Fundamentals of Computer Science
SPECIMEN PAPER
2 hours
INSTRUCTIONS TO CANDIDATES
Answer ALL questions.
Write your name, centre number and candidate number in the spaces at the top of this page.
Write your answers in the spaces provided in this booklet.
CPU
B
Input
Register
Output
Memory
(a)
[4]
(b)
Name the logical operation and draw the truth table required to clear this register.
Include a worked example of clearing the register with the data above.
[3]
2.
(a)
[2]
(b)
[3]
IMAP: .
(ii)
DHCP:
(iii)
UDP: ..
3.
Related data stored on a computer system can become fragmented over time.
(a)
Explain what is meant by the term fragmentation and give one possible effect.
[2]
..
..
..
..
Discuss the issues surrounding the defragmentation of a Solid State Drive (SSD).
[3]
..
(b)
..
..
..
..
..
..
..
..
..
..
..
4.
(a)
[3]
(ii)
[3]
(b)
[3]
........................................................................................................................
........................................................................................................................
........................................................................................................................
...........................................................................................................................
........................................................................................................................
........................................................................................................................
........................................................................................................................
(c)
Identify three typical items contained in a TCP/IP packet and describe their
purpose.
[6]
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
WJEC CBAC Ltd.
5. (a) Using binary addition, calculate the number that would result from adding
00100101 and 00111100
Convert the result into hexadecimal.
[2]
..
..
..
..
..
.
(b) Assuming that 1 is used to indicate a negative number, show how the negative
number -1310 will be represented using sign/magnitude in an 8 bit register.
[1]
..
..
..
..
(c) Integers can also be represented using twos complementation.
Describe, using an example, how the twos complement of a binary number is
derived.
[2]
..
..
..
..
..
..
(d)
(i)
Give an advantage and disadvantage of using floating point form rather than
integer form.
[2]
.
.
.
(ii)
Real numbers stored in floating point form can be stored using 16 bits as
shown below:
Mantissa
(12 bits in twos complement form. The binary
point in the mantissa is immediately after the left
bit.)
Exponent
(4 bits in twos
complement form.)
[2]
.
.
.
.
(iii)
0101
Calculate the mantissa, exponent and decimal equivalent of the number. [3]
.
...
6.
[7]
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
7.
When writing a program, a programmer could use a low level language or a high
level language.
Give three advantages for each of these approaches.
[6]
8.
Scientists monitoring the level of a pollutant in the air take a number of readings and
use a computer to analyse the data.
Write an algorithm, using pseudo-code, with the following inputs:
the number of readings to be analysed
the readings themselves as whole numbers
The algorithm should read the readings into an array then output:
the mean of the readings
how many readings were above the mean
the highest reading
Your algorithm must be written using self-documenting identifiers.
[7]
..
..
.
.
.
.
.
..
..
.
.
.
.
.
..
..
.
.
.
.
9.
[4]
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
10.
(a)
[2]
.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
(b)
32
35
19
62
(0)
(1)
(2)
(3)
(4)
(5)
Write down two other sets of data which will more fully test the algorithm.
DataSet1
(0)
(1)
(2)
(3)
(4)
(5)
(4)
(5)
DataSet2
(0)
(1)
(2)
(3)
[2]
11.
[8]
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
12.
An organisation is responsible for paying its employees and calculating their tax and
national insurance. Each employee is paid a different hourly rate.
The employee pay details, including their hourly rate are stored in a master file. The
number of hours each employee works each month is entered and stored in a
transaction file.
At the end of each month the hours worked by the employee and the hourly rate are
used to calculate the months pay, tax and national insurance.
(a)
Explain why sequential file organisation is the most suitable for the master file
and why serial file organisation is the most suitable for the transaction file. [2]
.......................................................................................................
.......................................................................................................
.......................................................................................................
.......................................................................................................
.......................................................................................................
(b)
Give one item of data that would appear in both the transaction file and the
master file.
[1]
..
..
(c)
Draw a clearly labelled diagram below which shows how the transaction file
and the master file are used to produce a pay slip for every employee.
[4]
13.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
END OF PAPER
WJEC CBAC Ltd.
Candidate Name
Centre Number
Candidate Number
AS COMPUTER SCIENCE
COMPONENT 2
Practical Programming to Solve Problems
SPECIMEN PAPER
2 hours 15 minutes
INSTRUCTIONS TO CANDIDATES
Answer ALL of questions 1, 2 and 3.
Answer only ONE section of question 4. This must be the section which requires you to use
the Integrated Development Environment (IDE) of your chosen programming language.
You will need to record all of your answers to questions 1, 2 and 3 in a word processed
document.
INFORMATION FOR CANDIDATES
The number of marks is given in brackets at the end of each question or part-question.
You are reminded of the need for good English and orderly, clear presentation in your
answers.
The total number of marks available is 60.
You will need a computer with an installed functional copy of the Integrated Development
Environment (IDE) appropriate to your chosen programming language and word processing
software.
Remember to save your work regularly.
No certificate will be awarded to a candidate detected in any unfair practice during the
examination.
Scenario
MEDIA STREAMING
SmashHits is a new online company that will provide digitally streamed media, such as
movies and music, to its customers.
They intend to provide a media on demand service with instant access to movies and music,
based around customers preferences. For movies, these preferences could be favourite
Director, Genre, or Lead Actor. In addition to this information other useful items of data such
as movie title, duration (in minutes), release date, age rating, whether the film is available in
3D or not, need to be included. Once subscribed to the service, customers pay a flat monthly
fee for access to the entire library of media. They have arranged copyright licences with the
relevant rights holders to have access to the media, and have sub-contracted the streaming
software out to technology experts. However, they do not have a fully functioning computer
system that can provide the customisation and search facilities that they wish to offer.
1.
The following class diagram represents the relationships between some of the
classes that SmashHits have decided to create.
MediaFile
#ID : Integer
#Title : String
#FileSize : Real
#MediaLength : Real
+GetTitle()
+GetFileSize()
+GetMediaLength()
MusicFile
-ChannelCount : Integer
#Language : String
-SamplingRate : Integer
VideoFile
#Height : Integer
#Width : Integer
#Quality : Integer
+GetChannelCount()
+SetLanguage(Language)
+GetSamplingRate()
+GetQuality()
Track
-Artist : String
-Album : String
+GetArtist()
+GetAlbum()
+Play()
Movie
-3D : Boolean
-Director : String
-Certificate : String
-Position : Real
+Get3D()
+GetDirector()
+GetCertificate()
+SetPosition(Position)
+Play()
(a)
(b)
State the name of an appropriate identifier for a variable that is used to store
the following:
(i)
(ii)
(iii)
TRUE
1080
34.2
[1]
[1]
[1]
[1]
(c)
(d)
[3]
(e)
[3]
(f)
Explain why the method SetPosition is required within the class Movie. [2]
(g)
Give an example from the class diagram above where a parameter is used.
Name and explain two different methods of passing this parameter to the
method.
[5]
2.
Each SmashHits customer has a unique five digit account number. An initial attempt
at calculating a check digit is shown below:
The four digits are added together to produce a single or double digit number.
The check digit is either:
o the single digit produced, for example, 2124 gives the check digit 9
o the last digit of the double digit number produced, for example, 2546 gives
17, so the check digit is 7.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(a)
[1]
(b)
Giving examples, explain the problem with the check digit algorithm given
above.
[5]
(c)
for i = 1 to 4
if i MOD 2 = 0 then
Total = Total + A(i)
else
Total = Total + (A(i) * 2)
end if
next i
CheckDigit = (Total * 9) MOD 10
output CheckDigit
Test data:
CustomerNumber = 6748
Copy and complete the table below to show how each variable changes when the
algorithm is tested by dry-running the test data given above.
i
A[i]
Total
CheckDigit
[4]
WJEC CBAC Ltd.
3.
4.
Visual Basic
(i)
[4]
[12]
(b)
Java
SmashHits wants a computer system to be developed using Java that meets
the requirements outlined below:
(i)
[4]
[12]
(c)
Python
SmashHits wants a computer system to be developed using Python that meets
the requirements outlined below:
(i)
[4]
[12]
Answer
1a
Component A
Name: Control unit
Explanation: Fetches each instruction in sequence,
decodes and synchronises it before executing it by
sending control signals to other parts of the computer.
Mark
Component B
Name: Arithmetic Logic Unit (Accept ALU)
Explanation: The processing and manipulation of
data which normally consists of arithmetic operations
or logical comparisons, allowing a program to take
decisions
1b
AO1
1
1
1.1a
1.1b
1
1
1.1a
1.1b
Input (B)
0
1
0
1
Output (A AND B)
0
0
0
1
AO2
AO3
Tot
2.1a
1.1a
2a
2bi
2bii
2biii
3a
0
0
0
1
0
1
Original
1001 0110 1101 1011
Mask
0000 0000 0000 0000
Result
0000 0000 0000 0000
Description should include the following:
1.1b
1.1b
1.1a
1.1a
1.1a
1.1a
1.1b
2.1a
Q
3b
4ai
4aii
4b
Answer
Mark
AO1
1.1b
1.1b
1.1b
5a
5b
Tot
1
1
1
2.1a
2.1a
2.1a
1
1
2.1a
2.1a
2.1a
1.1b
1.1b
1.1b
2.1a
Hexadecimal number = 61
10001101
1
1
2.1a
2.1a
AO3
4c
AO2
3
3
1.1a
1.1b
Q
5c
Answer
One method is:
From RHS, rewrite it up to and including the first one
Change other 1 digits to 0 and 0 digits to 1
Correct working and answer for example
00001000 xxxx1000 11111000
Mark
AO1
1.1b
AO2
AO3
Tot
2.1a
Alternatively:
Flip the bits
Add one
(Ignore carry (ninth bit))
5di
5dii
5diii
6
Distributive.
Complement,
Identity.
Commutative,
Distributive.
Associative,
Idempotent.
Distributive.
Idempotent,
Identity,
Distributive.
Identity, twice.
1.1b
1.1b
2.1a
1
1
1
2.1a
2.1a
2.1a
3
7
1
1
2.1a
2.1a
2.1a
2.1a
1
1
2.1a
2.1a
2.1a
Answer
Mark
AO1
1.1b
1.1b
AO2
AO3
1
2
3
4
5
6
7
8
9
Tot
1
1
1
1
1
1
1
3.1b
3.1b
3.1b
3.1b
3.1b
3.1b
3.1b
Answer
Mark
AO1
1.1a
1.1b
1.1b
1.1b
10a
AO2
AO3
Tot
Q
10b
11
Answer
Any two of:
45 32 5 32 19 62 (duplicated number)
5 19 32 35 45 62 (ascending order) or
62 45 35 32 19 5 (descending order)
32 45 19 62 -35 5 (negative number)
Accept (but cannot gain two marks for repetition of
these (e.g. if two arrays showing two different sets of
more than 6 integers)):
Example with:
<6 or >6 integers
Decimal(s)
Letters / other characters
Summary should draw on any eight of the following
points:
Mark
AO1
1
1
AO2
2.1b
2.1b
1.1b
AO3
Tot
Answer
Mark
12a
2.1a
2.1a
1
1
2.1a
2.1b
2.1b
2.1b
2.1b
12b
12c
AO1
AO2
AO3
Tot
1
4
Q
13
Answer
Comparison can refer to commonalities and differences
between changeover methods as referenced in the
indicative content.
Indicative content
Direct big bang approach can be adopted - sudden
change to new system
o
o
o
o
o
o
o
WJEC CBAC Ltd.
Mark
AO1
10
1.1b
AO2
AO3
Tot
13
o
o
o
o
o
o
o
o
2.1a
AO1.1b
Max 10 marks
8-10 marks
The candidate has:
written an extended response that has a
sustained line of reasoning which is
coherent, relevant, and logically structured
shown clear understanding of the
requirements of the question and a clear
knowledge of the indicative content. Clear
knowledge is defined as a response that
provides four to five relevant detailed points
on each of two changeover methods, which
relate to an extensive amount of the
indicative content
addressed the question appropriately with
minimal repetition and no irrelevant material
has presented a balanced discussion and
justified their answer with examples
effectively drawn together different areas of
knowledge, skills and understanding from all
relevant areas across the course of study.
Effectively drawn together is defined by a
response that identifies two methods of
changeover and relates these to specific
security considerations relevant to those
changeover methods
used appropriate technical terminology
referring to the indicative content confidently
and accurately.
4-7 marks
The candidate has:
written a response that has an adequate
line of reasoning with elements of
coherence, relevance, and logical structure
shown adequate understanding of the
requirements of the question and a
satisfactory knowledge of the topic of
changeover as specified in the indicative
content. Satisfactory knowledge is defined
as a response that provides four to seven
points across two changeover methods as
signalled in the indicative content. Up to five
marks could be awarded to a response that
provides detailed points on one changeover
method
has presented a discussion with limited
examples
drawn together different areas of knowledge,
skills and understanding from a number of
areas across the course of study. Drawn
together is defined by a response that
identifies two methods of changeover and
identifies security considerations, although
these may not be relevant to the changeover
methods described
used appropriate technical terminology
referring to the indicative content.
AO2.1a
Max 3 marks
3 marks
The candidate has:
shown clear understanding of the
requirements of the question and a clear
knowledge the processes that would protect
the security and integrity of data during
changeover. Clear knowledge is defined as
a response that provides three relevant
detailed points on the practical implications
of managing security and data during the
changeover process, which relate to the
indicative content.
2 marks
The candidate has:
shown adequate understanding of the
requirements of the question and a
satisfactory knowledge of the topics of
security and integrity of data as specified in
the indicative content. Satisfactory
knowledge is defined as a response that
provides two relevant points on the practical
implications of managing security and data
during the changeover process, which relate
to the indicative content.
AO1.1b
Max 10 marks
1-3 marks
The candidate has:
written a response that that lacks sufficient
reasoning and structure
produced a discussion which is not well
developed
attempted to address the question but has
demonstrated superficial knowledge of the
topics specified in the indicative content.
Superficial knowledge is defined as a
response that provides one to three points
on only one changeover method as signalled
in the indicative content
used limited technical terminology referring
to the indicative content.
0 marks
Response not credit worthy or not attempted.
AO2.1a
Max 3 marks
1 mark
The candidate has:
attempted to address the question but has
demonstrated superficial knowledge of the
topics specified in the indicative content.
Superficial knowledge is defined as a
response that provides one relevant point on
the practical implications of managing
security and data during the changeover
process, which relate to the indicative
content.
0 marks
Response not credit worthy or not attempted.
Q
1a
1bi
1bii
1biii
1c
1d
1e
Answer
Mark
AO1
AO2
AO3
Tot
2.1a
2.1a
2.1a
2.1a
2.1a
2.1b
2.1b
2.1b
2.1b
2.1b
2.1b
1f
1g
Quality
2.1b
2.1a
2.1b
2.1a
2.1b
2.1b
1
1
2.1b
2.1b
Answer
Mark
AO1
AO2
AO3
Tot
2a
2.1a
2b
2
2
3.1c
3.1c
3.1c
For example:
Customer number 1: 1234, Check digit 1: 0
Customer number 2: 2134, Check digit 1: 0
2c
A[i]
6
7
4
8
Total
12
19
27
35
CheckDigit
-1
-1
-1
5
4
1
1
1
1
3.1c
3.1c
3.1c
3.1c
Q
3
Answer
Mark
AO1
AO2
AO3
11
Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
set i = 1
set Position = -1
set Found = false
repeat
if MyArray[i] = MyArray[i - 1] then
set Position = i
output Position =, i
output TRUE
set Found = true
else
set i = i + 1
endif
until (Found = true OR i > LEN(MyArray))
Total
1
1
1
1
1
1
1
1
1
1
1
3.1b
3.1b
3.1b
3.1b
3.1b
3.1b
3.1b
3.1b
3.1b
3.1b
3.1b
Q
4ai
4bi
4ci
Answer
Indicative content:
Reading contents
Comparing Genres to the list
Incrementing the contents of the genre
Outputting the correct number
AO1
AO2
AO3
Total
3.1b
AO3.1b
Max 4 marks
4 marks
Band
Mark
0 marks
Q
4aii
4bii
4cii
Answer
Indicative content:
Input
Validation methods of:
o Range check
o Format check
o Length check
o Presence check
Creates a data file called customerdetails.txt
Stores on disc in a text file called customerdetails.txt
Descriptive/useful feedback that file has been saved
Candidates may use custom data types / standard
methods
Retrieves data from disc
Retrieves specified customer from disc
o Candidates may use Random (direct), serial, or
sequential file access
HCI fit for purpose (Textual or GUI)
Band
Mark
AO3.1b
Max 12 marks
9-12 marks
12
AO1
AO2
AO3
Total
3.1b
12
Q
4aiii
4biii
4ciii
Answer
Indicative content:
Clear annotation of steps within the following routines:
o Validation
o Storage of data to file
o Retrieving specified data from file
Use of self-documenting identifiers / explanation of
variables
AO1
AO2
AO3
Total
3.1a
AO3.1a
Max 4 marks
4 marks
Band
Mark
1 mark
The candidate has:
Produced listings that are appropriately laid out and include sufficient annotation to demonstrate
an understanding of one programming routine listed in the indicative content
Used limited technical terminology referring to the indicative content.
OR
Written code using self-documenting identifiers
Used limited technical terminology referring to the indicative content.
Response not credit worthy or not attempted.
0 marks