OCR A Level Computer Science Paper 2

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/99

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

100 Terms

1
New cards

Abstraction

the process of removing any excessive details from a problem, arriving at a representation of said problem that consists only of its key features.

2
New cards

Representional Abstraction

Analysing what is relevant to a given scenario and simplifying a problem based on this information

3
New cards

Abstraction by Generalisation

Grouping together similarities within a problem to identify what kind of problem it is. This allows different problems to be categorised as being a particular type, and solved using a common solution.

4
New cards

Data Abstraction

Details about how data is being stored are hidden. Therefore programmers can make use of abstract data structures such as stacks and queues without worrying about how they are implemented.

5
New cards

Procedural Abstraction

Programmers can perform functions (such as pushing and popping items to and from stacks) without having any knowledge about the code used to implement this.

6
New cards

Abstraction Levels

Higher levels are closer to the user (e.g. providing a UI for them) whereas the lowest levels are further away (e.g. execution of machine code)

7
New cards

What is the purpose of abstraction in systems and models?

It allows non-experts to utilize systems/models by hiding complex or irrelevant information.

8
New cards

How does abstraction contribute to efficient software design?

It enables programmers to focus on essential elements, reducing project time by eliminating unnecessary details.

9
New cards

What are low-level programming languages?

Languages like machine code that directly interact with computers but are harder to write due to specific binary codes.

10
New cards

What are high-level programming languages known for?

Providing an abstraction for machine code, making development easier with syntax similar to natural language.

11
New cards

What is the TCP/IP model's purpose?

It serves as an abstraction for network functions, divided into four layers to simplify understanding and communication.

12
New cards

Why is compatibility between layers crucial in the TCP/IP model?

To ensure smooth communication, standards are necessary to allow each layer to function independently while hiding details of other layers.

13
New cards

What is a standard in the context of hardware or software?

A set of specifications agreed upon by academic and industry communities to ensure compatibility and functionality.

14
New cards

Abstraction vs Reality

Real-world entities can be represented using computational structures, such as tables and databases. Real-world values will often be stored as variables.

15
New cards

Thinking Ahead

allows developers to consider problems or difficulties that may arise when the software is used.

16
New cards

How is Thinking Ahead Used?

consideration of what outputs are required of the solution, and identify the inputs required and how these need to be processed to achieve the outputs after.

17
New cards

Satisfied Preconditions

a subroutine can safely expect the arguments passed to meet certain criteria.

18
New cards

Preconditions in Documentation

For example, the factorial function, which can only be used with positive numbers. Rather than checking the arguments, the documentation accompanying this function will specify this.

19
New cards

Caching

the process of storing instructions or values in cache memory after they have been used, as they may be used again.

20
New cards

Prefetching

more advanced version of caching that involves algorithms predicting which instructions are likely to be fetched soon. The instructions and data are then loaded and stored in cache before they can be fetched

21
New cards

Limitations of Prefetching

the accuracy of the algorithms used, as they can only provide an informed prediction as to the instructions which are likely to be used. There is no guarantee that this will be right.

22
New cards

Why are reusable program concepts important?

They save time, money, and resources by allowing components to be reused in multiple places.

23
New cards

What are examples of reusable components in software development?

Implementations of abstract data structures, classes, subroutines.

24
New cards

What is the advantage of using reusable components over newly-coded ones?

Reusable components are more reliable as they have been tested for bugs.

25
New cards

What is a potential drawback of integrating existing components developed by third parties?

Compatibility issues with the rest of the software may require costly modifications.

26
New cards

Thinking Procedurally - Decomposition

involves taking the problem defined by the user and breaking it down into its component parts.

27
New cards

Stepwise Refinement

Higher levels provide a more brief overview of the problem, whereas lower levels provide an increasingly more in-depth coverage.

28
New cards

The Goal of Stepwise Refinement

to keep splitting problems into subproblems until each subproblem is a single task, ideally a self-contained module or subroutine.

29
New cards

Why is the order of operations important in programming?

Inputs may need validation before being passed to subroutines. Some subroutines require data from others before execution.

30
New cards

How can executing multiple subroutines simultaneously benefit a program?

can increase program efficiency.

31
New cards

Provide an example illustrating the importance of order in programming.

In a fast food delivery app, users must confirm location before selecting food and confirm order before paying.

32
New cards

What is a Decision?

a result reached after some consideration.

33
New cards

How do we simplify the decision-making process?

