
































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

































A-Level OCR Computer Science Paper 2 / OCR A Level Computer Science Paper 2
Give an example of a switch/case branch with the use of a default statement - ANS-switch Month: case "Jan": print("1") case "Feb": print("2") default: print("invalid month") end switch What is computational thinking? - ANS-The ability to think logically about a problem in a way a computer can execute it and apply techniques for solving it using a set of problem solving methods. Why is computational thinking important? - ANS-As many overarching problems are very difficult to understand What is the aim of computational thinking? - ANS-To be able to make an overarching problem understood and then formally represented and solved What does computational thinking require? - ANS- Computational thinking requires algorithmic thinking What stages does algorithmic thinking require? - ANS- Understanding the problem
What is data abstraction? - ANS-Data abstraction is using a data structure without being concerned how it's implemented Give an example of data abstraction - ANS-creating a stack in a subroutine without having to know how they will be implemented What is generalisation? - ANS-Generalisation is a part of the abstraction process by grouping together items with similar features that are relevant to the problem (i.e. ignoring irrelevant features). What can sometimes be deduced from generalisation? - ANS-From generalisation a common approach that may already exist or can be created can be discovered which can then be reused to solve similar problems Why is all high level coding an abstraction? - ANS-All high level coding is an abstraction because one high level command may required several machine code instructions to complete. The programmer does not need to know how this high level command is implemented into the computer at a machine code level What are layers? - ANS-Layers is the practice of organising programs into separator functional components that
interact in a hierarchical manner with each layer usually only having an interface to the layer above and the layer below it What is a data model? - ANS-A data model is an abstract model that organises elements of data and how they relate to one another and to real world entities What is an entity relationship diagram? - ANS-An entity relationship diagram is a graphical model to represent the relationship between different entitites What is an overall definition of generalisation? - ANSGeneralisation is solving new problems based on previous problems for which we have an existing solution normally involving the use of an algorithm to solve a problem and adapting it so it can solve similar problems Why is abstraction required? - ANS-Abstraction enables the programmer to focus on the important aspects of a program rather than focusing on unnecessary detail What does abstraction enable? - ANS-Abstraction enables:
problem
If problem the abstract model is representing can be solved using a computer program what must you then need to consider? - ANS-- What are the key features of the problem
stake holders for the program By applying the considerations before developing an abstract program what does it allow for? - ANS-By considering all the factors before creating an abstraction model, only the relevant features are included and unnecessary detail not required by the target user group can be omitted What is thinking ahead? - ANS-Identifying the preconditions of a system, the inputs, outputs and reusable components. What may you consider when outlining a solution's outputs?
In order to produce the necessary outputs what does a program require? - ANS-In order to produce the necessary outputs, the program must have the necessary inputs. At this stage, the source of those inputs and the order and format in which they are supplied is an important consideration What about the data must be considered when designed a proposed solution to the problem? - ANS-The designer must decide upon data and structures required for the proposed solution to the problem What are preconditions? - ANS-Preconditions are requirements which must be met before a program can be executed. Give examples of preconditions that can be specified within documentation - ANS-- Requirements for the specification specification the device to be able to run the program
Why is cached data important? - ANS-Cached data can replace the need for recalculations or the need to transfer data from slow to access storage online or on a disk Give an example for how caching is used for web access
What is prefetching? - ANS-Prefetching is where an algorithm predicts which instructions or data are likely to be required by a program before it is required. This likely needed data is fetched and stored in cache ready to be used by the program, minimizing delays waiting for data or instructions to be fetched from storage How does prefetching affect programming performance? - ANS-Prefetching can significantly improve the performance of a program or sub program What can limit the efficiency of a program that uses prefetching? - ANS-The improvement of a program's performance due to prefetching is limited by the prefetching algorithm's efficiency as it if it doesn't effectively predict what information the program may require there will be no efficiency improvement. When developing programs how can certain commonly used functions be reused? - ANS-Commonly used functions can be pre-written and be provided as libraries within the programming language for reuse by the programmer What are the advantages of reusing pre-written components
What types of solutions may be inappropriate for top level diagrams? - ANS-Event driven programs do not easily fit into the model of hierarchal structure as there are parallel strands for linked objects but the top down design can be used for the processes within these linked objects After decomposition has occurred what should then take place? - ANS-Following decomposition, development for each individual solution should take place What could each solution for a decomposed subproblem be?
What would each decomposed sub problem represent? - ANS-Each decomposed subproblem should represent a single self contained solution model estate can be developed and tested independently from the rest of the code and then integrated into the main solution Why is it important to identify the order in which individual modules must be developed and tested? - ANS- As some modules required data passed from a previous component as an input
What must happen as data is passed between modules? - ANS-As data is passed between modules, the validity of the data should be checked before it is passed on What is a sub procedure? - ANS-A sub procedure/procedure is a named part of a larger process that may be used several times but does not return any values to the calling code What does thinking logically involve? - ANS-Thinking logically involves inferring things from what is known and requires understanding where decisions need to take place and their consequences What are the two approaches to thinking logically? - ANSInduction proposing a hypothesis based on observations and can be done by observing and collecting evidence of existing systems in order to propose a solution when designing one for a stake holder. Useful for real world systems Deduction using underlying rules to determine how a system should work such as developing a simulation or model for a scientific or mathematical problem which have known rules that will be applied to produce the required output
What are the best ways to identify decision points in programs? - ANS-using flowcharts or pseudocode What may the choice of programming language determine?
What user involved decisions may need to be considered when developing software? - ANS-- Identify where the user will need to make decisions
decisions
outcomes form decisions
Give examples on how thinking concurrently can be applied to solution design - ANS-Sometimes resources can be shared by parallel processing and during development, a large team of programmers could be working on modules simultaneously if modules are not interdependent What does a designer look for in a concurrent approach to a program? - ANS-In a concurrent approach to a program, the designer will look for tasks that can be completed simultaneously What are the benefits to concurrent processing? - ANS-+ More tasks can be completed in the same time frame which is particularly useful for graphics processing
What is an algorithm? - ANS-An algorithm is a sequence of unambiguous rules and instruction used for solving or completing a specific task What type of representation is an algorithm and what is the advantage of this? - ANS-An algorithm is a generalised representation so can be used for similar problems and a wide range of inputs What must occur to combat the fact that many different algorithms can solve the same problem? - ANS-Algorithms must be compared too determine which is most suitable by looking at the best and worst case scenarios for both types of complexity What are the two complexities algorithms differ in? - ANSAlgorithms differ in:
What do space and time complexity together make up? - ANS-An algorithm's efficiency is made up of space and time complexity
Define an algorithm's efficiency - ANS-An algorithm's efficiency is a reflection on the amount of CPU time or memory space an algorithm require to execute What can the choice of algorithm depend on? - ANS-The size of the data set used Give an example of a situation where a compromise is made between complexities - ANS-Compromises must be made so execution time can be reduced by increasing memory space (such as cache implementation ) How can you compare algorithms? - ANS-By looking at their complexities