Question 10
AQA Computer Science June 2024 Paper 1 (7517/1)A level6 marks
On the specification
- 10.1
- 3.1 Fundamentals of programming
- 10.2
- 3.1 Fundamentals of programming
- 10.3
- 3.1 Fundamentals of programming
- 10.4
- 3.1 Fundamentals of programming
Question text
10 This question is about the CheckForMatchWithPattern method in the Puzzle class. CheckForMatchWithPattern uses nested iteration and exception handling. 10.1 State the name of another method in the Puzzle class that uses nested iteration. [1 mark] 10.2 Explain what problem would occur if the first two iteration structures in the method CheckForMatchWithPattern had been inside the exception handling structure instead of outside it. [1 mark] 10.3 Describe what exception handling is used for in the CheckForMatchWithPattern method. [3 marks] 10.4 A value of 10 is returned sometimes when it should not be. Figure 6 and Figure 7 show example 4×4 grids. The pattern in Figure 6 correctly results in a value of 10 being returned. The pattern in Figure 7 also results in a value of 10 being returned, but it should return 0. Figure 6 Figure 7 X X X X X X X X X X Explain why the pattern in Figure 7 results in the value 10 being returned by the CheckForMatchWithPattern method. [1 mark] You are advised to spend no more than 70 minutes on this section. Enter 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.