National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! !...

24
FOR OFFICIAL USE National Qualifications Mark CS(N5)15B Computing Science Duration — 1 hour and 30 mins Fill in these boxes and read what is printed below. Full name of centre Town Forenames(s) Surname Number of seat Date of birth Day Month Year Scottish candidate number D D M M Y Y Total marks – 90 SECTION 1 – 20 marks Attempt ALL questions in this section. SECTION 2 – 70 marks Attempt ALL questions in this section. Read all questions carefully before attempting. Write your answers in the spaces provided, using blue or black ink. Show all workings. Before leaving the examination room you must give this booklet to the invigilator. If you do not, you may lose all marks for this paper. © 2014 Perfect Papers – All rights reserved

Transcript of National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! !...

Page 1: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

  FOR OFFICIAL USE      

 

             

National Qualifications  

   

Mark    

     

              CS(N5)15B   Computing Science    

      Duration — 1 hour and 30 mins     Fill in these boxes and read what is printed below.     Full name of centre Town  

 

 

  Forenames(s) Surname Number of seat  

 

  Date of birth   Day Month Year Scottish candidate number

 D D M M Y Y

    Total marks – 90     SECTION 1 – 20 marks

  Attempt ALL questions in this section.

    SECTION 2 – 70 marks

  Attempt ALL questions in this section.

    Read all questions carefully before attempting.

  Write your answers in the spaces provided, using blue or black ink.

  Show all workings.

  Before leaving the examination room you must give this booklet to the invigilator. If you do not, you may lose all marks for this paper.

   

          © 2014 Perfect Papers – All rights reserved

Page 2: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page two

          MARKS DO NOT

WRITE IN THIS

MARGIN

  SECTION 1 – 20 marks     Attempt ALL questions     1. Convert the value 42 into an 8-bit binary number. Show your working. 1                     2. Name the part of the processor that deals with comparisons. 1           3. State one problem associated with storing data in a flat file database. 1           4. When ordering cloths online, users select their choice the following drop down

menu:

 

    State one advantage of this type of user interface. 1               5. Paul is developing a new website. Before deploying the new website he

ensures that the site matches the original design. Describe one other type of test that Paul should ensure is carried out. 1

         

Page 3: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page three

          MARKS DO NOT

WRITE IN THIS

MARGIN

  6. State the purpose of the mod operator shown in this section of code. 1     spare = number_seats MOD number_of_plates

              7. Calculate the backing storage required for a 16-bit colour image 800 pixels by

200 pixels.

    Express your answer in Kilobytes. 3                                           8. Pseudocode is often used when creating the design of a program.     (a) State another design notation that could be used when designing a

program.

    1     (b) Describe one advantage of using this design notation instead of

pseudocode. 1

                 

Page 4: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page four

          MARKS DO NOT

WRITE IN THIS

MARGIN

  9. A web page can use relative and absolute addressing. Explain each of these terms. 2

    Relative addressing:             Absolute addressing:               10. Harry computer technician for a large company and is concerned about the

energy usage of the computers he is responsible for.

    Describe two methods Harry could use to reduce the energy use of the

computers. 2

    1.         2.                                                  

 

Page 5: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page five

          MARKS DO NOT

WRITE IN THIS

MARGIN

  11. Here is part of a database used to manage the world verses world matches in an online role playing game.

    Name Rank Points Tick Rating Tier   Seafarer’s Rest 139 0.4477 1977 1   Desolation 137 0.4488 1977 1   Kodash [DE] 136 0.4477 1855 2   Jade Sea [FR] 140 0.448 1793 3   Elona Reach [DE] 135 0.4501 1793 1   Riverside [DE] 134 0.445 1775 3   Baruch Bay [SP] 133 0.4557 1775 2   Gandara 130 0.4497 1775 2   Piken Square 129 0.4485 1775 3   Far Shiverpeaks 128 0.4521 1775 4   Abaddon’s Mouth [DE] 136 0.4495 1697 4   Augury Rock [FR] 135 0.4469 1697 4   Gunnar’s Hold 130 0.4542 1697 5   Aurora Glade 137 0.4474 1602 5   Drakkar Lake [DE] 134 0.4581 1602 5     Describe how the data has been sorted. 2               12. State one method of representing characters in a computer system. 1           13. Claire has a large audio file and she needs to reduce the size of the file so that

