2.1 Elements of computational thinking Flashcards

1
Q

What is abstraction?

A

removing information that is too complex or irrelevant to the system’s purpose (unnecessary detail)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why is abstraction needed? (3)

A

-enables for efficient software design as programmers can focus on core features instead of unnecessary details
-reduces time spent on a project
-saves memory space

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an example of abstraction?

A

TCP/IP model
-abstraction of how networks function
-separated into four simple layers
-each layer deals with a different part of the communication process
-doesn’t need to know how other layers function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the different ways projects can be abstracted?

A

-representational
-data
-layered
-generalisation
-procedural

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain representational abstraction

A

-removing unnecessary details to represent a problem using only the key features
-must analyse what is relevant to a scenario and simplify a problem based on this

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain data abstraction

A

-details about how data is being stored are hidden
-programmers can use data structures without knowing how they are implemented

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain layered abstraction. Give an example of this

A

-large, complex problems are split into layers of abstraction
-each layer has a different role, with the highest layers being closest to the user
-these are usually responsible for providing a user interface
-the lowest levels perform tasks such as interacting with machine components

example of this is the TCP/IP model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Explain abstraction by generalisation

A

-grouping together similarities within a problem to identify what kind of problem
-allows problems to be categorised as being of a particular type
-a common solution can be used to solve these problems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain procedural abstraction

A

-allows programmers to utilise functions without knowing how they are implemented
-used in decomposition and manipulating data structures
-models what a subroutine does without considering how, as once a subroutine has
been written, it can be reused as a black-box

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What should we think about when needing to devise an abstract model for scenarios? (4)

A

-what is the problem that needs to be solved by the model?
-how will the model be used?
-who will the model be used by?
-which parts of the problem are relevant based on the target audience and purpose
of the model?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Why is thinking ahead useful?

A

makes development easy and programs can be built to be intuitive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are inputs?

A

data required to solve the problem (data entered into the system by the user)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are outputs?

A

results passed back to the user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are some ways of thinking ahead? Why are these useful? (3)

A

-creating preconditions (requirements which must be met before a program can be executed)
reduces length and complexity of programs
saves time spent on debugging and maintenance

-creating reusable program components (using libraries or subroutines)
saves time
increases development efficiency
reliable

-caching (storing instructions/data in cache memory after they’ve been used, as they could be used again)
saves time instead of going to secondary storage
frees up bandwidth
less time to fetch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What do we mean by thinking procedurally?

A

breaking down a complex problem then thinking logically and sequentially to find a solution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Explain the first stage of thinking procedurally. What are some positives to doing this?

A

problem decomposition

breaking a large complex problem into smaller subproblems which can be solved more easily
-easier to manage
-subproblems can be divided within a team
-subproblems can be tested separately, so are self-contained

17
Q

What is the second stage of thinking procedurally? What do we need to consider?

A

considering each component and using them to build up a solution

-can this be implemented as a function or a procedure?
-what inputs are required?
-what output does the subroutine need to produce?

18
Q

What do we mean by thinking logically?

A

analysing a situation or problem using reason and coming up with potential solutions

19
Q

What are some questions needed to be evaluated when thinking logically?

A

-what is most effective?
-what is most convenient?
-is this option reasonable?

20
Q

How can we think logically? (2)

A

use procedural thinking
using flowcharts to find different outcomes of a problem

21
Q

What do we mean by thinking concurrently?

A

the process of completing more than one task at a given time

-involves giving time ‘slices’ to different tasks

22
Q

Compare concurrent and parallel processing

A

concurrent- each task is given a slice of processor time to make it
appear as if tasks are being completed simultaneously

parallel- when multiple processors are used to complete more than
one task simultaneously

23
Q

Why is concurrent processing useful?

A

-the number of tasks completed in a given time is increased
-less time is wasted waiting for an input or user interaction (other tasks can be completed in this time)

24
Q

What are some drawbacks to concurrent processing?

A

-can take longer to complete when large numbers of users/tasks involved
-an overhead in coordinating and switching between processes (reduces program throughput)
-not all tasks are suited to being broken up and performed concurrently