Question 11
AQA Computer Science June 2017 Paper 1AS13 marks
On the specification
- 11.1
- 3.1 Fundamentals of programming3.2 Fundamentals of data structures
- 11.2
- 3.3 Systematic approach to problem solving
Question text
11 This question will further extend the functionality of the simulation program. In the autumn, when plants drop their seeds, there may be a prevailing wind that shifts the seeds so they land in a different position. If there is no wind the seeds land as shown in Figure 8. Figure 8 .SSS. .SPS. .SSS. If there is a prevailing wind from the east the seeds will land as shown in Figure 9. Figure 9 SSS.. S.P.. SSS.. If there is a prevailing wind from the northwest the seeds will land as shown in Figure 10. Figure 10 ..PSS ..S.S ..SSS The other wind directions as shown in Figure 11 have similar effects on where the seeds land. Each wind direction should occur randomly with each wind direction (or no wind at all) occurring with a 1 in 9 chance. Figure 11 What you need to do: Task 1 Modify the subroutine SimulateAutumn to change the position where the seeds land, depending on the prevailing wind direction. Include code to output a message giving the name of the wind direction that was generated randomly. If there was no wind an appropriate message should be displayed. Task 2 Test that your amended program code works by conducting the following test. Without loading a data file run the simulation in stepping mode until two different wind directions have occurred. Evidence that you need to provide Include the following in your Electronic Answer Document. 11.1 Your amended PROGRAM SOURCE CODE for the subroutine SimulateAutumn. [12 marks] 11.2 SCREEN CAPTURE(S) showing the Field contents and messages displayed for two autumns with different prevailing wind directions. Data for the other seasons does not need to be included in the evidence. [1 mark]