she can store it on a USB stick.

    State two properties of the audio file she can change to reduce its size. 2     Property 1:     Property 2:                        

Page 6: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page six

         

MARKS DO NOT

WRITE IN THIS

MARGIN

  SECTION 2 – 70 Marks     Attempt ALL questions     14. CitySpoon is an app for eating out in cities around the world. It provides

information about local places to eat from street food to à la carte. When using the app a number of options are displayed based on the users current location.

   

    (a) Describe two advantages of running this app on a mobile device rather

than a desktop PC. 2

                    (b) Comment on the suitability of the user interface design shown above for

use on a smartphone. 2

           

 

Page 7: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page seven

         

MARKS DO NOT

WRITE IN THIS

MARGIN

  14. (continued)     (c) The images the app displays are uploaded to a server the app connects

to.

    (i) State a standard file format suitable for storing the photographs. 1         (ii) Explain why reducing the resolution decreases the time to

download the images to the app. 2

                    (d) Explain why the app and the server is an example of a client/server

network rather then a peer-to-peer network. 2

                      (e) Describe one element of good design that could be used to improve the

accessibility of the app. 1

                Total marks 10                  

 

 

Page 8: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page eight

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

  15. BattleWars is a role playing game where players engage in combat against each

other. The damage received by a player is calculated using the following function.

    LINE

254 damage(weapon_strength, armor, range, dmg_history[], counter)

255 {

256 IF range > 10 THEN

257 power = power / range

258 END IF

259 SET damage TO weapon_strength * range / armor

260 SET dmg_history[counter] TO damage

261 SEND damage TO DISPLAY

262 RETURN damage

263 }

    (a) (i) Identify the line that stores a value in an array. 1     Line     (ii) Identify the line that includes a condition. 1     Line     (iii) Identify which line shows output from the program. 1     Line     (iv) Identify which line contains parameters. 1     Line     (b) When the program was written the programmer mis-typed the > (greater

than) symbol on line 256 as < (less than). State which type of error will have been created by this mistake. 1

                 

Page 9: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page nine

          MARKS DO NOT

WRITE IN THIS

MARGIN

15. (continued)   (c) BattleWars players can craft items. The pseudocode below is used to

add ‘vitality’ to a crafted item.

    Line

2012 RECEIVE vitality FROM (INTEGER) KEYBOARD

2013 WHILE (vitality < 30 OR vitality > 100) DO

2014 SEND “ERROR: Invalid Value” TO DISPLAY

2015 RECEIVE vitality FROM (INTEGER) KEYBOARD

2016 END WHILE

    (i) State the type of loop shown above. 1         (ii) State an input a player could enter to enable the program to

continue from line 2013. 1

        (iii) State the name of the standard algorithm that this code

represents. 1

        (d) Another section of code from the BattleWars program is shown below.     Line

3912 SET class TO “Warrior”

3913 SET race TO “Elf”

3914 SET identity TO class & “ “ & race

    Describe the operation of the & operator in this code. 1             (e) BattleWars makes use of cloud services instead of local storage for

storing game data.

    State one benefit of using cloud based storage instead of local storage. 1           Total marks 10  

Page 10: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page ten

          MARKS DO NOT

WRITE IN THIS

MARGIN

  16. SnowCo specialise in snow sports holidays sold directly to customers online. A

page from the SnowCo website is shown below.

 

    (a) State the URL of this web page. 1                    

Page 11: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page eleven

          MARKS DO NOT

