Question 11

AQA Computer Science June 2019 Paper 1A level8 marks

On the specification

11.1
3.1 Fundamentals of programming
11.2
3.3 Systematic approach to problem solving
Question text

11 This question refers to the subroutine GetItem. Currently the player can carry any number of items. The game is to be changed so that the player cannot carry more than five items. Change the subroutine GetItem so that if the player is already carrying five items and they try to get an item that they would normally be able to get then the item is not added to their inventory. An appropriate message should be displayed saying that they can’t get that item because they are carrying too much. If they are carrying fewer than five items then the subroutine should add the item to the player’s inventory. Test that the changes you have made work: • run the Skeleton Program • load the file flag1.gme • enter the command get torch • then enter the command get red die • then enter the command open cupboard door • then enter the command go east • and then enter the command get book. Evidence that you need to provide Include the following evidence in your Electronic Answer Document. 11.1 Your PROGRAM SOURCE CODE for the amended subroutine GetItem. [7 marks] 11.2 SCREEN CAPTURE(S) showing the requested test. You must make sure that evidence for all parts of the requested test by the user is provided in the SCREEN CAPTURE(S). [1 mark]