2.1 Algorithm Design Flashcards

1
Q

Describe the purpose of validation

A

To test whether the data entered is reasonable/sensible.

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

State 5 types of validation check

A

Range check
Type check
Length check
Presence Check
Character check

+ Format check
+ Look up check

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

Describe a length check and give an example

A

Checks whether the data entered is within a certain number of characters

e.g. Passwords often have a minimum and maximum number of characters

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

Describe a range check and give an example

A

Checks whether the values entered are within a certain range

e.g. exam percentage must be between 0 and 100

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

Describe a presence check and give an example

A

Checks that some data has been entered (not left blank)

e.g. you must enter a username when setting up an account

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

Describe a type check and give an example

A

Check that the correct type of data has been entered

e.g. you must enter an integer when inputting an age

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

Describe a format check and give an example

A

Check that an appropriate format of letters and numbers has been used

e.g. Date must be in the format DD/MM/YYYY

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

Describe a character check and give an example

A

Checks that the input contains (or does not contain) specific characters

e.g. Passwords must contain uppercase, lowercase characters and digits

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

Describe the purpose of verification

A

To check that the data input is the same as the original source (intended input)

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

Describe 2 types of verification

A

Double Entry - Expects data to be entered twice and compares both entries to check if they are the same.

Visual Check - Data is entered once and then visually compared against the original (or entered value)

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

State 4 different types of test data

A

Normal (valid)
Abnormal (invalid)
Extreme
Boundary

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

Describe normal/valid test data

A

Data that should be accepted and has known outcomes

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

Describe abnormal/invalid test data

A

Data that should be rejected and produce error messages

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

Describe extreme test data

A

The largest and smallest values that would be accepted

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

Describe boundary test data

A

Is used to establish where the largest and smallest values occur.
At each boundary 2 values are required: one valid and one invalid

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

A user is asked to enter a valid percentage. It must be a positive whole number between 0 and 100 inclusive.

State 4 different types of test data and for each one give an example of one piece of appropriate data along with a reason

A

Normal … 23 … the value is within normal range and should be accepted
Abnormal … 3.3 … the value is an invalid data type and should be rejected
Extreme … 100 … the value is the largest value that should be accepted
Boundary … 101 … tests the invalid value at the highest boundary and should be rejected

17
Q

What is an algorithm?

A

A set of step-by-step instructions to solve a problem of complete a task
It is independent of any programming language
Can be expressed using pseudocode or a flowchart

18
Q

What are the names and shapes of the 5 flowchart symbols you need to know?

19
Q

Convert to a flowchart

20
Q

Convert to a flowchart

21
Q

Convert to a flowchart

22
Q

Convert to a flowchart

23
Q

Convert to a flowchart

24
Q

Convert to a flowchart

25
Convert to a flowchart
26
Convert to a flowchart
27
What is a structure chart?
* A modelling tool used to show the hierarchy of a system/program * A graphical representation to show how a system is broken into subsystems
28
What are library routines?
A collection of standard programs/routines availaible for immediate use
29
What is a subroutine?
* A self-contained piece of code that that is given a name and can called from within a program * 2 types of subroutines * A function - always returns a value * A procedure - may or may not return a value
30
What is a procedure?
A subroutine that does not have to return a value
31
What is a function?
A subroutine that always returns a value
32
Describe the use of a subroutine in a program
* It is a block of code within a program that can be called when needed * It breaks up the program to make it easier to read and understand * It can be reused by another program
33
What is a library routine?
* A standard subroutine that is available for immediate use * It can be called from many programs * It is used often and makes programs easier/faster to write as the code is already written * They make testing easier as they have already been used and debugged
34
What is top down design?
Breaks down a system into successively smaller pieces/sub systems
35
What are the benefits of top down design?
* allows several programmers to work at the same time on the software * Development time is faster * can test each subsystem independently * Easier to debug