asked 64.3k views
3 votes
Designing a program to avoid common errors is called ________ programming.

a) Defensive
b) Direct
c) Defective
d) Detective
e) None of these

asked
User Hagner
by
8.9k points

1 Answer

1 vote

Final answer:

Defensive programming is the practice of writing a program in a way that anticipates potential errors and mishandling to ensure it continues to operate correctly under unforeseen situations.

Step-by-step explanation:

Designing a program to avoid common errors is called defensive programming. This approach involves writing code with the anticipation that it could be misused or encounter unexpected input. The goal of defensive programming is to ensure that a program continues to function under unforeseen circumstances. It includes practices such as input validation, consistent use of error handling, and writing code that is clear and maintains integrity under all conditions.

answered
User Drmrgd
by
8.3k points