Alogorithm Specification and Design notations. Flashcards

1
Q

What is an algorithm

A

An alogorthim is a sequence if steps taken to solve a problem
It is not a program. Instead it is a a description of a program that needs to be coded

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

What does an alogorthim contain

A

Contains two elements.
The actions that need to be taken to solve the problem. Such as computational steps
The order in which these are meant to be carried out

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

Name programming languages

A

Live code
C++
Java script

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

What is the algorithm I must Know

A

Input validation

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

What is Input validation

A

It is an algorithms that validates if the data being entered is valid and correct. If not the user will be given the option to re-enter their data.

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

Learn the input validation algorithm in

A

Pseudocode

And livecode

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

Name two of the most common ways of deigning a program

A

Pseudocode - text based design which shows the main steps of the program in English like statements

Flow charts - shows main steps of the program in a graphical form

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

What specific type of pseudocode do I need to know

A

Haggis

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

Spell the text based design that explains the main steps of the program in English like statements

A

Pseudocode

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

“Pseudocode is considered a “first draft” of the actual program.
It is an artificial and informal tool, written in programmer’s language, helps to make algorithms.
concentrates on logic of program - not syntax errors - should be a description of an algorithm in detail to allow implementation be easy
The design is built up of two parts, the first is the Stepwise Design. This shows the main steps of the program.

A

The second part is the Stepwise Refinement. This involves breaking these main steps into even smaller steps so eventually, one line of pseudocode becomes one line of program code.
The design language is called HAGGIS and is a requirement of the SQA.

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

What does the command RECIEVE do.

A

The command RECEIVE is used get input. Similar to ASK used in LiveCode.

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

What does the command SEND do?

A

The command SEND is used for output. Similar to PUT used in LiveCode.”

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

Put in livecode is what in Pseudocode

A

Send

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

Pseudocode rules

A
Simple English like statements
Each instruction on a separate line 
Keywords in capitals eg. IF, THEN, SET, RECIEVE SEND, END etc. 
Indentation to show structure 
Top to bottom
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does the oval in flow charts represent

A

The start and end of program

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

Arrow

A

Represents flow line-

Connects flow chart symbols and show sequence of operations

17
Q

Rectangle

A

Represents process

Indicates an operation being carried out by the program

18
Q

Parallelogram

A

Represents Data Input and output -

Allows users to enter data and results be displayed

19
Q

Diamond

A

Decision - indicate a decision structure . Always has two flow lines
One for yes
.other for no