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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is Abstraction

A
  • Removing unnecessary detail.
  • Representing the key elements of the problem.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Benefits of Reusable program components

A
  • Make development less time consuming
  • Makes development cheaper
How well did you know this?
1
Not at all
2
3
4
5
Perfectly