validation and verification
使用闪卡高效复习COMPUTER-SCIENCE科目知识点
共计闪卡
28张
7 algorithm design and problem solving
闪卡自测
Define "validation" in the context of data input.
所有闪卡
闪卡 1
问题
Define "validation" in the context of data input.
查看答案
答案
Validation is a method used to check that an input from a user is acceptable and matches the requirements of the program.
闪卡 2
问题
What are the six categories of validation?
查看答案
答案
The six categories of validation are: range check, length check, type check, presence check, format check, and check digit.
闪卡 3
问题
What is a range check?
查看答案
答案
A range check ensures the data entered as a number falls within a particular range.
闪卡 4
问题
Define "length check"
查看答案
答案
A length check verifies that the length of a string meets specific criteria, such as a minimum or maximum number of characters.
闪卡 5
问题
What does a type check do?
查看答案
答案
A type check verifies that the data entered matches the expected data type, such as ensuring an age is entered as an integer.
闪卡 6
问题
What is the purpose of a presence check?
查看答案
答案
A presence check looks to see if any data has been entered in a field, ensuring that required fields are not left blank.
闪卡 7
问题
Define "format check"
查看答案
答案
A format check ensures that the data has been entered in the correct format, often using pattern matching and string handling.
闪卡 8
问题
What is verification in data entry?
查看答案
答案
Verification is the act of checking that data is accurate when entered into a system.
闪卡 9
问题
What are two methods of verification?
查看答案
答案
Two methods of verification are double entry checking and visual checks.
闪卡 10
问题
What is the purpose of a check digit?
查看答案
答案
A check digit is a numerical value, usually the final digit of a larger code, calculated by applying an algorithm to the code to verify its accuracy.
闪卡 11
问题
Define "suitable test data"
查看答案
答案
Suitable test data is specially chosen data to test the functionality of a program or design.
闪卡 12
问题
What are the four categories of suitable test data?
查看答案
答案
The four categories of suitable test data are: normal, abnormal, extreme, and boundary.
闪卡 13
问题
What is normal test data?
查看答案
答案
Normal test data is data that should be accepted in the program.
闪卡 14
问题
Define "abnormal test data"
查看答案
答案
Abnormal test data is data that is the wrong data type for the input field.
闪卡 15
问题
What is extreme test data?
查看答案
答案
Extreme test data is the maximum and minimum values of normal data that are accepted by the system.
闪卡 16
问题
How does boundary test data differ from extreme test data?
查看答案
答案
Boundary test data tests values on either side of the maximum and minimum acceptable values, including the largest and smallest unacceptable values.
闪卡 17
问题
True or False? Suitable test data is only used to check if a program works correctly.
查看答案
答案
False. Suitable test data is used to test both correct functionality and how the program handles incorrect inputs.
闪卡 18
问题
What is the purpose of using different categories of test data?
查看答案
答案
The purpose of using different categories of test data is to thoroughly test various aspects of the program, including its ability to handle both valid and invalid inputs.
闪卡 19
问题
A program to check age is between 18 and 25, what would be an example of boundary test data?
查看答案
答案
Boundary test data would include ages: 18,25 -smallest & largest accepted data 17 & 26 - data falling just below & exceeding
闪卡 20
问题
Why is it important to test with abnormal data?
查看答案
答案
It's important to test with abnormal data to ensure the program can handle incorrect input types and doesn't crash or behave unexpectedly when given invalid data.
闪卡 21
问题
Define "trace table"
查看答案
答案
A trace table is used to test algorithms and programs for logic errors that appear when an algorithm or program executes.
闪卡 22
问题
Trace tables can be used with flowcharts, pseudocode, or?
查看答案
答案
Program code.
闪卡 23
问题
What are two purposes of using a trace table?
查看答案
答案
Two purposes of using a trace table are: discover the purpose of an algorithm and record the state of the algorithm at each step or iteration.
闪卡 24
问题
How is a trace table executed?
查看答案
答案
A trace table is executed by following each stage of the algorithm step by step.
闪卡 25
问题
True or False? Trace tables can only be used with program code.
查看答案
答案
False. Trace tables can be used with flowcharts, pseudocode, or program code.
闪卡 26
问题
What can be checked using a trace table?
查看答案
答案
Inputs, outputs, variables, and processes can be checked for the correct value at each completed stage using a trace table.
闪卡 27
问题
In a trace table, what does each row typically represent?
查看答案
答案
In a trace table, each row typically represents a single step or iteration of the algorithm.
闪卡 28
问题
What type of errors are trace tables particularly useful for identifying?
查看答案
答案
Trace tables are particularly useful for identifying logic errors that appear when an algorithm or program executes.