When developing applications, we have to make sure that the user enters valid values and selects the appropriate options before executing a portion of code that uses these user-defined values. The programmer's job is to expect an error, secure the application against it, and show the user how to properly use the application.
Conditions are used not only to test user-defined values but also to add depth and functionality to the application by providing conditional execution — the ability to execute various portions of code depending on the state of the condition.
In this chapter, you'll first learn about the if and case statements in Delphi, and then you'll see how to test for a condition using the C++ language.