OCR H446 A-Level Computer Science - WordPress

2y ago
58 Views
10 Downloads
538.93 KB
19 Pages
Last View : 1m ago
Last Download : 2m ago
Upload by : Adalynn Cowell
Transcription

OCR H446A-Level Computer ScienceREVISION BOOKLET – MARK SCHEME2.1 ELEMENTS OF COMPUTATIONAL THINKINGContent in H446 A-Level Computer Science:1.1 The characteristics of contemporary processors, input, output and storage devices1.2 Software and software development1.3 Exchanging data1.4 Data types, data structures and algorithms1.5 Legal, moral, cultural and ethical issues2.1 Elements of computational thinking2.2 Problem solving and programming2.3 Algorithmswww.learn-computerscience.com

EXAM QUESTIONSQUESTION 1A supermarket uses a stock control system. Details of products are stored on a stockdatabase.Explain how the system used in the supermarket can control the quantity of tins of beansin stock so that the chance of running out is minimised.Note: This is intended to be adifficult question.Mark points need to be fairlyprecise – do not read toomuch into a responseExaminer's CommentsThere were some Barcode of item purchased is read at checkout / it is scanned incomprehensive responsesBarcode is compared with barcodes stored on stock filehere, while many good(Field containing) number of tins of beans is decrementedanswers were spoiledNew value is compared with the field containing the minimum number of tins of beans that arebecause the processalloweddescribed did not considerIf number of tins in stock is less than minimum stock / value is below limit and no order is outstanding for this item the need to avoid6automatically ordering more search supplier file for details of supplier and use these details either to place an ordertins after every tin is sold.automatically or produce report for managerFew were unable to earnSet field showing outstanding ordersome credit even if it wasWhen order arrives, number in stock (field) is incrementedonly for scanning the tinswhen sold. This proved to bean excellent discriminatorquestion. This question wasan ideal question to beanswered as a series ofnumbered points, answeringin this way could have helpedsome candidates arrangetheir thoughts in what is asequential process.

QUESTION 2State the three basic programming constructs used to control the flow of execution, givingyour own example of each.Do not accept ‘loop’All examples must be code, do not credit explanations.Iteration Allow examples from given Example should be either a FOR, WHILE or REPEAT UNTILcodeSelection Example should be either an IF, SWITCH, CASE or SELECTSequence Example should be at least two consecutive lines of code6Examiner's CommentsThis was largely wellanswered, though some ofthe code examples foriteration were for infiniteloops.

QUESTION 3A cruise liner company has to produce daily documentation for passengers. The passengersspeak a number of different languages. Currently, bilingual members of the crew translateand type different versions of documentation. The company decides to automate thetranslation process. The company’s system analyst follows a systems lifecycle approach. Thenext stage involves establishing the requirements from potential users.Describe three methods that could be used to gather requirements in this scenario. Questionnaire [1] Interview [1] Observation [1] set of questions given out to potential users to fill in and return [1] face to face discussions where potential users are asked questions. [1]Examiner's Comments Where users of the existing system are observed using it. [1]6Most candidates could statethree methods for gatheringrequirements but in somecases descriptions lacked Meeting [1] Group of users sit down with analyst to discuss current system [1] Existing documentation [1] used in the system is examined [1](Max 3 for methods named, Max 3 for their descriptions)clarity.

QUESTION 4A car racing team uses a car simulation to test their drivers in a range of cars on differentrace tracks. The car simulator uses an abstraction of the real car and race track.Identify two ways in which the simulator could use abstraction.Accept any reasonablee.g.answer Examiner's CommentsReduces track sceneryLimited functionality on car dashboardSimplified controls2Many candidates confusedSimplified physicsthe concept of abstractionSimplified / removed weather(simplification) with therequirement to make agenuinely realistic simulation.Identify three inputs that will be required to configure the initial conditions for running thesimulation.Allow any reasonablealternativee.g.Examiner's Comments Track nameMany candidates answered3Car typewell, but some misread theDriver namequestion and identified inputdevices that could be usedwithin the simulation, ratherthan initial startingparameters as required.

QUESTION 5Fig 2.1 shows the flight paths between a country’s airports. The value in bold beneath eachnode is the heuristic value from E.State the full name of the data structure shown in Fig 2.1.1 mark per bullet Weighted/Undirected2GraphThe structure in Fig 2.1 is searched using the A* algorithm making use of the heuristicvalues.State what the heuristic values could represent in Fig 2.1.E.g. Weighting/cost based on estimated distance from final node1State the purpose of heuristic values in the A* algorithm.Used to speed up process of finding solution1

