Validation, verification and trace tables
導入済み
9:16
プログラム開発ライフサイクル
スマホのすべてのアプリは、このような人が書いたものです。しかし彼らはコードを書くことから始めました。最初の行の前に、問題は研究され、解決策…
英語のナレーション・英語と中国語の字幕を切り替え可能
このレッスンの内容
| English | 意味 |
|---|---|
| data/ˈdeɪtə/ | Recorded facts, observations or values used for analysis or processing. |
| Validation/ˌvælɪˈdeɪʃn/ | Checking whether data meets specified rules for acceptable values or format. |
| verification/ˌverɪfɪˈkeɪʃn/ | Checking that data has been entered or copied accurately from its source, rather than deciding whether the source itself is correct. |
| trace table/treɪs ˈteɪbl/ | トレース表 |
| algorithm/ˈælɡərɪθəm/ | A finite sequence of precise steps for solving a problem or carrying out a task. |
| Range check/reɪndʒ tʃek/ | |
| length check/leŋθ tʃek/ | 長さチェック |
| type check/taɪp tʃek/ | |
| presence check/ˈprezəns tʃek/ | 存在性チェック |
| format check/ˈfɔːmæt tʃek/ | |
| check digit/tʃek ˈdɪdʒɪt/ | |
| Visual check/ˈvɪʒuːəl tʃek/ | A person compares the typed data with the original. |
| Double entry/ˈdʌbl ˈentri/ | The data is entered twice and the two copies are compared. |
| test data/test ˈdeɪtə/ | テストデータ |
| variable's | |
| normal/ˈnɔːml/ | In testing, ordinary valid input that should be accepted and produce the expected result. |
| abnormal/əbˈnɔːml/ | In testing, invalid or unsuitable input that the program should reject or handle appropriately. |
| extreme/ekˈstriːm/ | |
| boundary/ˈbaʊndəri/ | Input values at, just inside or just outside an allowed limit, used to check a program's handling of its valid range. |
| program/ˈprəʊɡræm/ | A set of instructions specifying operations for a computer to carry out. |
確認とトレース
- データが入力されたとき、誤りを減らすために確認を行う。
- 妥当性チェックは合理であることを確認し、検証は正しくコピーされたことを確認する。
- トレース表はアルゴリズムをステップごとに追跡します。
検証
- 検証は、データが妥当でルールに従っているかを確認します(データそのものが真実かどうかを確認することはできません)。
- 範囲チェック(制限値の範囲内)、長さチェック(適切な文字数)、タイプチェック(適切なデータ種別)、存在チェック(空白でない)、フォーマットチェック(正しいパターン、例:dd/mm/yyyy)、そしてチェックディジット(数字を確認するための追加桁)があります。

すべてのアルゴリズムは入力、処理、出力に分解されます — ここでは3つの得点の平均を求める例です。

Checking that an age is between 0 and 120 is a:
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
A range check confirms a value lies within allowed limits.
Match each validation check to its purpose.
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
Presence = not blank; type = right kind of data; format = right pattern.
確認
- 確認は、データが正しくコピーまたは入力されたかを確認します(タイポがないか)。
- 視覚チェック — 人が入力したデータと元数据进行比較します。
- 二重記入 — データを2回入力し、両方のコピーを比較する。

リニアサーチは最初から順に各項目をチェックして、値が見つかるまで続きます。
Double entry of data is a validation check.
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
False. Double entry is a verification check: it confirms data was entered correctly. Validation checks that data is sensible, such as a range or type check.
Entering data twice and comparing the two copies is:
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Double entry is a verification method — the two copies must match.
トレース表とテストデータ
- トレース表は、アルゴリズム実行中の各変数の値を記録し、動作を確認したり何をするものかを調べるために使用します。
- テストデータの種類:通常(受け入れられる)、異常(拒否される)、極端(最大/最小許容値)、境界(制限値の両側の値、例:120と121)。

トレース表はプログラム実行中に各変数の値を記録します

Fill in a trace table
A trace table follows the variables one line at a time. Step through and watch the counter and the running total change — exactly the skill a trace-table exam question tests.
A trace table is used to:
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Tracing helps you check an algorithm works, or work out what it does, by following the variables.
Trace total = 0; FOR i = 1 TO 5: total = total + i. What is total at the end?
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
1+2+3+4+5 = 15 — the value the trace table builds up row by row.
このカードは新しいため、翻訳ができるまで英語で表示されます。
Worked example: test data for an exam mark
A program accepts whole-number exam marks from 0 to 100. Give one value of each type of test data.
- Normal: 57 (accepted). Abnormal: −8 or "ten" (rejected). Extreme: 0 and 100, the smallest and largest allowed values (accepted).
- Boundary: test each side of each limit: 100 (accepted) and 101 (rejected); 0 (accepted) and −1 (rejected). The check used is a range check 范围检查, plus a type check for "ten".

A program accepts ages 18 to 65. Which pair is boundary test data for the upper limit?
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Boundary data sits on each side of a limit: 65 should be accepted and 66 rejected.
Typing a new password twice is a validation check.
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Double entry is verification: it checks the data was copied correctly, not that it is sensible.
理解できましたか
- 検証 = 妥当ですか?(範囲、長さ、タイプ、存在、フォーマット、チェックディジット)
- 確認 = 正しくコピーされましたか?(視覚チェック、二重入力)
- トレース表はステップごとに変数の値を追跡します
- テストデータ:通常、異常、極端、境界
何が問題でしたか?この内容はサイトの運営チームだけが確認します。