WRITE IN THIS

MARGIN

Q16 (continued)     (b) This web page makes use of internal and external hyperlinks.

Explain the difference between an internal hyperlink and external hyperlink. 2

            (c) The site makes use of a number of videos in mp4 format. Describe two

advantages of mp4 over avi. 2

                    (d) The “search” tool on the web page makes use of JavaScript.

Suggest one other place where JavaScript may be used on this page. 1

              (e) SnowCo stores details of its customers on a database.     (i) State one principal of the Data Protection Act with which SnowCo

must comply. 1

            (ii) Explain why compliance with this principal is important to

customers. 1

                     

 

Page 12: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page twelve

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

Q16 (continued)               (f) A search is carried out for the details of ski resorts in France and Italy.

Here are some of the matching resort details.

   

Resort Snowfall     Vertical Elevation Piste Longest  Run Lifts

  Monterosa 4.2 2,350 3,550 186 9 73   Livigno 4.2 1,200 3,000 110 4 162   Courmayeur 4.2 1,555 2,763 36 7.3 26   La  Plagne 5.0 2,000 3,250 225 15 134   Sestriere 5.0 788 2,823 400 5 146   La  Grave 5.5 2,150 3,550 12 9 3   Alpe  D'Huez 5.5 1,470 3,330 236 16 114   Meribel 5.7 1,450 2,950 144 5 74   Courchevel 5.7 1,483 2,738 150 4.1 119   Chamonix 6.7 2,807 3,840 170 22 60   Val  d'lsere 6.7 1,491 3,450 300 10 137               Describe how the list above is sorted. 2                                                                                                                     Total  marks   10                                                                                                                                                                                                          

 

 

Page 13: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page thirteen

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

  17. Harry has been asked to write a program to calculate the costs for a wood

carving business. The program will store the costs involved in producing wooden ornaments for gardens.

    The following calculations will be used to output the costs involved for each

ornament.

    Material Cost = (Wood Cost + Varnish Cost + Tools Cost) / Number Made

Total Cost = Labour Cost + Material Cost

    (a) State the number of variables Harry would require for this program. 1         (b) Using pseudocode or a programming language of your choice, write a

program to enter the required data, then calculate and display the total cost. 5

   

Pseudocode OR Programming Language

                                                               

 

 

Page 14: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page fourteen

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

  17. (continued)     (c) While the program is being developed, Harry carries out occasional test

runs. State the type of translator you would recommend Harry uses in this situation. Explain your answer. 2

    Translator     Explanation                 (d) One of Harry’s colleagues suggests that his code is not readable. Name

and describe two methods of improving the readability of code. 2

                        Total marks 10                                    

 

Page 15: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page fifteen

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

  18. Drones are small radio controlled and programmable flying robots that can be

fitted with a number of devices.

   

    (a) The drone is fitted with a camera, altitude sensor and a global

positioning system. State the hardware that allows these external devices to be connected to the drone’s computer system. 1

        (b) The drone can be programmed to carry out security patrols over

buildings and transmit video from its camera back to a security office for monitoring. Highlight one technical issue of using wireless technology to transmit the video from the camera. 1

                             

 

Page 16: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page sixteen

 

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

Q18 (continued)     (c) This program is created for the drone to complete a security patrol. The

programming language used with the drone has the following pre-defined functions. advance(n) n = distance in meters to move in current direction rotate(d) d = degrees to turn (positive means clockwise) ascend(m) m = distance in meters to move (positive means up)

    The path the drone takes is shown on this map.     Hexpatrol(n)

FOR side FROM 1 TO 6 DO move(n) rotate(60) END FOR

    (i) Write the code for the drone to follow an octagon patrol path. 3     Octpatrol(n)

         

 

Page 17: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page seventeen

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

Q18 (continued)     (c) (ii) The following program uses the Hexpath(n) function to create a

