Question 6
AQA Computer Science June 2018 Paper 1A level14 marks
On the specification
- 6.1
- 3.1 Fundamentals of programming
- 6.2
- 3.1 Fundamentals of programming4.1 Fundamentals of programming
- 6.3
- 4.2 Fundamentals of data structures
- 6.4
- 4.2 Fundamentals of data structures
- 6.5
- 4.2 Fundamentals of data structures
- 6.6
- 3.1 Fundamentals of programming
- 6.7
- 3.1 Fundamentals of programming
Question text
6.1 State the name of an identifier for a built-in function used in the Skeleton Program that has a string parameter and returns an integer value. [1 mark] 6.2 State the name of an identifier for a local variable in a method in the QueueOfTiles class. [1 mark] 6.3 The QueueOfTiles class implements a linear queue. A circular queue could have been used instead. Explain why a circular queue is often a better choice of data structure than a linear queue. [2 marks] 6.4 It could be argued that the algorithms for a linear queue lead to simpler program code. State one other reason why a linear queue is an appropriate choice in the Skeleton Program even though circular queues are normally a better choice. [1 mark] 6.5 State one additional attribute that must be added to the QueueOfTiles class if it were to be implemented as a circular queue instead of as a linear queue. [1 mark] 6.6 Describe the changes that would need to be made to the Skeleton Program so that the probability of a player getting a one point tile is the same as the probability of them getting a tile worth more than one point. The changes you describe should not result in any changes being made to the points value of any tile. You should not change the Skeleton Program when answering this question. [4 marks] 6.7 The GetChoice subroutine uses a built-in function to convert a string to uppercase. Describe how a string consisting of lowercase characters could be converted to uppercase using only one iterative structure if the programming language being used does not have a built-in function that can do this conversion. You may assume that only lowercase characters are entered by the user. You should not change the Skeleton Program when answering this question. [4 marks] You are advised to spend no more than 70 minutes on this section. Type your answers to Section D in your Electronic Answer Document. You must save this document at regular intervals. These questions require you to load the Skeleton Program and to make programming changes to it.