Topic 2.1: Elements of Computational Thinking Flashcards
1
Q
What are Preconditions
A
- Things which are needed before the program can run.
- The code expects the information passed to it to meet certain criteria.
- The code may test for these when it is run.
- They may instead be included within documentation.
- Including this information within documentation reduces the complexity of the program and makes it easier to use.
- Preconditions make it easier to reuse subroutines.
2
Q
What is Abstraction
A
- Removing unnecessary detail.
- Representing the key elements of the problem.
3
Q
Decisions affecting problem flow
A
- There may be many routes through a program.
- Decisions by the user will affect the route taken.
- It is important to identify places where the user will need to make a decision and plan for the decisions they may make.
4
Q
What is Procedural Abstraction
A
- Allows a programmer to use a function without understanding the detail of its implementation.
- Used with data structures and in decomposition.
- Models the purpose of a subroutine without considering how it does what it does.
5
Q
What is Abstraction by Generalisation
A
- Similar elements of a problem may be grouped together.
- This allows common problems to be categorised.
- They can then be solved with a common solution.
6
Q
Benefits of Reusable program components
A
- Make development less time consuming
- Makes development cheaper