Question 11
AQA Computer Science June 2024 Paper 1 (7517/1)A level5 marks
On the specification
- 11.1
- 3.1 Fundamentals of programming3.3 Systematic approach to problem solving
- 11.2
- 3.3 Systematic approach to problem solving
Question text
11 This question refers to the method AttemptPuzzle in the Puzzle class. The Skeleton Program is to be changed so that it checks the choice made by the user for the column number. A choice is valid if it is between one and the number of columns in the puzzle inclusive. You do not need to add checks for the row number. The program should keep getting the user to enter a value until a valid choice has been made. What you need to do Task 1 Modify the method AttemptPuzzle so it checks that the value entered by the user is valid. If an invalid value is entered, the user should be made to enter another value. Task 2 Test that the changes you have made work: • run the Skeleton Program • press the Enter key • enter 1 • enter 10 • enter 4 Evidence that you need to provide Include the following evidence in your Electronic Answer Document. 11.1 Your PROGRAM SOURCE CODE for the amended method AttemptPuzzle. [4 marks] 11.2 SCREEN CAPTURE(S) showing the results of the requested test. [1 mark]