National Qualifications CS(N5)16A! Computing Science€¦ · National Qualifications!! ! Mark!!! !...

25
FOR OFFICIAL USE National Qualifications Mark CS(N5)16A 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. © 2016 Perfect Papers – All rights reserved

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

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

  FOR OFFICIAL USE      

 

             

National Qualifications  

   

Mark    

     

              CS(N5)16A   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.

   

          ©  2016  Perfect  Papers  –  All  rights  reserved

   

Page 2: National Qualifications CS(N5)16A! Computing Science€¦ · National Qualifications!! ! Mark!!! ! !!!! ! ! !! CS(N5)16A! 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 decimal number 178 into the equivalent 8-bit binary number. 1        

                                    2. A computer program is created to store data about the total amount of money

taken at a school raffle.

    State the most suitable data type for the total. 1               3. The pseudocode shown below uses a simple condition.     IF pass = “VIP” THEN SEND “Special Guest” TO DISPLAY     Create a complex condition that will display “standard seating” if a person has

a “Reserved” pass or a “Guest” pass. 2

                     

   

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

Page three

          MARKS DO NOT

WRITE IN THIS

MARGIN

  4. A web browser allows a user to add bookmarks to remember websites of interest. State one other feature of a web browser. 1

              5. This pseudocode allows the user to set the temperature for his/her central

heating in degrees centigrade.

    Line 1 RECEIVE temperature FROM (INTEGER) KEYBOARD

  Line 2 WHERE temperature < 10 OR temperature > 24 DO

  Line 3 SEND “Temperature outwith comfortable range, try again” TO DISPLAY

  Line 4 RECEIVE temperature FROM (INTEGER) KEYBOARD

  Line 5 END WHILE

    Complete the table below to show normal and exceptional test data for

temperature. 2

    Type of Test Data Test Data  

Normal

  Exceptional

                                           

   

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

Page four

          MARKS DO NOT

WRITE IN THIS

MARGIN

  6. Charlie is designing a web page for a book store. Here is part of the page design.

   

    Give two improvements that could be made to make the page easier to use. 2     1.         2.           7. Explain the purpose of lines 6 to 9 in this pseudocode.     …   Line 6 REPEAT   Line 7 SEND “Please enter your selection” TO DISPLAY   Line 8 RECEIVE choice FROM (STRING) KEYBOARD   Line 9 UNTIL choice >=1 AND choice <=4 2                      

 

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

Page five

     

    MARKS DO NOT

WRITE IN THIS

MARGIN

  8. a) Explain why web data is often compressed by a server when it is transferred to a client. 1

                b) Explain what has to be done to the data received at the client before it

can be displayed. 1

              9. State the data type of the variable “found” in the code below. 1     …   Line 24 SET found to FALSE   Line 25 SET location TO 0   Line 26 REPEAT   Line 27 IF haystack[location] = needle THEN   Line 28 SET found = TRUE   Line 29 END IF   Line 30 SET location TO location + 1   Line 31 UNTIL found = TRUE OR location = 10           10. Indentation of code is one method of improving the readability of program

code. Describe two other methods of improving readability. 2

    1.         2.           11. Paul has connected his games console to his next door neighbours Wi-Fi by

guessing the password. State the law that he has broken. 1

           

 

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

Page six

          MARKS DO NOT

WRITE IN THIS

MARGIN

  12. Describe how phishing can be an online security risk. 2                         13. All of the links in this information system have been tested.  

    State one other type of testing that is used in this information system. 1                                                

 

   

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

Page seven

 

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

  SECTION 2 – 70 Marks     Attempt ALL questions     14. The Pseudocode for a program to calculate the payment due for a number of

hours worked is shown below.

  …

Line 12 SET payRate TO 8.59

Line 13 RECEIVE hoursWorked FROM (REAL) KEYBOARD

Line 14 SET payDue TO payRate * hoursWorked

 

  (a) Explain how the value in the variable payDue will be stored in the computer. 2

                    (b) The programmer writing the program, implements sections of code and

then tests them. During one of these tests the program stops running after a few lines and an error is reported.

    (i) State the type of translator used by the programmer.     1       (ii) State one disadvantage of using this type of translator. 1                 (c) At one point during implementation the programmer mis-types the word

RECEIVE, typing RCEIVE instead.

    State the type of programming error that the programmer has

introduced.

    1    

   

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

Page eight

         

14. (continued) MARKS DO NOT

WRITE IN THIS

MARGIN

    (d) A diagram of a computer system is shown below.    

  (i) Name the part of the processor labelled A above. 1         (ii) Name the part of the computer system labelled B above. 1                              

   

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

Page nine

          14. (continued) MARKS DO NOT

WRITE IN THIS

MARGIN

  (e) The following part of the program is executed.     Line 14 SET payDue TO payRate * hoursWorked     Name the part of the computer system that will carry out each of the

following tasks.

    (i) Performs the calculation. 1         (ii) Carries the location of payDue in main memory. 1         (iii) Carries the result of the calculation from the processor to the main

