Elements of Computational Thinking

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/50

flashcard set

Earn XP

Description and Tags

Made from P.M.T. and Ada comp. sci. notes

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

51 Terms

1
New cards

What is a decision?

A decision is a result reached after consideration.

2
New cards

What is the shape used for decisions in a flowchart?

A (decision) diamond

3
New cards

In a flow chart how many options can you pick from a decision?

2 different options - yes or no/ true or false

4
New cards

How does the result of a decision affect the flow of a program?

The program will follow a different route depending on the decision made by the user.

5
New cards

What is abstraction?

The process of separating ideas from particular instances (of a problem) / reality. It is a representation of reality in which unnecessary detail is removed so that only the key features remain.

6
New cards

What is representational abstraction?

The process of removing unnecessary details to produce a representation of a problem that consists of only the key features

7
New cards

Which form of abstraction involves grouping together similarities within a problem to identify what kind of problem it is?

Abstraction by generalisation

8
New cards

Which is abstraction by generalisation?

When you identify a problem as an example of a more general set of problems

9
New cards

What is data abstraction?

A form of abstraction in which details about how data is being stored are hidden.

10
New cards

What kind of problems make use of multiple levels of abstraction?

Large, complex problems

11
New cards

How does abstraction allow non-experts to make use of a system?

Hides complex and irrelevant information in abstract models.

12
New cards

What are the advantages of using abstraction in software development?

  • Easier for programmers to focus on core elements

  • Reduces the time needed to be spent on the project.

  • Prevents program from getting unnecessarily large

13
New cards

What are two examples of layers of abstraction?

  • Networking (TCP/IP layer)

  • Programming languages

14
New cards

What are two advantages of using abstraction in programming languages?

  • Easier to remember syntax in high-level languages as it is closer to natural language

  • Coding becomes accessible to beginners

15
New cards

How does object-oriented programming use abstraction?

  • Objects are an abstraction for real-world entities.

  • Attributes are an abstraction for the characteristics of an object.

  • Methods are an abstraction for the actions a real-world object is able to perform.

16
New cards

What is the difference between abstraction and reality?

Abstraction is a simplified representation of reality

17
New cards

What is functional abstraction?

When the implementation detail of the computational method is hidden.

18
New cards

What is problem reduction?

The process of generalising or reducing a problem to one that has already been solved.

19
New cards

What is automation?

The process of taking the model and implementing a solution. This is achieved by:

  • Implementing the data structures to store the data

  • Implementing the algorithms to process the data

20
New cards

What is the first stage of thinking procedurally?

Taking the problem defined by the user and breaking it down into its constituent parts

21
New cards

What is the second stage of thinking procedurally in software development?

Identifying components of a solution

22
New cards

What is decomposition?

The process of breaking a problem down into smaller subproblems that can be solved individually and more easily

23
New cards

What is another name given to top-down design?

Stepwise refinement

24
New cards

What is the purpose of top-down design?

Continually break problems down into subproblems until each subproblem can be represented as a single task and ideally a self-contained subroutine.

25
New cards

What are the benefits of using top-down design?

  • Problems can be solved and modules developed by different people.

  • Tasks can be tested separately. Modules are self-contained

26
New cards

What types of problems is top-down used for?

Large, complex problems

27
New cards

How is the lowest level subproblems in top-down design implemented in code?

As self-contained modules or subroutines

28
New cards

What do software developers need to consider when recombining components of a solution?

The order in which subroutines are executed, and how they interact with each other, based on their role in solving the problem.

29
New cards

What must a software developer do before designing a subroutine to solve a particular problem?

See whether it is possible for an already existing subroutine or module to be used.

30
New cards

What are two advantages of utilising reusable components?

  • More reliable than newly-coded components, as they have already been tested.

  • This saves time, money and resources.

31
New cards

What is the purpose of thinking ahead?

To make programs easy and intuitive for users to use.

32
New cards

What is an input?

Any data that is required to solve a problem, usually entered into the system by the user

33
New cards

What is an output?

The results that are passed back once the inputs have been processed and the problem solved

34
New cards

What four considerations do programmers need to make about inputs and outputs when thinking ahead?

  • Method of input/output (device used)

  • Data structures used

  • Data types used

  • Order of data

35
New cards

What are preconditions?

Requirements which must be met before a program can be executed.

36
New cards

Where can preconditions be defined?

Within the code or within documentation.

37
New cards

What are four advantages of including preconditions within the documentation accompanying a subroutine?

  • Reduces the length of the program

  • Reduces the complexity of the program

  • Saves time needed to debug and maintain a longer program

  • Makes subroutine more reusable

38
New cards

Define caching

The process of storing instructions or values in cache memory after they have been used, as they may be used again

39
New cards

What is an advantage of caching?

Saves time as you don’t need to wait for instructions to be retrieved from secondary storage again

40
New cards

How is caching used in storing web pages?

Web pages that a user frequently accesses are cached, so the next time one of these pages is accessed, content can be loaded without any delay

41
New cards

What are the advantages of caching web pages?

  • Content can be loaded without delay

  • Images and text do not have to be downloaded again multiple times

  • Frees bandwidth for other tasks on a network

  • Less time is spent waiting

42
New cards

What limits the effectiveness of caching?

  • Accuracy of the algorithms used

  • Effectiveness of algorithm in managing the cache

  • Size of the cache

43
New cards

What is the name given to the technique in which algorithms are used to predict which instructions are likely to soon be used?

Prefetching

44
New cards

What is prefetching?

When algorithms predict which instructions are likely to soon be fetched and are loaded and stored in cache

45
New cards

What is an advantage of prefetching?

Less time is spent waiting for instructions to be fetched

46
New cards

What are two advantages of using reusable program components?

  • More reliable than new components, as they have already been tested.

  • Since developing from scratch is not required, this saves time, money and resources.

47
New cards

What are three examples of reusable program components?

  • Abstract data structures eg. queues and stacks

  • Classes

  • Subroutines

48
New cards

What is parallel processing?

Parallel processing is completing multiple tasks simultaneously at any given time.

49
New cards

What is concurrent processing?

When each process is given a fraction of time and control over the processor before swapping to another process. This allows multiple processes to run on a single processor.

50
New cards

What are the benefits of concurrent processing?

  • More efficient use of processor time, so more tasks can be completed during a given time

  • Other tasks can be completed while waiting for an input/ user interaction

  • More efficient processing of interrelated tasks

51
New cards

What are the drawbacks of concurrent processing?

  • There is an overhead in coordinating and switching between processes, which reduces program throughput.

  • Not all tasks are suited to being broken up and performed concurrently.