0% found this document useful (0 votes)
43 views

Computing Sciences QPR N 5

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

Computing Sciences QPR N 5

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

N5

FOR OFFICIAL USE

National
Qualications Mark
SPECIMEN ONLY
S816/75/01 Computing Science

Duration — 1 hour 30 minutes *S8167501*

Fill in these boxes and read what is printed below.

Full name of centre Town

Forename(s) Surname Number of seat

Date of birth
Day Month Year Scottish candidate number

Total marks — 80
SECTION 1 — Software design and development, and Computer systems — 55 marks
Attempt ALL questions.
Attempt EITHER Section 2 OR Section 3
SECTION 2 — Database design and development — 25 marks
SECTION 3 — Web design and development — 25 marks
You may use a calculator.
Show all workings.
Write your answers clearly in the spaces provided in this booklet. Additional space for answers is
provided at the end of this booklet. If you use this space you must clearly identify the question
number you are attempting.
Use blue or black ink.
Before leaving the examination room you must give this booklet to the
Invigilator; if you do not, you may lose all the marks for this paper.
©

*S816750101*
MARKS DO NOT
WRITE IN
THIS
MARGIN
SECTION 1 — SOFTWARE DESIGN AND DEVELOPMENT, AND COMPUTER SYSTEMS
— 55 marks
Attempt ALL questions

1. A question in a program requires a true or false response.


State the most suitable data type for storing this response. 1

2. The code below should receive input and display a user’s name.


Line 3 DECLARE name INITIALLY ""
Line 4 SEND "Please type in your name" TO DISPLAY
Line 5 SD "Your name is" & name TO DISPLAY
Line 6 RECEIVE name FROM KEYBOARD

Identify the syntax error and logic error in the program code above. 2

Syntax error

Logic error

3. Convert the following 8‑bit binary number into denary.

1110 0010 1

*S816750102*

page 02
4. A user enters the value 2 when running the program below. MARKS DO NOT
WRITE IN
THIS
MARGIN
Line 1 DECLARE answer INITIALLY 0
Line 2 DECLARE numOne INITIALLY 3
Line 3 RECEIVE numTwo FROM KEYBOARD
Line 4 SET answer TO numOne ^ numTwo
Line 5 SEND answer TO DISPLAY

State the output. 1

5. Explain why the development of software is called an iterative process. 1

6. Explain why encryption is used when sending emails across wireless networks. 1

7. Input validation is required to ensure that a program will only accept the numbers 1
or 5.

(a) Using a design technique of your choice, design an efficient solution to ensure
that the program will only accept valid numbers from the user. 4

(b) State a numerical example of exceptional test data that could be used to test
the design. 1

*S816750103*

