Question 17
AQA Computer Science June 2024 Paper 1 (7516/1)AS9 marks
On the specification
- 17.1
- 3.1 Fundamentals of programming3.2 Fundamentals of data structures3.3 Systematic approach to problem solving
- 17.2
- 3.3 Systematic approach to problem solving
Question text
17 This question extends the functionality of the Skeleton Program, so that the length of time it takes to serve a buyer depends on the speed of the till operator. The speed of the till operator is the number of items they can handle in a time unit. The simulation is to calculate the serving time for a buyer based upon the number of items in the buyer’s basket and the speed of the till operator. The speed of each till operator needs to be stored for each till. What you need to do: Task 1 An extra value is required for each element of Tills, representing the speed of the operator at a till. Amend the declaration for Tills. Task 2 Amend the subroutine ResetDataStructures so that the extra values are set so that till 0 has an operator speed of 7 and till 1 has an operator speed of 6. Each subsequent till should have its operator speed set to a value 1 less than the previous till. Task 3 Amend the subroutine ChangeSettings so that it requires the user to set the till speed of each till in use. The user should be given information about which till they are setting the current till operator speed of and the current default value. ChangeSettings will require Tills as a parameter and, depending on your language, as a return value, so the call to this subroutine will also need amending. Task 4 Amend the subroutine CalculateServingTime so that the serving time depends on the speed of the till operator at the till that is being used. Task 5 Test that the changes you have made work by conducting the following test: • run your amended Skeleton Program • enter Y • enter 6 • enter 3 • enter 3 • enter 2 • enter 1 Evidence that you need to provide Include the following evidence in your Electronic Answer Document. 17.1 Your PROGRAM SOURCE CODE for the entire subroutine ResetDataStructures, the entire subroutine ChangeSettings and the entire subroutine CalculateServingTime and any code that you have changed or added to the Skeleton Program. [8 marks] 17.2 SCREEN CAPTURE(S) showing the requested test described in Task 5. The SCREEN CAPTURE(S) only need to show the entire output for time unit 5. [1 mark]