Mock Revision Flashcards
What is abstraction?
Abstraction is the process of removing excessive details to arrive at a
representation of a problem that consists of only the key features.
What is representational abstraction?
Analysing what is relevant to a given scenario and simplifying a problem based on this information.
What is abstraction by generalisation?
Categorising certain problems as being of a particular type, then using common solutions to solve them.
What is data abstraction?
When details about how data is stored are hidden, so programmers can make use of abstract data structures without knowing how they are implemented.
What is procedural abstraction?
When programmers can perform functions without having any knowledge about the code used to implement the functionality.
What do very large, complex problems use?
They use multiple levels of abstraction, with each level performing a different role. The highest levels are closest to the user and provide an interface to interact with, and the lowest levels are responsible for performing these tasks through the execution of machine code.
Why is abstraction good in a system?
It allows non-experts to make use of it by hiding information that is too complex or irrelevant to it’s purpose.
Why is abstraction good in software?
It enables more efficient design, as programmers don’t have to worry about unnecessary details. This reduces the time needing to be spent on the project and prevents the program getting unnecessarily large.
What is caching?
Caching is the process of storing instructions or values in cache memory after usage, as they may be used again. This saves time which would have otherwise needed to be used to store and retrieve the instructions from secondary storage again.
What is prefetching?
A more advanced version of caching, in which algorithms predict which instructions will soon be fetched. These are then loaded and stored in cache before being fetched, meaning less time is spent waiting for them to be loaded from the hard disk.
What is the limitation to prefetching?
The accuracy of the algorithms used, as they can only provide an informed prediction as to which instructions will be used, not a guarantee.
What is the limitation to caching?
How well a caching algorithm is able to manage the cache. Larger caches take a long time to search, so cache size limits how much data can be stored.
Give 3 examples of reusable components.
Implementations of abstract data structures, classes and subroutines.
Why are reusable components good?
More reliable, as they have already been tested and bugs dealt with.
This saves time, money and resources.
It also means they can be reused in future projects, saving further costs.
Why can reusable components be bad?
It may not always be possible to integrate existing components by third parties, because of compatibility issues with the rest of the software.
This means that the components need to be modified to work with the rest of the software, which can sometimes be more time-consuming than developing them in house.
What is problem decomposition?
Continually breaking down a large, complex problem into smaller subproblems which can be solved more easily.
Why is problem decomposition good?
Problems divided into sections become more feasible to manage and can be divided by a group of people according to the individuals’ skillsets.
Why is problem decomposition good?
Problems divided into sections become more feasible to manage and can be divided by a group of people according to the individuals’ skillsets.
How are problems commonly decomposed?
Top down design, also known as stepwise refinement.
Higher levels provide an overview, while lower levels specify in detail the components.
What is the aim of using top down design?
To keep splitting problems into subproblems until each problem can be represented as a self-contained module/subroutine. This can then be developed and tested separately before being integrated together.
Key part of identifying the components of a solution
Identifying tasks which could be solved using an already existing module, subroutine or library.
What are two of the most important decisions made within software development?
What programming paradigm to use, and how different pieces of information are collected.
What does sequence mean?
Code is executed line-by-line, from top to bottom
What does branching mean?
A certain code block is run if a specific condition is met, using IF statements. Also known as selection.
What does iteration mean?
A block of code is executed a certain number of times or while a condition is met. Using for, while or repeat until loops.
What is count controlled iteration?
Iteration is repeated a given number of times
What is condition controlled iteration?
Iteration continues until a given condition is met.
What is recursion?
A programming construct in which a subroutine calls itself during its execution, until a stopping condition is met, when the recursion stops. Produces same result as iteration.