Quiz7-InputValidation Flashcards
An input validation loop is sometimes called an ERROR HANDLER(T/F)
True
If a user is asked to enter the number of widgets he or she wants to buy and enters “two”, the program will automatically change the entry to an integer(T/F)
False
If a user is asked to enter the number of widgets he or she wants to buy, the iSINTEGER function can be used to validate this input.(T/F)
True
Programs should be designed to inspect all input before processing that input.(T.F)
True
A priming read is needed when a pretest loop is executed.(T/F)
True
A Boolean function can often be used to validate data(T/F)
True
The most difficult input error to validate is an empty read.(T/F)
False
Defensive programming is the practice of anticipating errors that can happen while a program is running and designing the program to catch and deal with those errors.(T/F)
True
Checking for the accuracy of data, even when the user provides valid input, is part of input validation. (T/F)
True
Checking that input data is reasonable is programmatically impossible.(T/F)
False
Input validation is not needed if the program is well designed.(T/F)
False
A programmer is not permitted to use library functions for input validation.(T/F)
False
What do computer programmers say about the fact that computers can’t tell the difference between good and bad data?
Garbage in, Garbage out
The purpose of _____________ is to get the first input value for the validation of a loop.
The priming read
Designing a program to avoid common errors is called ____________ programming.
defensive