memory. 1

        (f) This line of the program receives a value from the keyboard.     Line 13 RECEIVE hoursWorked FROM (REAL) KEYBOARD     This value should be restricted so that it is at least 1 and less than 42.     (i) State the standard algorithm that is used to ensure that data

entered is acceptable. 1

        (ii) Using pseudocode or a programming language of your choice, write

the code to ensure that only acceptable values for hoursWorked are processed. 3

                                   

 

   

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

Page ten

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

15. Here is the Computing Science section of the Perfect Papers Web Site.  

    (a) Describe one purpose of this section of the website. 1                     (b) State the domain name of this webpage URL. 1                    

   

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

Page eleven

          15. (continued) MARKS DO NOT

WRITE IN THIS

MARGIN

  (c) The HTML for the logo uses the img element shown below.     <img src= “/cdn-images/pplogo.png” />     (i) Name the standard file format used to store the image. 1         (ii) The image could have been stored using the GIF image format.     Identify two reasons why the format given in (i) above is more

appropriate than GIF. 2

    1.         2.         (d) The web page design includes several features to aid accessibility.     (i) Identify one of these features. 1             (ii) Explain how this feature aids accessibility. 1                         (e) John is a teacher and can download papers from the website. Describe

one concern that a teacher may have when downloading a paper from the site. 1

             

   

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

Page twelve

          MARKS DO NOT

WRITE IN THIS

MARGIN

15. (continued)     (f) John uses the Advanced Search section of the site to show all the

Computing Science papers.

   

    Circle one example on the webpage above that might make use of

JavaScript. 1

    (g) Describe how the list of papers above has been sorted. 2                     (h) Clicking on the name of a paper opens the paper’s page on the website

in a new window.

    Explain why the HTML code for these links uses relative addressing. 1                

   

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

Page thirteen

       

  MARKS DO NOT WRITE IN

THIS MARGIN

16. Drop Design is a web design company. The company has a number of templates which they use with clients to quickly start new website projects.

  One of these templates is shown below.

(a) The template shown above provides consistency of font, colour, style and size of text.

Identify other features to aid good user interface design. 2  

 

   

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

Page fourteen

 

       

  MARKS DO NOT WRITE IN

THIS MARGIN

Q16. (continued)               (b) The completed web site is created using HTML.     (i) State the feature of HTML code that allows the pages on the

website to be formatted. 1

            (ii) The images for the web site are held on a separate server as

shown in the diagram below.

 

  State the type of addressing that should be used to include the file image1.jpg in the index.html page. 1

        (iii) The server cdn.dropdesign.co.uk is part of a cloud storage service.     Describe how cloud storage can be used to provide improved

access to the images for the web site. 2

                       

 

   

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

Page fifteen

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

16. (continued)       (c) Image1.jpg, before editing, is 5 inch by 6 inch with a resolution of 300

dpi and 16-bit colour depth. Calculate the file size of the image and state your answer in appropriate units. Show all your working. 3

                                    (d) The website contains a search engine.

Explain how a search engine is used to produce a list of results. 2

                                               

 

   

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

Page sixteen

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

    17. A program is written to calculate the cost of employing road crew for a rock

band tour for a number of days. Each crew member is normally paid £150 per day but will earning twice that if the crew is working in stadiums. If there are more than 10 road crew then a tour manager is required and he/she is paid 1.5 times what the crew are paid. An incomplete design for the program is shown below.

    Line 1 SET crewPay TO 150

Line 2 SEND “Enter the number of road crew and the type of tour” TO DISPLAY

Line 3 RECEIVE numberOfCrew FROM (______________________) KEYBOARD

Line 4 RECEIVE numberOfDays FROM (______________________) KEYBOARD

Line 5 SEND “Is this a Statium Tour?” TO DISPLAY

Line 6 RECEIVE stadiumTour FROM (______________________) KEYBOARD

Line 7 IF statiumTour = True THEN

Line 8 SET crewPay TO crewPay * 2

Line 9 END IF

Line 10 SET totalCrewPay = numberOfCrew * numberOfDays * crewPay

Line 11 IF numberOfCrew > 10 THEN

Line 12 totalCrewPay = totalCrewPay + (crewPay * numberOfDays * 1.5)

Line 13 SET numberOfCrew = numberOfCrew + 1

Line 14 END IF

Line 15 SEND [“The total pay for” & numberOfCrew & “ road crew for “ &

numberOfDays & “ is £” & totalCrewPay] TO DISPLAY

    (a) The above design should show the type of data being entered from the

keyboard in Lines 3, 4 and 6. State the most appropriate data types for the following variables. 3

    numberofCrew     numberOfDays     stadiumTour                

 

   

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

Page seventeen

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

17. (Continued)     (b) (i) State the lines of pseudocode that contain conditional statements. 2             (ii) State the part of the processor that compares the values in a

conditional statement. 1

        (c) The program is later improved to store the totalCrewPay for ten

