Question 16
AQA Computer Science June 2025 Paper 1 (7516/1)AS12 marks
On the specification
- 16.1
- 3.1 Fundamentals of programming3.2 Fundamentals of data structures
- 16.2
- 3.3 Systematic approach to problem solving
- 16.3
- 3.3 Systematic approach to problem solving
Question text
16 The Skeleton Program is to be extended so that the pirate can come ashore at any location that is a beach. The user will be asked to select the landing place. What you need to do: Task 1 Amend the subroutine FindLandingPlace so it asks the user whether they want to use a different landing place to the one marked by X on the map. If the user chooses to change the landing place, they should be asked for a row and a column for the new landing place. The subroutine should then check whether the given square is part of a beach. A beach square is sand and has a square of water on the N, E, S or W side. • If the given square is a beach square: o the pirate’s position should be set to this square o the pirate (P) should be placed on the map o the map should be displayed. • If the given square is not a beach square: o the pirate will use the landing place given on the map (marked by X) o a suitable message should be output. You should assume that the user enters a row and column number that are not at the very edge of the map, ie the row number is not 0 or 19 and the column number is not 0 or 41 for the map in the data file. Task 2 Test that the changes you have made work by conducting the following test: • run your amended Skeleton Program • choose a different landing place • enter 6 for the row • enter 1 for the column Task 3 Test that the changes you have made work by conducting the following test: • run your amended Skeleton Program • choose a different landing place • enter 17 for the row • enter 21 for the column • enter W • enter 1N Evidence that you need to provide Include the following evidence in your Electronic Answer Document. 16.1 Your PROGRAM SOURCE CODE for the entire subroutine FindLandingPlace. [10 marks] 16.2 SCREEN CAPTURE(S) showing the requested test described in Task 2. The SCREEN CAPTURE(S) must show the user input and the map showing where the pirate lands. [1 mark] 16.3 SCREEN CAPTURE(S) showing the requested test described in Task 3. The SCREEN CAPTURE(S) must show the user input and the map showing the pirate’s position after walking. [1 mark]