Paper 2 advanced information flashcards
2.1.1
What is abstraction?
the representation of essential features without including unnecessary details
2.1.1
What is the need for abstraction?
Makes a problem easier so solve through the removal of unnecessary parts
2.1.2
What is caching?
Caching is the temporary storage of data and instructions
2.1.2
What are the advantages of caching?
allows for faster processing if cached, can cache consistently used
2.1.2
What are the disadvantages of caching?
slower performance if not cached
2.1.2
What are the advantages of reusable program components
they can be carried over into other programs
saves time
can be added to a library and imported
2.2.1
What is recursion?
Recursion is a method of solving a computational problem where the solution depends on solutions to smaller instances of the same problem
2.2.1
How can recursion be used
Recursion is used mainly for problems that can be broken down easily, such as searching through a file system
(something that has sections or branches)
2.2.1
How can recursion be compared to an iterative approach?
Recursion is when a function calls itself within its code, thus repeatedly executing the instructions present inside it
Iteration is when a loop repeatedly executes the set of instructions like “for” loops and “while” loops.
2.2.1
What is a global variable?
A global variable can be used across the entire program
2.2.1
What is a local variable
A local variable is one that can only be used within the function it is defined in
2.2.1
What does modularity imply?
Splitting a larger program into smaller, more manageable parts
2.2.1
What are functions?
a small section of code within a larger piece of code which has a specific task within it
Functions produce information
2.2.1
What are procedures?
a small section of code within a larger piece of code which has a specific task within it
Procedures perform a task
2.2.1
What is parameter passing by value?
When a parameter is pass-by-value, the caller and the callee method operate on two different variables which are copies of each other