Unit 10 Computational Thinking Flashcards

1
Q

What is Abstraction?

A

A way of separating the logical and physical aspects of a problem such as removing less relevant parts of a problem

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

What are the advantages of specifying preconditions? (3)

A
  • Clearly documenting preconditions helps to make the function reusable
  • Cuts out unnecessary checks
  • Makes the program shorter which helps to speed up debugging and maintenance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are some typical standards for Reusable Modules? (6)

A
  • Inputs, outputs and preconditions should be documented
  • Variable identifiers should conform to a standard convention
  • All variables must be local to the module
  • Documentation should be in a standard format, explaining what the module does, who it was written by, date it was written
  • Explanations of certain sections of code should be included where necessary
  • No module should exceed one page of code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why do Reusable Modules need to conform to certain programming standards?

A

To make them easy to use for other programmers

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

What is Caching?

A

Caching is the temporary storage of data and instructions. The last few instructions of a program or frequently used data could be stored

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

What are the advantages of Caching? (3)

A
  • Faster access to cached resources
  • Saving on costly use of bandwidth
  • Reduced load on web services in a client-server environment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a disadvantage of Caching?

A

Slower performance if the resource isn’t found in the cache

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

What is Procedural Decomposition?

A

Procedural decomposition means breaking a problem into a number of sub-problems, so that each sub-problem accomplishes an identifiable task

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

What is Modularization for?

A

Program structure and organization, i.e. breaking the problem down into subroutines

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

What are the advantages of Modularization? (5)

A
  • Large programs are broken down into subtasks/subroutines that are easier to program and manage
  • Each subroutine can be individually tested
  • Modules can be re-used several times in a program
  • Frequently used modules can be saved in a library and used by other programs
  • Several programmers can simultaneously work on different modules, shortening development time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are features of good programming practice? (5)

A
  • Use meaningful identifiers
  • Define and document the inputs, outputs and preconditions for each sub-procedure
  • Add lots of meaningful comments within the program
  • At the bottom level, each sub-procedure should perform a single task
  • Keep each sub-procedure self-contained by passing parameters and using local variables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are features of a good algorithm? (5)

A
  • Has clear and precisely stated steps that produce the correct output for any set of valid inputs
  • Should allow for invalid inputs
  • Must always terminate at some point
  • Should execute efficiently, in as few steps as possible
  • Should be designed in such a way that other people will be able to understand it and modify it if necessary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is hand-tracing useful for? (2)

A
  • Figuring out how an algorithm works
  • Finding out why an algorithm is not working properly
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What happens in Concurrent Processing?

A

Multiple processors execute instructions simultaneously
Tasks are broken down into sub-tasks that can be assigned to separate processors to perform simultaneously

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

What is Simulation?

A

The process of designing a model of a real system in order to understand the behaviour of the system, and to evaluate various strategies for its operation

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