Algorithm design and structure diagrams Flashcards

1
Q

Subroutine

A

A short section of a code within a program

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

Library routine

A

A commonly used function that is available to a program

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

What are the four ways of designing an algorithm?

A

1) Top down design 2) Structure diagrams 3) Flowcharts 4) Pseudo code

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

Top- down design

A

A design process where an overall task is broken down into smaller tasks

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

Decomposition

A

The process of breaking down a large task into smaller tasks

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

Structure diagram

A

A diagram that shows tasks that have been broken down and how they relate to each other

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

Module

A

An individual section of code that can be used by other programs

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

How to aprroach top-down design

A

1) Break program into smaller programs, work on each task separately. 2) Treat it as new program that can be broken into smaller programs. 3) Repeat this processes with new task until each can be solved.

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

What are the advantages of using a top down to design an algorithm?

A

More than one person can work to solve problems, they can bring the sub problems together at the end

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

What does the structure diagram show?

A

How the different modules relate to each other

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

What do the structure diagrams make easier to understand?

A

The logic of an algorithm

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

Syntax

A

The structure of a language

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

Two ways of designing a solution to a program?

A

1) Flowcharts 2) Pseudocode

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

Flowcharts

A

A way of representing the flow of an algorithm

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

Advantages of using a flowchart? (3)

A

1) The sequence can be easily seen 2) Paths can be easily followed 3) The logic can be understood more easily if visualised

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

Disadvantages of using a flowchart? (2)

A

1) Take long time to produce 2) Changes to the algorithm mean that sections of the flowchart have to be re-drawn 3) Large flowcharts become complicated an hard to understand

17
Q

Why is pseudocode useful?

A

It is half way between English and programming

18
Q

What is test data ?

A

It is a sample of data that is using to run each section of a code.

19
Q

Which three types of test data could be used to test a program ? (3)

A

1) Typical 2) Extreme 3) Invalid

20
Q

What is typical data type ?

A

Valid data that would be accepted by the code.