# Data Verification Methods (Double Entry & Visual Check)

- **Track:** Cambridge IGCSE™ Computer Science (0478 / 0984) (CAMBRIDGE IGCSE 0478)
- **Module:** Section 7: Algorithm Design & Problem-Solving
- **Estimated Duration:** 15 minutes
- **Access:** Open Theory (All-Access for Interactive IDE &amp; Autotests)

---

## Theory & Conceptual Background

While **Validation** ensures that data adheres to business rules and reasonable limits, it cannot guarantee that the entered data is factually identical to the source document. That critical task is fulfilled by **Verification**.

---

## 1. Definition of Verification

**Verification** is the process of checking that data has been transferred or copied accurately from an original source document to a computer system without introducing **transcription errors** (mistyped keys or omitted characters).

---

## 2. The Two Primary Verification Methods

### 1. Double Entry

- **Mechanism**: Data is entered into the system twice—either by two different operators working independently, or by the same user entering the data twice (such as entering and re-confirming a new password or email address).
- **Processing**: The computer program automatically compares both entries character-by-character.
- **Outcome**: If the two entries match identically, the data is saved. If any discrepancy exists, the user is alerted to re-enter the data.
- **Advantage**: Highly effective at catching inadvertent keystroke errors.

### 2. Visual Check (Screen Proofreading)

- **Mechanism**: The user manually proofreads the data displayed on the screen against the original paper source document before confirming submission.
- **Limitation**: Highly prone to human cognitive fatigue and oversight, especially during repetitive, high-volume data entry.

---

## 3. Comprehensive Comparison: Validation vs Verification

  
| Dimension | Validation | Verification |
| --- | --- | --- |
| **Core Question** | "Is this data sensible, reasonable, and allowable according to the rules?" | "Is this data an exact, faithful copy of the original source document?" |
| **How Carried Out** | 100% automated by program software routines. | Program comparison (Double Entry) or human inspection (Visual Check). |
| **Detection Scope** | Catches out-of-range numbers, wrong lengths, missing values, incorrect formats. | Catches keystroke mistakes and transcription discrepancies. |
| **Failure Scenario 1** | *Source says Age: 14. Typist enters 41.* Passes verification if typed 41 twice, but fails a range check ($11 \le \text{Age} \le 18$). |
| **Failure Scenario 2** | *Source says Exam Mark: 78. Typist enters 87.* Passes range check ($0 \le \text{Mark} \le 100$), but fails verification because $87 \ne 78$. |

## Written practice and self-review

A clerk enters customer orders from paper order forms into a computer system using double entry verification. Explain why double entry verification cannot detect an incorrect price if the price was written incorrectly on the original paper order form.

Write an explanation before checking the theory. Check that each claim answers the question, uses the correct concept and explains why it applies. Discuss uncertain points with a teacher. The structured exercise below checks specific facts; it does not automatically mark this explanation.

---

## Interactive Exercises & Autotest Specifications

### Exercise 1: Exam-Style Check: Contrast Verification and Validation (Multiple choice, 25 XP)

**Instructions:**
Which statement accurately describes the primary distinction between data validation and data verification?

**Options:**
- **A**: Validation checks if data was copied accurately from paper; verification checks if numbers fall inside a valid range.
- **B**: Validation and verification both require human operators to proofread every screen manually.
- **C**: Validation is only used for strings, while verification is only used for integers.
- **D**: Validation checks whether entered data obeys preset rules and is sensible; verification checks whether data has been copied accurately from the original source without transcription errors.


**Autotest Expectations:**
- **Correct distinction between validation and verification**: `selection_match` -> Expected: `opt_dist`

### Exercise 2: Application: Check the reasoning (Fill in blank, 30 XP)

**Instructions:**
Work out each answer before submitting. Compare two independently entered copies: Compare entry against the original document: Does matching double entry prove both entries are true: yes or no?


**Starter Code:**
```text
{"prompt":"Application: Check the reasoning","template":"1. Compare two independently entered copies: [blank_1]\n2. Compare entry against the original document: [blank_2]\n3. Does matching double entry prove both entries are true: yes or no? [blank_3]","blanks":[{"id":"blank_1"},{"id":"blank_2"},{"id":"blank_3"}],"word_bank":["double entry","visual check","range check","yes","no","checksum"]}
```


### Exercise 3: Independent Practice: Double entry (Pseudocode, 30 XP)

**Instructions:**
Read two strings entered independently. Output MATCH if they are exactly equal, otherwise output DIFFERENT. Do not change their case before comparing.

Write a complete program. Read inputs in the stated order. Output only the requested results, one per line, without input prompts. Test with your own values before submitting.


**Starter Code:**
```text
// Plan your solution, then write your program.

```

**Autotest Expectations:**
- **Matching entries**: `test_case` -> Expected: `{&quot;inputs&quot;:[&quot;A73&quot;,&quot;A73&quot;],&quot;output&quot;:&quot;MATCH&quot;}`
- **Case differs**: `test_case` -> Expected: `{&quot;inputs&quot;:[&quot;A73&quot;,&quot;a73&quot;],&quot;output&quot;:&quot;DIFFERENT&quot;}`
- **Different entries**: `test_case` -> Expected: `{&quot;inputs&quot;:[&quot;A73&quot;,&quot;A37&quot;],&quot;output&quot;:&quot;DIFFERENT&quot;}`