page 03 [Turn over


MARKS DO NOT
WRITE IN
THIS
MARGIN
8. Describe one way schools can help to reduce the environmental impact of the
computers they use. 1

9. A vector graphics package is used to create a floor plan for a house as shown below.

cupboard
bedroom 1 kitchen

living
room

bedroom 2 bathroom

sink

(a) State the object used to create the outline of the sink. 1

(b) The line thickness and line colour are attributes of the lines used to draw the
outside walls.
State one other attribute of these lines. 1

*S816750104*

page 04
MARKS DO NOT
WRITE IN
THIS
MARGIN
10. A cinema is developing an app to survey customers. Cinema staff will ask customers
questions as they leave the cinema. Staff will use a touchscreen on a tablet to input
and submit the responses given by each customer.
Customers will be asked the following questions:
• Which of the two films the cinema is currently showing did you see?
• What score would you give the film, from 1 to 5?
• Did you purchase food in the cinema?

(a) As many customers as possible should be surveyed as they leave the cinema. It
is important that answers to questions can be input as quickly as possible
using a touchscreen.
Using the information above, design a user interface for this part of the app. 4

[Turn over

*S816750105*

page 05
DO NOT
WRITE IN
THIS
MARGIN
10. (continued)

At the end of each day the app will calculate the average score for each film.
The suggested design for this part of the app is shown below.

get film from


touchscreen

add 1 to total
customers

was was
film A No film B
selected? selected?

Yes Yes
get score get score
for film A for film B

add score onto add score onto


film A total film B total

are
Yes
there any more
customers?

No
display "The average score for film A
is" & film A total/total customers

display "The average score for film B


is" & film B total/total customers

*S816750106*

page 06
10. (continued) MARKS DO NOT
WRITE IN
THIS
MARGIN
(b) Read the design for the cinema app and identify

(i) a value that will be stored as an integer 1

(ii) the condition used in the loop 1

(iii) an inefficient part of the design that could be removed without affecting
the solution. 1

(c) Before the design is implemented, the following test data is created.

Type of test User input


Normal A
10

B
8

A
2

B
8

The design does not calculate the average score for each film correctly.
(i) State the average score for each film that this design will output. 1

Film A

Film B
(ii) Describe how the design should be edited to calculate the correct
average scores. 1

*S816750107*

page 07 [Turn over


MARKS DO NOT
WRITE IN
THIS
MARGIN
11. A spelling game stores 20 words. Each word has an accompanying sound file where
an actor’s voice speaks the word.
When the game is running the program repeats the following 20 times:

• selects one of the 20 words


• loads a sound file matching the selected word
• plays the sound file through a speaker
• asks the user to type in the word
• compares the user’s entry to the stored word
• informs the user if they have spelled the word correctly.

When the game is over the program displays the total number of words that have
been spelled correctly by the user.

(a) Complete the table below by identifying three processes from the above
description of the game. 3

Input(s) User enters the word

Process(es)

Output(s) Play matching sound file through speaker.


Display whether or not the user spelled the
word correctly.
Display the total number of correctly spelled
words.

*S816750108*

page 08
MARKS DO NOT
WRITE IN
THIS
MARGIN
11. (continued)

(b) The spelling game stores 20 words.

(i) State the data structure and data type that will be required to store the
20 words. 2

Data structure

Data type
(ii) State where in the computer system the 20 words will be stored while
the program is running. 1

(iii) State the part of the processor that will compare the selected stored
word with the user’s input. 1

[Turn over

*S816750109*

page 09
MARKS DO NOT
WRITE IN
THIS
MARGIN
11. (continued)

(c) Part of the program code is shown below.


Line 27 REPEAT 20 TIMES
Line 28 SET choice TO <a number between 0 to 19>
Line 29 <load selected sound file>
Line 30 SEND <sound file> TO <speaker>
Line 31 RECEIVE usersWord FROM KEYBOARD
Line 32 IF usersWord = NOT(storedWords[choice]) THEN
Line 33 SEND "Sorry, the correct spelling is " &
storedWords[choice] TO DISPLAY
Line 34 ELSE
Line 35 SEND "Well Done" TO DISPLAY
Line 36 SET correctGuesses TO correctGuesses + 1
Line 37 END IF
Line 38 END REPEAT
Line 39 SEND "You guessed " & correctGuesses & " words
correctly" TO DISPLAY

(i) Identify the logical operator used in the above code. 1

(ii) Using a programming language of your choice, re-write Line 28 to show


how the value stored in the variable choice would be generated. Your
answer should use a function. 2

(iii) When the above code was tested several times, it was found that the
user was not asked to spell all 20 of the stored words.
Explain why the program did not ask the user to spell every stored word. 1

*S816750110*

page 10
MARKS DO NOT
WRITE IN
THIS
MARGIN
11. (continued)

(d) The first stored word is

Animal

State the number of bits required to store this word using extended ASCII. 1

[Turn over

*S816750111*

page 11
DO NOT
WRITE IN
THIS
MARGIN
12. A company runs a sightseeing trip around Iron Craig Island each Saturday and
Sunday. Their boat can hold 100 passengers.
Every weekend the available tickets are numbered as follows.

Saturday’s ticket numbers 1 to 100

Sunday’s ticket numbers 101 to 200

A program is being developed to:


• allow the company to check the validity of each passenger’s ticket as they board
the boat
• calculate and display the total number of the passengers on each trip.
The program design is shown below.

PROGRAM
daily ticket
analyser

set number of repeat until display


get ticket
passengers to no more total number
range
0.00 passengers of passengers

get
get lower get upper
ticketNumber
ticket ticket
from
number number
passenger

is
ticketNumber
within range
for today?

yes no

add 1 to number display


of passengers “Ticket Refused”

*S816750112*

page 12
MARKS DO NOT
WRITE IN
THIS
MARGIN
12. (continued)

(a) (i) State the type of loop required when implementing this design. 1

(ii) State the standard algorithm used in this design. 1

(iii) Several different programming constructs will be required when the


program code is written.
Complete the table below to show this. 3

Example from design Matching construct

Set totalPassengers to 0.00

Conditional statement

Arithmetic operation

(b) The total number of passengers is set to 0.00 in the design.


State a more appropriate data type to store the total number of passengers.
Give a reason for your answer. 2

Data type

Reason

[Turn over

*S816750113*

page 13
DO NOT
WRITE IN
THIS
MARGIN
12. (continued)

(c) The program is edited to calculate the total value of the passengers’
tickets. The price of a ticket is different for each deck.

Deck 1 Deck 2

Saturday’s ticket numbers 1 to 50 51 to 100

Sunday’s ticket numbers 101 to 150 151 to 200

Ticket price £5 £10

The edited code is shown below.


Line 5 RECEIVE lower FROM KEYBOARD
Line 6 RECEIVE upper FROM KEYBOARD

Line 14 IF ticketNumber < lower OR ticketNumber > upper THEN
Line 15 SEND "Ticket Refused" TO DISPLAY
Line 16 ELSE
Line 17 SET numberOfPassengers TO numberOfPassengers + 1
Line 18 IF ticketNumber <= (lower + 49) THEN
Line 19 SET totalValue TO totalValue + 5
Line 20 END IF
Line 21 IF ticketNumber >= (lower + 50) THEN
Line 22 SET totalValue TO totalValue + 10
Line 23 END IF
Line 24 END IF

*S816750114*

page 14
MARKS DO NOT
WRITE IN
THIS
MARGIN
12. (c) (continued)

Using a programming language of your choice, re-write lines 18 to 23 in a more


efficient way. 3

(d) Tickets include a bit-mapped graphic.

IRON CRAIG TOURS


Saturday Ticket IRON CR
Lower Deck AIG TOU
RS
Seat Number: 37 Saturda
y Ticket
Upper D
eck
Seat Nu
mber: 6
0

Describe how a bit-mapped graphic is represented in a computer system’s


memory. 2

*S816750115*

page 15 [Turn over


DO NOT
WRITE IN
THIS
MARGIN
13. A farm uses a robot to scan mushrooms and measure their diameter. If they have
grown to the correct size, the mushrooms are picked and packed into boxes.

The program that controls the robot is shown below.

Line 1 DECLARE maxSize AS REAL INITIALLY 4.0


Line 2 DECLARE fullBox AS INTEGER INITIALLY 20
Line 3 DECLARE count AS INTEGER INITIALLY 0
Line 4 DECLARE mushroomSize AS REAL INITIALLY 0.0

Line 5 WHILE <there are more mushrooms to scan> DO


Line 6 RECEIVE mushroomSize FROM <scanner>

Line 7 IF mushroomSize >= maxSize/2 AND mushroomSize <=


maxSize THEN

Line 8 <pick and pack scanned mushroom>


Line 9 SET count TO count + 1
Line 10 IF count = fullBox THEN
Line 11 SEND "Box Full" TO TOUCHSCREEN
Line 12 SEND "Replace with Empty Box" TO
TOUCHSCREEN
Line 13 <pause until box replaced>
Line 14 SET count TO 0
Line 15 END IF

Line 16 END IF
Line 17 END WHILE

*S816750116*

page 16
MARKS DO NOT
WRITE IN
THIS
MARGIN
13. (continued)

(a) Explain fully how this program informs the farmer when a box of mushrooms is
full. 3

(b) The robot currently picks mushrooms that are no more than 4 cm in diameter
and packs 20 mushrooms into a box.
(i) State the smallest size a picked mushroom could be. 1

(ii) Explain why line 14 is necessary. 1

[Turn over

*S816750117*

page 17
MARKS DO NOT
WRITE IN
THIS
MARGIN
13. (continued)

(c) The scanner on a second robot calculates how white each mushroom is
and outputs this as a ‘whiteness’ reading between 0 and 10.

Line 1 DECLARE maxSize AS REAL INITIALLY 4.0


Line 2 DECLARE fullBox AS INTEGER INITIALLY 20
Line 3 DECLARE count AS INTEGER INITIALLY 0
Line 4 DECLARE whiteness AS REAL INITIALLY 0.0

Line 5 WHILE <there are more mushrooms to scan> DO


Line 6 RECEIVE mushroomSize FROM <scanner>

Line 7 IF mushroomSize >= maxSize/2 AND mushroomSize <=


maxSize THEN

Line 8 <pick and pack scanned mushroom>


Line 9 SET count TO count + 1
Line 10 IF count = fullBox THEN
Line 11 SEND "Box Full" TO TOUCHSCREEN
Line 12 SEND "Replace with Empty Box" TO TOUCHSCREEN
Line 13 <pause until box replaced>
Line 14 SET count TO 0
Line 15 END IF

Line 16 END IF
Line 17 END WHILE

Line 4 of the original program has been edited.


Describe how else the original program could be edited so that
mushrooms of any size, with a whiteness reading of at least 9 would be
picked by the robot. 2

[END OF SECTION 1]

*S816750118*

page 18
MARKS DO NOT
WRITE IN
THIS
MARGIN
SECTION 2 — DATABASE DESIGN AND DEVELOPMENT — 25 marks
Attempt ALL questions

14. A database is used to store data about restaurants. This includes the type of food
they serve, the average price of a meal and a rating of 1, 2, 3, 4 or 5 stars.

(a) The SQL query below is executed.

SELECT name, address, phoneNumber


FROM restaurant
WHERE (foodType = "Italian" OR foodType = "French")
AND starRating > 1
AND starRating < 5
ORDER BY averagePrice ASC

Describe the output that would be listed under the headings name, address
and phoneNumber when the above query is executed. 3

(b) State which SQL operation would be required to change the phone number of
a restaurant in the database. 1

15. A data dictionary includes entity names and attribute names.


State one other item of information that would be included in a data dictionary. 1

[Turn over

*S816750119*

page 19
MARKS DO NOT
WRITE IN
THIS
MARGIN
16. A primary school is organising a range of 30 activities for its 550 pupils for the last
day of term. The organiser wishes to create and use a database.
The following are essential.
Each pupil selects one activity. They must return a form which contains their name,
class and emergency contact details.
The organiser provides class teachers with a list of pupils’ names and chosen
activities.
Each activity has a leader and a unique activity name. Activity prices range from £2
to £30. The organiser provides a list for each activity leader, showing each pupil’s
name, class and emergency contact details.
The organiser records which pupils have returned a form so that they can search for
pupils who have not signed up to an activity.

(a) State two functional requirements of the database. 2

Functional requirement 1

Functional requirement 2

(b) Complete the entity-relationship diagram on the opposite page for the
database by:
• naming the entities
• drawing any missing attributes from either entity
• drawing the relationship between the entities
• naming the relationship between the entities. 4

*S816750120*

page 20
MARKS DO NOT
WRITE IN
THIS
MARGIN
16. (continued)

pupilID

name

formReturned

activityName*

emergencyContact

class activityName

(c) Identify the attribute that would be stored as a Boolean field when the
database is implemented. 1

(d) When the database is implemented validation is added to several fields.


(i) The primary school has 14 different class names. For example P1A, P4B,
P6/7A.
Describe how validation of this field could be implemented when the
database tables are created. 2

(ii) State one field where range validation would be appropriate. 1

[Turn over

*S816750121*

page 21
17. A car retailer has four showrooms. MARKS DO NOT
WRITE IN
THIS
A relational database is used to store details of the four showrooms and the cars MARGIN

they have for sale.

Showroom
showroomID city manager
Gla1 Glasgow Ray Rain
Gla2 Glasgow Kate Jones
Abd Aberdeen Sue Gearan
Dun Dundee Sadiq Yavuz

Car
carID make model colour seats salePrice showroomID
1 McLaren F1 blue 3 900000 Dun
2 Jaguar XKR silver 2 70000 Gla1
3 SMART Sports green 3 22300 Abd
4 Nissan GT-R red 4 80000 Dun
5 Alfa Romeo Giulia green 2 50000 Dun
6 Audi TT Coupe white 4 12050 Gla2
7 Mazda MX-5 black 2 21987 Abd
8 Jaguar F-Type red 2 105200 Dun
9 SMART Sports yellow 3 17000 Gla1
… … … … … … …

(a) Design a query that would output the model, number of seats and the
showroom manager for all the Jaguar cars located in Glasgow. 4

Field(s)

Table(s)

Search criteria

*S816750122*

page 22
17. (continued) MARKS DO NOT
WRITE IN
THIS
MARGIN
(b) An SQL statement is implemented to find all two seater cars and produces the
output below.

make model salePrice


Alfa Romeo Giulia 50000
Alfa Romeo GTV 35000
Alfa Romeo Spider 66000
Fiat Spider 124 26345
Jaguar F-Type 105200
Jaguar XJS 45595
Jaguar XKR 70000
Lotus Evora 72500
Mazda MX-5 21987
Porsche Cayman 718 40000

Write the SQL statement that will produce this output, in the order shown. 4

(c) One functional requirement is to output the make, model and price of cars
costing less than 60000 which are not in Glasgow.

SELECT make, model, colour, salePrice


FROM Car
WHERE showroomID = "Abd"
AND salePrice < 60000;

Give two reasons why the SQL statement would not produce the required
output. 2

Reason 1

Reason 2

[END OF SECTION 2]

*S816750123*

page 23
MARKS DO NOT
WRITE IN
THIS
MARGIN
SECTION 3 — WEB DESIGN AND DEVELOPMENT — 25 marks
Attempt ALL questions

18. A team of web designers create a low‑fidelity prototype for a bakery that wishes to
sell its cakes online.

(a) State one benefit to the bakery of a low‑fidelity prototype being created. 1

(b) The designers ensure there is consistency across the prototype.


Describe why consistency is a benefit for end-users. 1

*S816750124*

page 24
MARKS DO NOT
WRITE IN
THIS
MARGIN
19. A swimming club currently runs sessions for swimmers aged 5–7 and 8–10.
The diagram below shows the current structure of the club’s website.
The club wants to add a new page to their website showing information for
swimmers in the Dolphins group (aged 11–14). They would also like to add an
external link from their home page to local competition dates.
Complete the diagram below to show the structure of the updated site. 3

Home

Tadpoles Otters
(age 5–7) (age 8–10)

[Turn over

*S816750125*

page 25
MARKS DO NOT
WRITE IN
THIS
MARGIN
20. Find Me An Owner dog rescue centre is creating a new website.
Each dog has its own web page. The home page contains links to all of these pages.
One of the pages is shown below.

http://FindMeAnOwner.co.uk/Dudley

Dudley (Inverness City Centre)

Dudley is a 7 year old Labrador who is looking for a new home.


He has an excellent temperament and is great with children
and older adults. He enjoys going for walks and chasing a ball.
Rating
friendliness:

(a) (i) State a suitable file format for the image of the dog and explain your
choice. 2

File format

Explanation

*S816750126*

page 26
MARKS DO NOT
WRITE IN
THIS
MARGIN
20. (a) (continued)

(ii) The staff at the centre took the photo of the dog.
Explain why the centre staff do not have to worry about the Copyright
Designs and Patents Act when using this picture on the web page. 1

(b) The following HTML code is added to each dog’s web page.

<p> Back to the home page <a href= "home.html"> click here
</a>
</p>

Show how this code would be displayed when viewed in a browser. 2

[Turn over

*S816750127*

page 27
MARKS DO NOT
WRITE IN
THIS
MARGIN
20. (continued)

(c) When testing one of the links on the home page the following error screen
appears.

http://FindMeAnOwner.co.uk/...

Page Not Found


Oops - sorry this page cannot
be found

(i) State one possible reason why the ‘Page Not Found’ error was displayed. 1

(ii) All the links on the website have now been tested.
Describe two other tests that should be carried out on the website. 2

Test 1

Test 2

*S816750128*

page 28
DO NOT
WRITE IN
THIS
MARGIN
21. MoveIt estate agency is developing a new website.
The following code is used to create the home page for the estate agent’s website.
The home page includes a heading, a video, a welcome message and the company
logo shown below.

MI

<style>
h1 {text-align:right;font-size:24pt}
.pageText {text-align:left;font-size:12pt}
</style>

<h1 class="pageText"> MoveIt Estate Agents </h1>

<video width="400" height="300" controls>


<source src="intro.mp4">
</video>

<p class="pageText"> Welcome to MoveIt Estate Agents </p>


<img src="logo.jpg" width="200" height="100">

[Turn over

*S816750129*

page 29
MARKS DO NOT
WRITE IN
THIS
MARGIN
21. (continued)

(a) Draw how the home page will look when viewed in a browser. Some of the
content has already been added. 3

*S816750130*

page 30
DO NOT
WRITE IN
THIS
MARGIN
21. (continued)

One of the implemented pages from MoveIt’s website is shown below.

http://MoveItEstateAgents.co.uk/rosieview

Rosie View

Features of the flat


• Ground floor flat
• 2 bedrooms with ensuite
• Kitchen
• Generous living area
See floor plan

Contact Us:
Agent: G Smith
Ref: AS1289
Phone: 01355 876242

Audio Description
00:29

[Turn over

*S816750131*

page 31
MARKS DO NOT
WRITE IN
THIS
MARGIN
21. (continued)

(b) The following code is used to create the page.


<h3> Features of the flat </h3>

<ul>
<li> Ground floor flat </li>
<li> 2 bedrooms with ensuite </li>
<li> Kitchen </li>
<li> Generous living area </li>
</ul>

<a href="floorplan.html"> See floor plan </a>

<h3> Contact Us: </h3>

<p class="contactInfo"> Agent: G Smith </p>


<p class="contactInfo"> Ref: AS1289 </p>
<p class="contactInfo"> Phone: 01355 876242 </p>

(i) Write the single CSS rule that could be used to centre align the three
paragraphs underneath ‘Contact Us’, ensuring the size of the font is 12. 3

(ii) State the type of addressing in the hyperlink that is used to take the user
to the floor plan page. 1

*S816750132*

page 32
MARKS DO NOT
WRITE IN
THIS
MARGIN
21. (continued)

(c) The page includes a feature that changes the image of the flat to the price of
the flat when the user moves the cursor over the image.

http://MoveItEstateAgents.co.uk/rosieview http://MoveItEstateAgents.co.uk/rosieview

Rosie View Rosie View

£260,000

Features of the flat Features of the flat


• Ground floor flat • Ground floor flat
• 2 bedrooms with ensuite • 2 bedrooms with ensuite
• Kitchen • Kitchen
• Generous living area • Generous living area
See floor plan See floor plan

Contact Us: Contact Us:


Agent: G Smith Agent: G Smith
Ref: AS1289 Ref: AS1289
Phone: 01355 876242 Phone: 01355 876242

Audio Description Audio Description


00:29 00:29

(i) State the language used to implement this feature. 1

(ii) State the type of event that would be used in this feature. 1

(d) The website currently includes audio descriptions of each flat. These audio
clips are stored using a compressed file format.
(i) State one benefit to the end-user of the site using a compressed format
for these audio files. 1

[Turn over

*S816750133*

page 33
MARKS DO NOT
WRITE IN
THIS
MARGIN
21. (d) (continued)

(ii) When recording the audio descriptions, a choice of sample rates can be
used.

Sample rate A Sample rate B

800 Hz 44 kHz

State one advantage and one disadvantage of using Sample rate B when
recording and storing the sound file rather than Sample rate A. 2

Advantage of Sample rate B

Disadvantage of Sample rate B

[END OF SECTION 3]

[END OF SPECIMEN QUESTION PAPER]

*S816750134*

page 34
MARKS DO NOT
WRITE IN
THIS
MARGIN
ADDITIONAL SPACE FOR ANSWERS

*S816750135*

page 35
MARKS DO NOT
WRITE IN
THIS
MARGIN
ADDITIONAL SPACE FOR ANSWERS

Acknowledgement of copyright
Question 20 (a) sanjagrujic/shutterstock.com
Question 21 (b) and (c) Konmac/shutterstock.com

*S816750136*

page 36
N5
S816/75/01
National
Qualications
SPECIMEN ONLY
Computing Science

Marking Instructions

These marking instructions have been provided to show how SQA would mark this
specimen question paper.

The information in this publication may be reproduced to support SQA qualifications only
on a non-commercial basis. If it is reproduced, SQA should be clearly acknowledged as
the source. If it is to be used for any other purpose, written permission must be obtained
from [email protected].
Where the publication includes materials from sources other than SQA (ie secondary
copyright), this material should only be reproduced for the purposes of examination or
assessment. If it needs to be reproduced for any other purpose it is the user’s
responsibility to obtain the necessary copyright clearance.

©
General marking principles for National 5 Computing Science

This information is provided to help you understand the general principles you must apply when
marking candidate responses to questions in this paper. These principles must be read in
conjunction with the detailed marking instructions, which identify the key features required in
candidate responses.

(a) Marks for each candidate response must always be assigned in line with these general marking
principles and the detailed marking instructions for this assessment.

(b) Always use positive marking. This means candidates accumulate marks for the demonstration of
relevant skills, knowledge and understanding; marks are not deducted.

(c) If a candidate response is not covered by either the principles or detailed marking instructions,
and you are uncertain how to assess it, you must seek guidance from your team leader.

(d) Award marks regardless of spelling, as long as the meaning is unambiguous. This applies to all
responses, including code. Award marks as per the detailed marking instructions, regardless of
syntax errors, if the intention of the coding is clear.

(e) For questions where candidates are asked to design or write code, a sample response is shown in
the detailed marking instructions. This will not be the only valid response. You must use the
detailed marking instructions and additional guidance to ensure that you consider alternative
approaches and nuances of different programming languages. If in doubt you should refer to your
Team Leader.

(f) A correct response can be negated if the candidate includes an extra, incorrect response which
demonstrates they do not know the correct answer. For example, in a ‘state’ question where the
only correct answer is ‘white’, if the candidate answers ‘white orange’, you should not award the
mark.

(g) If a candidate puts a score through a response and makes a further attempt, you should only
mark the further attempt. If no further attempt is made and the original is legible, you should
mark the original response.

(h) Where an incorrect response is carried forward and used correctly in a following part of the
question, you should give credit for subsequent responses that are correct with regard to the
original error. Candidates should not be penalised more than once for the same error.

(i) Only award marks for a valid response to the question asked. Where candidates are asked to:
• Identify, name, give or state, they need only name or present in brief form.
• describe, they must provide a statement or structure of characteristics and/or features. This
will be more than an outline or a list. It may refer to, for example, a concept, process,
experiment, situation, or facts, in the context of and appropriate to the question. Candidates
must make the same number of factual/appropriate points as there are marks available in the
question.
• explain, they must relate cause and/or effect and/or make relationships between things
clear, in the context of the question or a specific area within the question.
• write code, they must write recognisable code, not prose nor a diagram.
• design, they must use a design technique appropriate to the problem. Award marks as per the
detailed marking instructions, regardless of errors in the exemplification of the technique, if
the intention of the design is clear.

(j) In the marking instructions, if a word is underlined then it is essential; if a word is in brackets()
then it is not essential. Words separated by / are alternatives.

page 02
Marking instructions for each question
Section 1 — Software design and development, and Computer systems

Max
Question Expected response Additional guidance
mark
1. Boolean 1
2. • Syntax error — SD (should be 2 For the logic error accept, Line 6
SEND) should come after line 4.
• Logic — The name is displayed
before the user enters it
3. 226 1
4. 9 1
5. Previous stages in development are 1 Suitable examples are acceptable for
often revisited the mark
6. • to try to prevent unauthorised 1 Award 1 mark for any one bullet.
access to content/reading or
understanding of email Do not accept answers that state
• designed to scrambled data to encryption prevents access to data.
prevent access from individuals Data can still be intercepted, just
who do not have permission not read or understood.
• scrambled to make information
unreadable until decrypted
7. (a) Design showing: 4 The loop conditional may change
• conditional loop depending on where the candidate
• loop condition uses a pre or post conditional loop.
• input inside loop For example:
• error message. • until num = 1 or num = 5
• while num ≠ 1 and num ≠ 5

Where the design indicates a pre-


conditional (while) loop a second
input should be shown inside the
loop
(b) Any numerical value that is neither 1
1 or 5.
8. • settings on monitors 1 Award 1 mark for any one bullet.
• power down settings
• leaving computers on standby
9. (a) ellipse 1 Do not allow “oval” or “circle” in
place of ellipse.
(b) • x and y coordinates 1 Award 1 mark for any one bullet.
• x coordinate
• y coordinate Accept other appropriate answers
such as:
• transparency
• opacity
• laye

page 03
Max
Question Expected response Additional guidance
mark
10. (a) User interface design showing 4 None of the survey answers should
inputs: be typed.
• selection of film
• the numbers 1 to 5 Inputs could be represented as
• food - yes/no images, drop-down lists, buttons etc
• option to submit answers/go to
next customer Award 0 marks if candidate has
designed a program (flow chart,
structure diagram, pseudocode)
rather than a user interface.
(b) (i) • total customers 1 Award 1 mark for any one bullet.
• score for film
• film A total
• film B total
(ii) are there any more customers? 1
(iii) was film B selected? 1 Accept appropriate description of
why the second decision regarding
film B is not required.
(c) (i) • average score for film A is 3 1 Both bullets required for 1 mark.
• average score for film B is 4

(ii) Separate totals should be added to 1


count the number of customers for
A and B.

11. (a) • select a stored word 3 Award 1 mark for each bullet.
• compare stored word to users Maximum 3 marks.
input
• increment the total if user is
correct.
• locates matching sound file
• loads matching sound file
(b) (i) • Data structure - array 2
• Data type - string
(ii) • RAM 1 Award 1 mark for any bullet.
• Register
(iii) Arithmetic Logic Unit 1 ALU
(c) (i) NOT 1
(ii) • random function 2
• correct values created (0 to 19)

page 04
Max
Question Expected response Additional guidance
mark
11. (c) (iii) The same word could be randomly 1 It is unlikely that the 20 random
selected more than once numbers generated will generate
each of the 20 values once.
(d) 48 (bits) 1 Accept 6*8
12. (a) (i) Conditional 1
(ii) Running total (within loop) 1
(iii) • assignment 3 Example from Matching
• is ticketNumber within range for design construct
today? Set
• add one to number of passengers totalPassengers assignment
to 0.00
is ticketNumber
Conditional
within range for
statement
today?

add one to
Arithmetic
number of
operation
passengers

(b) • Data type - Integer 2


• Reason – passenger/people are
whole numbers
(c) • a suitable condition for one 3 See example answer below.
ticket
• use of ‘else’ for other type of
ticket
• calculate Running Total

IF ticketNumber <= (lower + 49) THEN


SET totalValue TO totalValue + 5
ELSE
SET totalValue TO totalValue + 10
END IF

(d) • (grid of) pixels 2


• each pixel (colour) stored as a
binary value

page 05
Max
Question Expected response Additional guidance
mark
13. (a) • Add 1 to/increment count 3
variable
• if count = 20
• message displayed (to farmer)
(b) (i) 2 1
(ii) The count must be restarted for the 1 The count variable is reset back to 0
next box of mushrooms. to start counting the next box of
mushrooms.
(c) • line 6 edited to input whiteness 2 Note that the condition whiteness = 9
• the condition (on line 7) should or whiteness =10 is not appropriate in
be changed to whiteness >= 9 and this case as whiteness is a real value.
whiteness <=10

page 06
Section 2 — Database design and development

Max
Question Expected response Additional guidance
mark
14. (a) • restaurants which serve either 3
Italian or French food will be
listed
• restaurants with a rating of 2,3
or 4 will be listed
• the displayed restaurants will be
sorted by average price from
lowest to highest
(b) UPDATE 1
15. • Attribute Type 1 Award 1 mark for any bullet.
• Attribute Size
• Validation Accept formatting
• Keys
• Sample Data

page 07
Max
Question Expected response Additional guidance
mark
16. (a) • the database should store the 2 Award 1 mark each for any bullet.
name, class and emergency Maximum 2 marks.
contact of each pupil in the
school Answers will probably be worded
• the database should store the differently. Answers should relate
activity name, price and leader to the data being stored and the
for each activity processes and output from that data
• the database should store which as described in the scenario.
pupils have returned forms
• the database should output lists
of pupils who are signed up for
each activity
• the database should output the
pupils who have not signed up
for an activity
(b) Completed ERD showing: 4 Award 1 mark for each bullet:
• Pupil and Activity entities
• activity attributes The relationship may be represented
(leader, price) using any correct notation. For
• relationship (M:1) example M:N or ∞:1
• cardinality
Cardinality may be described in
many different ways. Accept any
appropriate answer.

(c) formReturned 1
(d) (i) • use of restricted choice 2
• limited to the class names
(ii) price 1

page 08
Max
Question Expected response Additional guidance
mark
17. (a) Fields 4 Second criteria could also be written
• Model, seats, manager as:
showroomID = "Gla1" AND
Tables showroomID = "Gla1"
• Showroom, Car

Criteria
• Make = Jaguar
• City = Glasgow
(b) • SELECT make, model, 4 As SQL defaults to sorting by
salePrice ascending order, both ASCs could be
• FROM Car omitted.
• WHERE seats = 2
• ORDER BY make ASC, model
ASC;

(c) • Extra column displayed 2


• Output does not include the
Dundee showroom

page 09
Section 3 - Web design and development

Max
Question Expected response Additional guidance
mark
18. (a) The bakery can: 1 Award 1 mark for any bullet.
• see how the site will look before
it is created Answers must focus on benefits to
• request alterations to the the client (bakery) and not the
appearance before pages are developer.
created
• provide feedback to developers
(b) • easy to learn how to 1 Award 1 mark for any bullet.
use/navigate pages
• user knows they are still on the
same site across different pages
• different sections of the pages
can be identified by their
appearance
19. • new Dolphins page 3 Award 1 mark for each bullet.
• double headed arrow from Home
to Dolphins page
• external page with single headed
arrow from home page
Sample answer

page 10
Max
Question Expected response Additional guidance
mark
20. (a) (i) • suitable graphic file format for 2 Do not accept GIF as not suitable for
web photographs photographs
For example:
- jpg
- png

• matching explanation
For example:
- high colour depth
- small file size
- compressed file
(ii) • staff/centre own the photo 1 Award 1 mark for either bullet.
• staff/centre own copyright.
Do not accept ‘staff took the photo’
as this is in the question.
(b) • correct text (Back to the home 2 Correct answer:
page) Back to home page click here
• ‘click here’ underlined.
(c) (i) • web page does not exist 1 Award 1 mark for either bullet.
• the url/address in the hyperlink
code could be incorrect Do not accept ‘page is not found’
(ii) • test consistency across pages 2 Award 1 mark for each bullet.
• test pages match user-interface Maximum 2 marks.
design
• test media (text, graphics, Do not accept ‘test (hyper)links or
video, sound) plays/displays navigation’ as it is stated in the
correctly question.

Accept answers that show knowledge


beyond National 5 level:
• test interactive features for
example (JavaScript)
• test form input
• test communication with
database/server

page 11
Max
Question Expected response Additional guidance
mark
21. (a) • heading and paragraph on left of 3 Be lenient regarding:
page above and below video • the matching text size of the
• heading and paragraph text heading and paragraph
roughly the same size • the size of the logo in comparison
• logo image below paragraph to the video.
drawn about half the width of
the video.
Example answer:

MoveIt Estate Agents

Welcome to MoveIt Estate Agents

(b) (i) A single CSS rule with: 3 Example answer:


• use of class name in paragraph .contactInfo { text-align:
element (.contactInfo) of center; font-size:12pt }
supplied code
• text centre aligned
• font size 12
(ii) Relative 1
(c) (i) JavaScript 1
(ii) onMouseOver 1 Mouse over
(d) (i) faster page load 1 Do not allow ‘less storage required’
as this would be an advantage for
the developer/client not the end-
user.
(ii) • Advantage - better sound 2
quality
• Disadvantage - larger file size

[END OF SPECIMEN MARKING INSTRUCTIONS]

page 12

You might also like