Question: In the programs and code that we've looked at and written so far, we've mostly assumed that the user is going to enter something correct.

 In the programs and code that we've looked at and written

In the programs and code that we've looked at and written so far, we've mostly assumed that the user is going to enter something "correct". Are they? Can we trust them? (Hint: No. We can't.) That's why our programs need to have checks for valid input. Here are some questions to consider... What are some of the things that can happen if a program doesn't do input validation? What kind of validation do we need to do? How can we validate? What do we need to consider when validating input? Find/build an example piece of code and explain how it validates input. (Don't use the ones from Practice Exercise #3,-)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!