Perform an A* algorithm on the data structure in Fig 2.1 to find the shortest distancebetween H and E. Show each step of the process, and the calculations performed for eachnode visited.1 mark per bullet, max 7 for calculations/explanation, max 1 for correct final path Visiting H with correct heuristicVisiting G and N from Ho Identifying G as the smallest valueVisiting L and M from Go Calculating distance heuristic for L and MIdentifying L as the smallest valueVisiting Eo Calculating correct distance heuristic for G and NCalculating distance heuristic for EFinal path: H-G-L-E8e.g.Give one decision that is made in the A* algorithm and describe the effect of this decisionon the next step(s) of the algorithm.1 mark for decision, 2 marks for effecte.g.Decision: Choosing which node to take nextThe shortest distance heuristic is taken3Effect: All adjoining nodes from this new node are takenOther nodes are compared again in future checksAssumed that this node is a shorter distanceAdjoining nodes may not be shortest path .may need to backtrack to previous nodes

A programmer is interested in using concurrent processing to perform a searchingalgorithm. Explain how concurrent processing could be used in searching algorithms andevaluate the benefits and trade-offs from implementing concurrent processing in asearching algorithm.AO1: knowledge andunderstanding Indicativecontent Carrying out morethan one task at atime Mark Band 3 – High level (7-9 marks)The candidate demonstrates a thorough knowledge and understanding of concurrent processing; theMultiple processorsEach processorperformsmaterial is generally accurate and detailed.simultaneouslyThe candidate is able to apply their knowledge and understanding directly and consistently to the c ontext provided (searching algorithms).Each processorEvidence/examples will be explicitly relevant to the explanation.performs tasksThe candidate provides a thorough discussion which is well balanced.independentlyEvaluative comments are consistenly relevant and well considered.There is a well-developed line of reasoning which is clear and logically structured. The information presentedand/oris relevant and substantiated. Mark Band 2 – Mid level (4-6 marks)A program hasmultiple threads The candidate demonstrates reasonable knowledge and understanding of concurrent processing; theEach thread startsmaterial is generally accurate but at times underdeveloped.and ends atThe candidate is able to apply their knowledge and understanding directly to the context provided althoughdifferent timesone or two opportunities are missed. (searching algorithms) Evidence/examples are for the most partimplicitly relevant to the explanation.The candidate provides a reasonable discussion, the majority of which is focused. Evaluative comments are,9 Each threadoverlaps for the most part appropriate, although one or two opportunities for development are missed. There is a lineEach thread runsindependentlyof reasoning presented with some structure. The information presented is in the most part relevant andsupported by some evidenceAO2: ApplicationMark Band 1 – Low Level (1-3 marks)The candidate demonstrates a basic knowledge of concurrent processing with limited understanding shown; Eachthe material is basic and contains some inaccuracies. The candidates makes a limited attempt to applyprocessor/threadacquired knowledge and understanding to the context provided (searching algorithms).performs a searchThe candidate provides a limited discussion which is narrow in focus. Judgements if made are weak andin a differentunsubstantiated.The information is basic and comunicated in an unstructured way. The information is supported by limiteddirection evidence and the relationship to the evidence may not be clear.Rather than goingdown one path, godown 2 0 marks No attempt to answer the question or response is not worthy of credit.E.g. apply differentsearchessimultaneously perform breadthfirst and depth-firstsimultaneously E.g. A* take the twoshortest routes ateach decision

point, update sametable Linear search canhave multipleprocessorssearching differentareas at the sametime. Binary searchdoesn't benefitfrom an increase inspeed ntprocessing in searching e.g. Possibly find Takes up more Increase program May waste timesolution fastermemorythroughputinvestigatinginefficient solutions More difficult toprogram especiallyto cooperate More memory Linear searchintensivescales very withadditionalprocessors Binary search canperform better onlarge data sets withone processor thanlinear search withmany processors

QUESTION 6Dexter is leading a programming team who are creating a computer program that willsimulate an accident and emergency room to train hospital staff. Dexter has been told heshould make use of caching in the simulation. Describe what is meant by caching andexplain how caching can be used within the simulation.2 marks for definition, max 2 for applicationCaching: Data that has been used is stored in cache/ram in case it is needed againAllows faster access for future useAllow any reasonableexample4Application:A well-developed examplee.g.can gain two marks Store patients' details/conditions/appearanceDesign of people in the simulationDesign of specific rooms

QUESTION 7Kim is writing an object-oriented program for a four-player board game. The board has 26squares that players move around, as shown in Fig 5.1.Fig 5.1Each player takes it in turn to roll two dice. They then move that number of spaces on theboard. If they roll a double (both dice have the same value), they then take a card from thedeck. The deck contains 40 cards that each include a sentence (such as “You have won thelottery”). The sentence on the card determines if money is given or taken away from theplayer.Fig 5.2