we begin by trying to limit the possible solutions we can pick from, then identify any possible future decision points to gather information about our options.

34
New cards

Conditions that Affect Outcomes

What is most effective, what is more convenient, and is the option reasonable?

35
New cards

What is the purpose of decisions in programming?

Decisions determine how different parts of the program are completed and lead to different routes through the program.

36
New cards

How can decisions affect the flow of a program in a runner game?

Decisions in a runner game, such as choosing between an endless mode or level-based mode, result in different outcomes and routes through the program.

37
New cards

Why is it important to think logically when designing programs?

Thinking logically helps identify where user decisions are needed in the program and plan out the different outcomes that will lead to varied routes through the program.

38
New cards

Concurrent Thinking

built upon the idea of concurrent processing. It is the process of completing more than one task at a time.

39
New cards

Concurrent Processing

different tasks are given slices of processor time, to give the illusion of tasks being performed at the same time.

40
New cards

Benefits of Concurrent Processing

1. The number of tasks completed in a given time is increased.

2. Less time is wasted waiting for an input or user interaction, as other tasks can be completed.

41
New cards

Drawbacks of Concurrent Processing

1. It can take longer to complete when large numbers of users or tasks are involved as processes cannot be completed at once.

2. There is an overhead in coordinating and switching between processes, which reduces throughput (a measure of how many units of information a system can process in a given amount of time).

3. Not all tasks are suited to being broken up and performed concurrently.

42
New cards

Sequence

Code is executed line-by-line and top-to-bottom.

43
New cards

Selection

A certain block of code is run if a specific condition is met (using IF statements). This is also known as Branching.

44
New cards

Iteration

A certain block of code is run over and over until a certain condition is met (using FOR or WHILE loops)

45
New cards

Count-Controlled

Iteration is repeated a given number of times.

46
New cards

Condition-Controlled

Iteration is repeated until a given condition is met.

47
New cards

What is recursion?

A subroutine calls itself during its execution until a stopping condition is met.

48
New cards

What is the advantage of using recursion?

It usually takes fewer lines of code than other methods and is less prone to errors.

49
New cards

What is important for recursive subroutines?

They need to be clearly defined to reach a stopping condition after a finite number of calls.

50
New cards

Disadvantages of Recursion

inefficient use of memory and it is difficult to trace. If the subroutine calls itself too many times, there is a danger of stack overflow (when the call stack runs out of memory).

51
New cards

Local Variable

limited scope (meaning they can only be accessed within the block of code they were defined).

52
New cards

Global Variable

can be accessed across the whole program. Any variables used in the main body of the program are automatically global variables.

53
New cards

Advantage of having multiple local variables with the same name

They can reappear multiple times in the code, as long as they are not in the same subroutine.

54
New cards

Advantage of using local variables in subroutines

Ensures that subroutines are self-contained, with no risk of variables being affected by code outside of the subroutine.

55
New cards

Advantages of Global Variables

Useful for values that need to be used by multiple parts of the program.

56
New cards

Disadvantages of Global Variables

Easy to unintentionally overwrite and edit. Require more memory than local variables.

57
New cards

Difference between Global and Local Variables

Global variables are not deleted when the program terminates, while local variables are deleted when the subroutine is completed.

58
New cards

Modularity

used to split large, complex programs into smaller, self-contained modules.

59
New cards

Procedure

a named block of code that performs a specific task, without having to return a value. Procedures can return multiple values (if they chose to). Procedures are usually given data as parameters for manipulation.

60
New cards

Function

a named block of code that also performs a specific task, but it returns a value. A function will only ever return a single value. Functions make use of local variables.

61
New cards

Parameter Passing by Value

the parameter is basically treated as a local variable. A copy of it is passed into the subroutine and discarded at the end. Therefore its value outside of the subroutine is not affected.

62
New cards

Parameter Passing by Reference

the address of the parameter is given to the subroutine, so the value of the parameter will be updated at the given address.

63
New cards

What is an Integrated Development Environment (IDE)?

An IDE is a program that provides a set of tools that make it easier to write, develop, and debug code.

64
New cards

Name some examples of Integrated Development Environments (IDEs).

Examples of IDEs are PyCharm, IDLE, and Microsoft Visual Studio.

65
New cards

What is the purpose of the 'Stepping' feature in an IDE?

Stepping allows you to monitor the effect of each individual line of code by executing one line at a time.

66
New cards

What is the 'Variable watch' feature in an IDE used for?