different tours.

    (i) State the data structure that would be required to store the list of

totalCrewPay values. 2

            (ii) State the type of loop required to repeat the code in lines 1 to 12

for each of the ten tours. Explain why this type of loop would be used. 2

    Type of Loop     Explanation               (d) A logo for one of the rock bands is shown below.  

    Describe how the circle element of the logo would be saved as a vector

graphic. 2

             

 

   

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

Page eighteen

 

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

  18. GuitarStore are organising the catalogue of guitars and accessories that they

sell. GuitarStore want to store the details of products and the companies who manufacture them. Some sample data is shown in the table below.

    Manu

Code Manufacturer

Name Sales Email ProdRef Product Name Price

  MU01 Fender [email protected] 7627 TelecasterMX2 £726.50   MU01 Fender [email protected] 8762 Statocaster’52 £450.21   MU02 Gibson [email protected] 4241 Flying V 120 £999.99   MU04 Rickenbacker [email protected] 6133 650C Colorado £760.96

  MU04 Rickenbacker [email protected] 7182 360/12 £950.00

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

a MANUFACTURER table and a PRODUCT table.

    (i) List the fields/attributes that should be included in each table. 2     MANUFACTURER table PRODUCT table                               (ii) Identify the foreign key used to link the two tables. 1         (iii) Identify the primary key of the PRODUCT table. 1                    

 

   

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

Page nineteen

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

  18. (continued)     (b) GuitarStore have created a design for a possible mobile app for their

business.

 

  (i) Identify one feature that makes this a suitable user interface for a mobile app. 1

            (ii) It is intended that when a visitor selects “Fender”, a list of all

Fender guitars will be displayed.

    Describe what happens within the database when this button is

selected. 2

                               

 

   

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

Page twenty

       

  MARKS DO NOT WRITE IN

THIS MARGIN

  19. Stephen has a business which creates image adverts for LCD digital signage

displays in local shops, petrol stations and bus stops.

Each digital signage display shows a number of digital images from a 128 Gigabyte memory card.

    (a) The memory cards used in the digital signage displays are examples of

solid state storage. Explain why this is more suitable for the digital signage displays than magnetic storage. 2

   

                (b) If a digital image is 50 Megabytes in size, calculate how many digital

images Stephen will be able to store on a memory card before it is full. Show your working. 2

                           

 

   

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

Page twenty-one

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

19. (continued)   (c) Stephen uses a laptop to create digital images with his clients for the

digital signage displays. Describe two advantages of using a laptop rather than a tablet or smartphone for this task. 2

    Advantage 1         Advantage 2         (d) Stephen is aware that he has environmental responsibilities as the owner

of a business that uses computer equipment. He takes steps to reduce the carbon foot print of his business.

    (i) Explain what is meant by a carbon footprint. 1                 (ii) Describe two ways that Stephen could change the operation of the

digital signage displays to use less energy. 2

                                               

 

   

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

Page twenty-two

 

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

  20. A local drone shop has a flat file database storing information on just under

10,000 products that it stocks. Part of the database is shown below.

    Section ID Section

Name Section Manager Stock ID Product

Type Product Name

  7 Motors J. Mason 1028 12 Volt Dyno 210   10 Blades W. Reith 2882 Plastic 6” StyleBlade   3 Assembled R. Simpson 3911 Mid-size 361 Skyfly   6 GPS M. Shaw 6598 Tracker Locate 920 GT   12 Accessories C. Chisholm 0726 Mount Gimbal 120   7 Motors J. Mason 7881 15 Volt Honda 271   12 Accessories C. Chisholm 9201 Remote Controller A12     (a) The design structure of the database looks like this.     Field Name Field Type Field Size Validation   Section ID Number 0> AND < 20   Section Name Text 12   Section Manager Text 20   Stock ID Number   Product Type Text 20   Product Name Text 25     Name two types of validation that could be applied to the field Stock ID. 2     Validation 1     Validation 2       (b) The drone store decides to change the name of the “Accessories” section

to “Add-ons”. Describe a potential problem when changing this data in a flat file database design. 1

                               

 

   

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

Page twenty-three

 

          MARKS DO NOT

WRITE IN THIS

MARGIN

Q20. (continued)     (c) A change is required to the database to make it more useful. The fields:     InStock and Item Price     Section

ID Section Name

Section Manager

Stock ID

Product Type Product Name InStock Item

Price

  10 Blades W. Reith 2882 Plastic 6” StyleBlade False 9.99   7 Motors J. Mason 1028 12 Volt Dyno 210 True 24.95     Name a suitable field type for each of the new fields. 2     InStock     Item Price                 [END OF QUESTION PAPER]                                                        

 

[B  

   

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

Page twenty-four

          MARKS DO NOT

WRITE IN THIS

MARGIN

  ADDITIONAL SPACE FOR ANSWERS                                                                                                      

 

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

Page twenty-five

          MARKS DO NOT

WRITE IN THIS

MARGIN

  ADDITIONAL SPACE FOR ANSWERS