Each square (apart from Start and Miss a turn) has an animal associated with it that theplayer can purchase, if it has not been purchased already, for example square 6 has aSquirrel. Fig 5.2 shows an example of one of these animals. Once a player has purchasedthe animal, any opposing player which subsequently lands on the square/animal has to paya fine.Each animal can be upgraded, with each upgrade the game charges more each time aplayer stops on them. For example, with no upgrade with level 0 squirrel costs 10 when aplayer stops on it. If 1000 is paid to upgrade, the squirrel is then a level 1 animal and nowcharges 50 for a stop.The cost to purchase and upgrade the animal is the same. Each animal can be upgraded toa maximum of level 3.When a player lands on or passes the square ‘Start’ (position 0), they receive 500. If theyland on ‘Miss a turn’ (position 13), they miss their next turn.A class, player, stores the player’s ID (P1, P2, P3, P4), their current board position and theamount of money they have.Fig 5.3 shows a class diagram for player. A class diagram describes a class. It contains theclass name, followed by the attributes, then the methods.Fig 5.3The constructor creates a new instance of player, taking the player’s ID as a parameter.The board position is set to 0, and money to 2000.

Write, using pseudocode, the constructor method for the player class.1 mark per bullet to max 3 Declaring the procedure and taking a player ID as parameterSetting playerID to parameterSetting boardPosition to 0 and money to 20003e.g.A class, animal, define the attributes and methods for the animals stored in each square.Fig 5.4 shows a class diagram for animal.Fig 5.4The constructor takes the required data as parameters and then sets currentLevel to 0and assigns the parameters as the remaining attributes for the new object.

Write, using pseudocode, the constructor method for the animal class.1 mark per bullet to max 4 Declaration as public and procedure, named constructor/new and Taking all correct parameters(missing currentLevel) Sets currentLevel to 0Setting all the data to the matching parameters taken4Write, using pseudocode, the code to create an instance of animal for the Squirrel shown inFig 5.2, positioned on square number 6, for the constructor function you wrote above.1 mark per bullet to max 2 Creating new instance e.g. squirrel new AnimalParameters matching part (b)(i)2e.g.

The board is stored as a 1D array, board, of data type animal. The spaces at 0, and 13, areleft as empty elements that are checked using separate functions.Complete, using pseudocode, the function to: Roll both dice Move the player, the dice number of spaces If a double is rolled, calls the procedure pickDeck Adds 500 if they have passed or landed on Start Calls the procedure missAGo if they land on space 13 or Calls the procedure checkAnimal Returns the new position

1 mark for each correctly completed space6The parameter currentPlayer from above can be passed by value or by reference.Explain the difference, benefits and drawbacks between passing by value and by reference.Recommend which should be used for currentPlayer, justifying your decision.Mark Band 3 – High level (7-9 marks)AO1: Knowledge andThe candidate demonstrates a thorough knowledge and understanding of passing values by reference andUnderstanding Indicativeby value; the material is generally accurate and detailed.contentThe candidate is able to apply their knowledge and understanding directly and consistently to the contextBy Valueprovided.Evidence/examples will be explicitly relevant to the explanation. The candidate provides a thorough sends the actual if changes are madevaluediscussion which is well balanced. Evaluative comments are consistently relevant and well consideredThere is a well-developed line of reasoning which is clear and logically structured. The informationthen only the localpresented is relevant and substantiated.copy is amendedMark Band 2 – Mid level (4-6 marks)The candidate demonstrates reasonable knoledge and understanding of passing values by reference andby value; the material is generally accurate but at times underdeveloped.9By ReferenceThe candidate is able to apply their knowledge and understanding directly to the context provided althoughone or two opportunities are missed. Evidence/examples are for the most part implicitly relevant to the explanation.The candidate provides a reasonable discussion, the majority of which is focused. Evaluative commentsvalue The actual value is If changed the originalare, for the most part appropriate, although one or two opportunities for development are missed.There is a line of reasoning presented with some structure. The information presented is in the most partrelevant and supported by some evidencesends a pointer to thenot sent/receivedis also changed whenthe subroutine ends

Mark Band 1 – Low Level (1-3 marks)The candidate demonstrates a basic knowledge of passing valuesAO2: Applicationby reference and by value with limited understanding shown; the material is basic and contains someinaccuracies. The candidates makes a limited attempt to apply acquired knowledge and understanding tothe context provided. Send by valueThe currentPlayerThe candidate provides a limited discussion which is narrow in focus. Judgements if made are weak andvalue is not /does notunsubstantiated.need to be changedThe information is basic and comunicated in an unstructured way. The information is supported by limitedevidence and the relationship to the evidence may not be clear.in the subprogram 0 marksSend by referenceThe currentPlayervalue is updatedNo attempt to answer the question or response is not worthy of credit.AO3: Evaluation ByValue creates new ByReference meansmemory space existing memoryspace is used Depends if original If local and justvariable is local/globalreferenced, send byvalue If original value needsediting send byreference If passing byreference theninstead of returningposition the codecould just amendcurrentPlayer.position If passing by valuethere could beinconsistencies whencurrentPlayer ispassed to othermethods, for examplepickDeck

