Chapter 7 Algorithm Design And Problem Solving: Unit 7.5: Validation And Verification Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Describe validation.

A

Ensures that only data that is reasonable is accepted by program.

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

What are the 6 validation checks?

A

Range checks
Length checks
Type checks
Presence checks
Format checks
Check digits

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

Describe range check.

A

Checks that the value of a number is between an upper value and a lower value.

Example:
OUTPUT “Please enter the student’s mark “
REPEAT
INPUT StudentMark
IF StudentMark < 0 OR StudentMark > 100
THEN
OUTPUT “The student’s mark should be in the range 0 to 100, please re-enter the mark “
ENDIF
UNTIL StudentMark >= 0 AND StudentMark <= 100

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

Describe length check.

A

Checks either:
That data contains an exact number of characters

Example:

OUTPUT “Please enter your password of eight characters “
REPEAT
INPUT Password
IF LENGTH(Password) <> 8
THEN
OUTPUT “Your password must be exactly eight characters, please re-enter “
ENDIF
UNTIL LENGTH(Password) = 8

Or that the data entered is a reasonable number of characters

Example:

OUTPUT “Please enter your family name “
REPEAT
INPUT FamilyName
IF LENGTH(FamilyName) > 30 OR LENGTH(FamilyName) < 2
THEN
OUTPUT “Too short or too long, please re-enter “
ENDIF
UNTIL LENGTH(FamilyName) <= 30 AND LENGTH(FamilyName) >= 2

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

Describe type check.

A

Checks that the data entered is of a given data type.

Example:
OUTPUT “How many brothers do you have? “
REPEAT
INPUT NumberOfBrothers
IF NumberOfBrothers <> DIV(NumberOfBrothers, 1)
THEN
OUTPUT “This must be a whole number, please re-enter “
ENDIF
UNTIL NumberOfBrothers = DIV(NumberOfBrothers, 1)

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

Describe presence check.

A

Checks to ensure that some data has been entered and the value has not been left blank.

Example:

OUTPUT “Please enter your email address “
REPEAT
INPUT EmailAddress
IF EmailAddress = “ “
THEN
OUTPUT “*=Required”
ENDIF
UNTIL EmailAddress <> “ “

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

Describe format check.

A

Checks that the characters entered conform to a pre-defined pattern.

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

Describe check digits.

A

The final digit included in a code; it is calculated from all the other digits in the code. Can usually identify errors such as:

An incorrect digit entered
Transposition errors where two numbers have changed order
Omitted or extra digits
Phonetic errors

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

Describe verification.

A

Checks that data has been accurately copied from one source to another.

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

What are the 2 verification methods for input data?

A

Double entry
Screen/visual check

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

Describe double entry.

A

The data is entered twice. The computer compares both entries and if they are different outputs an error message requesting that the data is entered again.

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

Describe screen/visual check.

A

Manual check completed by a user who is entering the data. When the data entry is complete the data is displayed on the screen and the user is asked to confirm that it is correct before continuing.

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