Question 9
AQA Computer Science June 2017 Paper 1AS3 marks
On the specification
- 9.1
- 3.1 Fundamentals of programming
- 9.2
- 3.3 Systematic approach to problem solving
Question text
9 This question will extend the functionality of the simulation program. An additional result is required from the simulation program. It is to calculate the percentage of Field cells occupied by plants. The percentage is calculated by dividing the number of cells occupied by plants by the total number of cells and multiplying by 100. What you need to do: Task 1 Modify the subroutine CountPlants to calculate and display the percentage (rounded to the nearest whole number) of the field with plants. Task 2 Test that your amended program code works by conducting the following test: • start the simulation • enter 1 (one year) • enter Y (load a data file) • enter the filename TestCase.txt Evidence that you need to provide Include the following in your Electronic Answer Document. 9.1 Your amended PROGRAM SOURCE CODE for the subroutine CountPlants. [2 marks] 9.2 SCREEN CAPTURE(S) showing the Field contents and messages displayed for spring. Data for the other seasons should not be included in the evidence. [1 mark]