The deck is stored as a zero-indexed 1D array, named deck, of type Card.The class diagram for Card is shown in Fig 5.5.Fig 5.5The array, deck, is treated as queue, with a variable, headPointer, identifying the first cardin the deck. When a card has been used, the head pointer increases to move to the nextposition. If the end of the deck is reached, the head pointer returns to 0 and starts again.The procedure pickDeck: Takes the current player as a parameter Outputs the text to be displayed from the first card in the queue Adds or subtracts the amount to/from the current player’s money Increases the head pointerWrite, using pseudocode, the procedure pickDeck.1 mark per bullet to max 6 Procedure declaration with correct name and parameterOutputting the correct text from deck at headPointerSending to currentPlayer.setMoney getMoney deck at head pointer amountIncrease the head pointerSet headPointer to 0 if position 40 or greater6

The procedure checkAnimal: Takes the current player as a parameter Accesses the data for the animal at the player’s position in the array board If the animal is free, asks the player if they would like to purchase the animal andoutputs its name and cost, if they choose to buy the animal, it calls the procedurepurchase() with the player and animal as parametersIf that player owns the animal, and it is not at level 3, it asks if they would like to upgrade the animalIf they would like to upgrade, it calls the method upgrade for that animal with the current player as a parameterIf a different player owns the animal, it calls the method getAmountToCharge() for that animal, sending this value and the current player as parameters to the procedurechargeStay()Write, using pseudocode, the procedure checkAnimal. Declaring the procedure with correct parametersCheck if the space/animal is freeooIf free, outputting name and costChecking if they want to buy If they own the animal, checking if they can upgrade Calling purchase with current player and animalIf they can, asking if they want to upgrade outputting the costIf they want to, calling the upgrade methodIf they don't own the animaloCalling chargeStay with the amount to charge and the current playerAllow follow through for10incorrect accessing ofmethods

OCR H446 A-Level Computer Science REVISION BOOKLET – MARK SCHEME 2.1 ELEMENTS OF COMPUTATIONAL THINKING Content in H446 A-Level Computer Science: 1.1 The characteristics of contemporary processors, input, output and storage devices 1.2 Software and software development 1.3 Excha

Related Documents:

The OCR A Level in Computer Science will encourage learners to be inspired, motivated and challenged by following a broad, coherent, practical, satisfying and worthwhile course of study. It will provide insight into, and experience of how computer science works,

A Level Computer Science H446/02 Algorithms and Programming Thursday 22 June 2017 – Morning Time allowed: 2 hours 30 minutes . *6827705853* OCR is an exempt Charity *H44602* 2 OCR 2017 Answer all the questions. Section A 1 A programmer needs to sort an array of numeric data using

A Level in Economics i Contents Introducing A Level Economics (from September 2015) ii Teaching and learning resources iii Professional development iv 1 Why choose an OCR A Level in Economics? 1 1a. Why choose an OCR qualification? 1 1b. Why choose an OCR A Level in Economics? 2 1

OCR Biology Course Guide AS A2. Heinemann is working exclusively with OCR to produce an exciting suite of resources tailored to the new OCR GCE Biology specification. Written by experienced examiners, OCR AS and A2 Biology provide you with

2 OCR 2021 . GCSE (9–1) in Classical Civilisation. 1. 1 Why choose an OCR GCSE (9–1) in . Classical Civilisation? 1a. Why choose an OCR qualification? Choose OCR and you’ve got the reassurance that you’re working with one of the UK’s leading exam boards. Our new OCR GCSE (9–1) in Classical Civilisation course has been developed in .

A Level in Design and Technology Contents. 1 Why choose an OCR A Level in Design and Technology? 3 1a. Why choose an OCR qualification? 3 1b. Why choose an OCR A Level in Design and Technology? 4 1c. What are the key features of this specification? 6 1d. How do I find o

OCR GCSE Computer Science Revision Checklist OCR Component 01 Computing Systems 80 marks –1 hour and 30 minutes, Written paper (no calculators allowed) OCR Component 02 Computational Thinking, Algorithms & Programming 80 marks –1 hour and 30 minutes, Written paper (no calculators al

Business Planning and Financial Forecasting: A Guide for Business Start-Up. This web-based guide is available on Small Business BC’s website by clicking on Small Business Guides at www.smallbusinessbc.ca. For all your other business information needs go to British Columbia’s award-winning resource centre for business information and planning tools. Small Business BC Suite 82, 601 West .