Cist1305 chap7 – Flashcards
Unlock all answers in this set
Unlock answersquestion
True/False: Programs should be designed such that all input is inspected before it is processed and bad data is discarded.
answer
True
question
True/False: An input validation loop is sometimes called an error handler.
answer
True
question
What is the first step to use in detecting data type mismatch errors?
answer
Read the input as a string
question
The purpose of the ________ is to get the first input value for the validation of a loop.
answer
Priming read
question
True/False: The practice of anticipating errors that can happen while a program is running and designing the program to avoid those errors is called defensive programming.
answer
True
question
If, when asked for a date of birth, the user enters a future date, this error should be caught by a ________ check.
answer
Reasonableness
question
________ happens when an input operation attempts to read data, but there is no data to read.
answer
Empty input
question
Which of the following library functions could be used to validate that the correct data type was input for an amount of money?
answer
isReal
question
In addition to using loops to validate data, ________ can also be used to validate data.
answer
Boolean Function
question
True/False: Checking for accuracy of data, even when the user provides the right type of data, is part of input validation.
answer
True