ExamBank Scot · Higher Computing Science question bank · All Higher Computing Science questions
14 marks · Standard algorithms
Using pseudocode, or a programming language of your choice, write an algorithm for a subroutine that will count the number of pupils who achieved a grade B in both tests. Mrs McColl implements the program using global variables. Another teacher suggests that she makes use of parameter passing instead. State two benefits of using parameter passing rather than global variables. Parameters are used to pass data between subprograms. Parameters can be passed by reference or passed by value. Explain why passing by value is more demanding on system resources when the data being passed is held in an array. Mrs McColl’s program is modular and makes use of functions. Explain what is meant by a function. Mrs McColl’s employer must conform with the requirements of the Regulation of Investigatory Powers Act (RIPA). State two responsibilities, detailed in this act, for the employer. Describe two concerns Mrs McColl may have as a result of this act. Mrs McColl is a computing teacher who creates a program to grade her pupils’ work. Mrs McColl’s students have had two tests, one in Software Design and Development (SDD) and one in Information Systems Design and Development (ISDD). SDD Name ISDD Liam C B Sohale D C Craig A A Katya B B Rebecca B C Wei-Lin B B
SET total TO 0 FOR counter FROM 0 TO 5 DO IF SDD[counter] = "B" AND ISDD[counter] = "B" THEN SET total TO total + 1 END IF END FOR SEND ("The total number of pupils attaining a B in both tests was " & total) TO DISPLAY Visual Studio Set total to 0 For counter = 0 To 5 IF SDD[counter] = "B" AND ISDD[counter] = "B" Then lstresults.Items.Add(pupil(cou nter)) total = total + 1 End If Next lstresults.Items.Add("The total number of pupils achieving a B in both tests was ") lstresults.Items.Add(total) 1 mark for initialising total 1 mark for use of fixed loop (with end loop or indentation) 1 mark for complex IF (with end if or indentation) 1 mark for indicating array () for correct variables within loop. Do not accept a fixed value. 1 mark for incrementing total Accept length of array or length of array -1 Allow alterative solutions that are fully correct eg concatenated grades • (Data flow is clearer so) code is more readable/easier to maintain • Portability is improved as code can be reused (without altering variable names) • Aids modularity • Reduces clashes between variable names • Reduces impact or load on main memory • Any other valid • Makes a copy of the array • Increases the number of processing instructions • Increases RAM requirements 1 mark for stating a copy is made 1 mark for either effect on processor or RAM Do not accept more storage required • Returns a single value (used in assignment) Do not accept other expressions of modular eg block of code • Inform employees of access to digital communication • Provide access/encryption keys to authorised authorities/ bodies/personnel • Have facilities to store digital communications • Have facilities/software to monitor digital communications Digital communication/data Providing encryption keys is a form of access and cannot be treated as a separate answer. Surveillance must relate to digital communications. CCTV etc is not relevant. Description involving: • Freedom of speech • Privacy One description from each bullet for 2 marks OR Two different examples relating to Freedom of Speech/Privacy for 1 mark each OR Freedom of Speech/Invasion of privacy (1) with an example (1)
Previous question: Higher Computing Science 2016 Question 9 (CfE)
Next question: Higher Computing Science 2016 Question 11 (CfE)