0% found this document useful (0 votes)
0 views

Validation and Verification

The document discusses data types in programming, including strings, integers, real numbers, characters, and booleans, along with their respective pseudocode representations. It also covers validation and verification processes for data entry, emphasizing the importance of ensuring data accuracy and reasonableness through various checks such as range, length, type, presence, format, and check digits. The document highlights that validation is automated while verification involves manual checks to confirm data integrity.

Uploaded by

junghopeite
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Validation and Verification

The document discusses data types in programming, including strings, integers, real numbers, characters, and booleans, along with their respective pseudocode representations. It also covers validation and verification processes for data entry, emphasizing the importance of ensuring data accuracy and reasonableness through various checks such as range, length, type, presence, format, and check digits. The document highlights that validation is automated while verification involves manual checks to confirm data integrity.

Uploaded by

junghopeite
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Validation and Verification

Chapter: 7
Basic data types in programming
▪ Data in programs can be of different types. numeric or text
▪ You will need to tell your program what type of data you want it to store in a variable.

Datatype Description Pseudocode Example

Text – characters, numbers and


symbols “hello”, ‘1Af2’,
String The data will always need to be
STRING
“PROGRAM”
inside speech marks.

Integer Whole numbers. INTEGER 23, -300, 4565

Real Decimal numbers. REAL 1.2, -20.49

One character or number of symbol.


“h”, ‘f’, “9”, ‘?’,
Char The data will always need to be CHAR
“Mr.”, “Dr.”
inside speech marks.

Boolean Either true or false. BOOLEAN TRUE, FALSE


Arithmetic, Logical and Boolean operators in pseudocode
Arithmetic operators Logical operators Boolean operators
Operators Operators in Operators in
Comparison Description
in Pseudocode Pseudocode
Action
Pseudoco
de > Greater than AND Both True
+ Add < Less than
OR Either True
- Subtract = Equal
NOT Not True
* Multiply
>= Greater than or
These operators are used to help a program make
/ Divide equal more complex decisions

Raise to the power <= Less than or


^ equal
of
<> Not equal
MOD Remainder division
These operators are used to carry out arithmetic
calculations
DIV Integer division
These operators are used to carry out comparisons
and are often found in iterations
Validation and Verification
• In order for computer systems to only accept data inputs that are reasonable and accurate, every item of data needs to
be examined before it is accepted by the system.

• Two different methods are used for data entry:

1. Validation ensures that only data that is reasonable is accepted.

2. Verification is used to check that the data does not change as it is being entered.
Verification
• Verification is checking that data has been accurately copied from one source to another - for
instance, input into a computer or transferred from one part of a computer system to another.

• Verification methods for input data include:• The data is entered twice, sometimes by different operators.
⮚ Double entry • The computer system compares both entries and if they are
⮚ Screen / visual check
different outputs an error message requesting that the data
is entered again.

• A manual check completed by the 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.
• The user either checks the data on the screen against a paper
document that is being used as an input form or, confirms whether
it is correct from their own knowledge.
Validation
• Validation is the automated checking by a program that data is reasonable before it is accepted into a computer system. When data is
validated by a computer system, if the data is rejected a message should be output explaining why the data was rejected and another
opportunity given to enter the data.
There are many different types of validation checks including:
⮚ Range checks A range check checks that the value of a number is between an upper value and a
lower value.
⮚ Length checks
⮚ Type checks
⮚ Presence checks
⮚ Format checks
⮚ Check digits
Validation
• Validation is the automated checking by a program that data is reasonable before it is accepted into a computer system.
When data is validated by a computer system, if the data is rejected a message should be output explaining why the data
was rejected and another opportunity given to enter the data.
There are many different types of validation checks including:
A length check checks either:
⮚ Range checks » that data contains an exact number of characters
⮚ Length checks » or that the data entered is a reasonable number of characters

⮚ Type checks
⮚ Presence checks
⮚ Format checks
⮚ Check digits
Validation
• Validation is the automated checking by a program that data is reasonable before it is accepted into a computer system.
When data is validated by a computer system, if the data is rejected a message should be output explaining why the data
was rejected and another opportunity given to enter the data.
There are many different types of validation checks including:
A type check checks that the data entered is of a given data type.
⮚ Range checks e.g. the number of brothers or sisters would be an integer (whole number)
⮚ Length checks
⮚ Type checks
⮚ Presence checks
⮚ Format checks
⮚ Check digits
Validation
• Validation is the automated checking by a program that data is reasonable before it is accepted into a computer system.
When data is validated by a computer system, if the data is rejected a message should be output explaining why the data
was rejected and another opportunity given to enter the data.
There are many different types of validation checks including:
A presence check checks to ensure that some data has been entered and the value has not
⮚ Range checks been left blank.
⮚ Length checks e.g. an email address for an online transaction must be completed.

⮚ Type checks
⮚ Presence checks
⮚ Format checks
⮚ Check digits
There are many different types of validation checks including:
⮚ Range checks
A format check checks that the characters entered conform to a pre-defined pattern.
⮚ Length checks
⮚ Type checks
⮚ Presence checks
⮚ Format checks
⮚ Check digits
Validation
• Validation is the automated checking by a program that data is reasonable before it is accepted into a computer system. When data is
validated by a computer system, if the data is rejected a message should be output explaining why the data was rejected and another
opportunity given to enter the data.
There are many different types of validation checks including:
⮚ Range checks
⮚ Length checks • A check digit is the final digit included in a code; it is calculated from all the other digits in
⮚ Type checks the code.
⮚ Presence checks • Check digits are used for barcodes, product codes, International Standard Book Numbers
⮚ Format checks (ISBN) and Vehicle Identification Numbers (VIN).
⮚ Check digits • They are used to identify errors in data entry caused by mis-typing or mis-scanning a
barcode.
o An incorrect digit entered, e.g. 5327 entered instead of 5307
o Transposition error where two numbers have changed order, e.g. 5037 instead 5307
o Omitted or extra digits, e.g. 537 instead of 5037 or 53107 instead of 5307
o Phonetic errors, e.g. 13, thirteen, instead of 30, thirty.

You might also like