Variable watch observes the contents of a variable change in real-time through the execution of a program. Sometimes used to pinpoint errors.

67
New cards

How does the 'Breakpoint' feature in an IDE help developers?

Breakpoint allows users to set a point in the program where it will stop. It can be set on a condition or on a specific line. This can help to pinpoint where an error is occurring.

68
New cards

What is the purpose of the 'Source code editor' in an IDE?

Source code editor is a basic text editor, enhanced with autocompletion, indentation, and syntax highlighting.

69
New cards

What do debugging tools in an IDE provide?

Some IDEs provide a run-time detection of errors, with a guide as to where in the code they are likely to have occurred.

70
New cards

Class (OOP)

a template for an object, defining the state and behaviour of said object.

71
New cards

State (OOP)

given by attributes which give an object's properties.

72
New cards

Behaviour (OOP)

the methods associated with a class, describing the actions it can perform.

73
New cards

Instantiation

An object is an instance of a class, and a class can be used to create multiple objects with the same attributes and methods.

74
New cards

What does encapsulation refer to in OOP?

In OOP, encapsulation is the process of declaring attributes as private and allowing them to be altered only by public methods.

75
New cards

How does encapsulation relate to information hiding?

Encapsulation in OOP implements the principle of information hiding by protecting data from being accidentally edited by other parts of the program.

76
New cards

What is the purpose of top-down design in programming?

Top-down design in programming aims to implement encapsulation by designing each module to be self-contained.

77
New cards

What makes a problem solvable using comp methods?

its consisting of of inputs, outputs, and calculations.

78
New cards

A problem that can be solved by an algorithm is known as __________.

computable.

79
New cards

What is the next step after a problem is deemed computationally solvable?

Problem Identification

80
New cards

How is the problem clearly defined in the problem identification step?

Stakeholders provide requirements for the finished product

81
New cards

What role do stakeholders play in problem identification?

They tell you what they require from the finished product

82
New cards

What is the purpose of defining system requirements in problem identification?

To clearly define the problem and system requirements

83
New cards

How can requirements be defined using problem recognition?

1. Analysing strengths and weaknesses with the current way the problem is being solved.

2. Considering types of data involved including inputs, outputs, stored data, and amount of data.

84
New cards

What is problem decomposition?

After a problem is defined, it is broken down into smaller, more manageable tasks to reduce complexity.

85
New cards

Why is problem decomposition important in programming?

It allows for the identification of subproblems, utilisation of pre-coded modules, easier project management, parallel development, and efficient debugging.

86
New cards

Why does problem decomposition make testing easier?

because testing can only be carried out after the entire application has been produced unless decomposition is used.

87
New cards

What are the three main parts of the Divide and Conquer technique?

Divide, Conquer, Merge

88
New cards

How is the problem divided in the Divide and Conquer technique?

By halving the size of the problem with each iteration

89
New cards

What happens in the 'Conquer' step of Divide and Conquer?

Each subproblem is solved, often recursively

90
New cards

What is the purpose of the 'Merge' step in Divide and Conquer?

To combine the solutions of each subproblem into one solution

91
New cards

In which algorithms is Divide and Conquer used?

Binary search, quick sort, and merge sort

92
New cards

What is the time complexity of Divide and Conquer algorithms?

O(log n)

93
New cards

What advantage does Divide and Conquer offer in solving complex problems?

It simplifies complex problems and the time taken to solve them doesn't grow significantly as the problem size increases

94
New cards

What is backtracking in problem solving?

It is a methodical algorithm that visits each path and builds a solution based on correct paths, backtracking when an invalid path is encountered.

95
New cards

How is backtracking implemented?

Backtracking is often implemented using algorithms, with recursive methods. Depth-first graph traversals are an example of backtracking.

96
New cards

What is data mining used for?

Data mining is used to identify patterns or outliers in large sets of data, known as 'big data'.

97
New cards

How can insights from data mining be used?

Insights from data mining can be used to predict the future based on previous trends, assisting in business and marketing decisions.

98
New cards

What can data mining uncover about shopping habits?

Data mining can uncover information about which products are bought at certain times of the year, helping businesses prepare stocks in advance.

99
New cards

Why is it important to handle personal data carefully in data mining?

Data mining often involves personal data, so it is crucial to comply with data protection legislation.

100
New cards

What are heuristics?

Heuristics are non-optimal 'rule of thumb' approaches to problem solving.