new patrol path. Two values have been missed out from the code. Complete the code by filling in the values in the two boxes. 2

   

ascend(300)

REPEAT TIMES

Hexpath(n)

rotate( )

END REPEAT

ascend(-300)

    (d) The drone software includes a firewall. Describe two ways that a

firewall will prevent unauthorised access to the drone. 2

                    (e) A security protocol is used when communicating with the drone. Explain

the purpose of a security protocol. 1

             

 

Page 18: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page eighteen

          MARKS DO NOT

WRITE IN THIS

MARGIN

  19. The Game Mag are a computer games magazine who publish reviews and

articles about computer games. Game Mag want to store the details of computer game publishers and computer games which they review.

    Some sample data is shown in the table below.     Publisher

Code Publisher Logo Game

Number Title Studio Metascore

  X32 Take-Two Interactive

872 Grand Theft Auto V

Rockstar North

97

  X32 Take-Two Interactive

635 MLB 2K13 Visual Concepts

48

  U18 Ubisoft

231 HAWK X Ubisoft Romania

79

  U23 Electronic Arts

214 Mass Effect 3: Citadel

BioWare 90

  P23 Electronic Arts

712 Fuse Insomniac Games

63

  P15 Activision Blizzard

242 Skylanders Swap Force

Vicarious Visions

89

  P15 Activision Blizzard

288 Deadpool High Moon Studios

63

    (a) To avoid data duplication, a database with two linked tables is proposed

– PUBLISHER table and GAME table

    (i) List the fields/attributes that should be included in each table. 2     PUBLISHER table GAME table                              

 

Page 19: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page nineteen

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

Q19 (continued)     (a) (ii) Identify the foreign key used to link the two tables. 1         (b) Name the field type required to store the Logo image. 1         (c) The Metascore field must be an integer from 0 to 100.     Name the type of validation that should be implemented on this field. 1         (d) Game Mag is running an article about security risks and the computer

games industry.

    (i) The article mentions DOS (Denial of Service) attacks on game

servers. Explain what is meant by a DOS (Denial of Service) attack. 1

                (ii) The article also mentions that game players are being targeted by

phishing. Explain what is meant by phishing. 1

                (e) Game Mag also has an article on the problem of computer game piracy

and the sale of illegal copied of games.

    State the law that makes the copying of computer games illegal. 1              

 

Page 20: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page twenty

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

Q19 (continued)     (f) Game Mag has a web site.    

    Identify two features used on this web page to aid navigation. 2                                    

 

Page 21: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page twenty-one

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

  20. MegaFiles is secure file storage site. Users use a sign up page to create an

account for the service. The design of the sign up page is shown below.

   

    (a) (i) Using pseudocode or a language of your choice, show how a

program could check that the password entered into Password1 has seven characters. 3

                                                               

 

Page 22: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page twenty-two

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

20 (continued)     (a) (ii) Describe clearly, with reference to values and variables, the

operation of the following pseudocode. 4

    Line

23 SET password_value TO Password1

24 SET password_confirm TO Password2

25 IF password_value = password_confirm THEN

26 SEND “All good, let me in” TO DISPLAY

27 ELSE

28 highlight password fields and error

29 END IF

                                                                   

 

[B  

Page 23: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page twenty-three

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

Q20 (continued)     (b) When a user is logged into MegaFiles the service displays the percentage

of the storage space the user’s files occupy.

   

  (i) The   real   number   14.72   is   stored.     Explain   how   a   computer   system   will  store  a  real  number. 2

                            (ii) The rectangle bar is stored as a vector graphic. State one

advantage of vector graphics when compared to bitmapped graphics. 1

                  Total marks 10                          

 

Page 24: National Qualifications CS(N5)15B! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)15B! Computing Science! !!!! Duration — 1 hour and 30 mins!

Page twenty-four

          MARKS DO NOT

WRITE IN THIS

MARGIN

  ADDITIONAL SPACE FOR ANSWERS