0478 Computer Science
Chpater 1 Number System
1.1 Number systems
1.2 Text, sound and images
1.3 Data storage and compression
Chapter 2 Data transmission
2.1 Types and methods of data transmission
2.2 Methods of error detection
2.3 Encryption
Chapter 3 Hardware
3.1 Computer architecture
3.2 Input and output devices
3.3 Data storage
3.4 Network hardware
Chapter 4 Software
4.1 Types of software and interrupts
4.2 Types of programming language, translators and integrated development environments (IDEs)
Chapter 5 The internet and its uses
5.1 The internet and the World Wide Web (WWW)
5.2 Digital currency
5.3 Cyber security
Chapter 6 Automated and emerging technologies
6.1 Automated systems
6.2 Robotics
6.3 Artificial intelligence (AI)
Chapter 7 Algorithm design and problem solving
7.1 The program development life cycle
7.2 Computer systems, sub-systems anddecomposition
7.5 Validation and verification
7.6 Test data
Pseudocode
Chapter 8 Programming
8.1 Programming concepts
8.2 Arrays
pseudocode practice
Mr. Theo
-
+
首页
7.5 Validation and verification
To ensure the acceptance of reasonable and accurate data inputs, computer systems must thoroughly examine each data item before accepting it, and this is where Validation and Verification come into play! ## Validation Validation in computer systems involves automated checks to ensure the reasonableness of data before accepting it. If the data is invalid, the system should provide an explanatory message for rejection and allow another chance to enter the data. ### Range check A range check checks that the value of a number is between an upper value and a lower value. For example, checking that percentage marks are between 0 and 100 inclusive: ```javascript 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 ``` ### **Length check** This can either ensure that data consists of a precise number of characters. ```javascript OUTPUT "Please enter your value of ", Limit , " characters " REPEAT INPUT Value IF LENGTH(Value) <> Limit THEN OUTPUT "Your value must be exactly" , Limit ," characters, please re-enter " ENDIF UNTIL LENGTH(Value) = Limit ``` It can also check if the data entered is a reasonable number of characters or not ```javascript OUTPUT "Please enter your value " REPEAT INPUT Value IF LENGTH(Value) > UpperLimit OR LENGTH(Value) < LowerLimit THEN OUTPUT "Too short or too long, please re-enter " ENDIF UNTIL LENGTH(Value) <= UpperLimit AND LENGTH(Value) >= LowerLimit ``` ### **Type check** A type check verifies that the entered data corresponds to a specific data type. ```javascript OUTPUT "Enter the value " REPEAT INPUT Value IF Value <> DIV(Value, 1) THEN OUTPUT "This must be a whole number, please re-enter" ENDIF UNTIL Value = DIV(Value, 1) ``` ### **Presence check** A presence check checks to ensure that some data has been entered and the value has not been left blank ```javascript OUTPUT "Please enter the value " REPEAT INPUT Value IF Value = "" THEN OUTPUT "*=Required " ENDIF UNTIL Value <> "" ``` ### **Format Check** A format check checks that the characters entered conform to a pre-defined pattern. ### **Check Digit** - A check digit is the final digit included in a code; it is calculated from all the other digits. - Check digits are used for barcodes, product codes, International Standard Book Numbers (ISBN), and Vehicle Identification Numbers (VIN). ### **Verification** Verification is checking that data has been accurately copied from one source to another **There are 2 methods to verify data during entry** ( there are other methods during data transfer, but they are in paper 1) ### **1. Double Entry** - data is entered twice and the two sets of data are compared (by the computer). - If they don't match, an error has been input, so re-entry is requested. ### **2. Screen/Visual check** - A screen/visual check involves the user manually reviewing the entered data. - After data entry, the system displays the data on the screen and prompts the user to confirm its accuracy before proceeding. - The user can compare the displayed data against a paper document used as an input form or rely on their own knowledge to verify correctness. #### Visual check looking at the data that has been entered and either confirming it is correct, or showing / correcting errors. #### Double entry check data is entered twice and the two sets of data are compared (by the computer). If they don't match, an error has been input, so re-entry is requested.
Theo
2025年11月4日 15:43
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
Word文件
PDF文档
PDF文档(打印)
分享
链接
类型
密码
更新密码
有效期