CMPT 100 Lecture Notes - Dial Tone, Problem Solving
Document Summary
To define a conditional task in terms of the condition and the task. Use if, if/else, nested if/else, chained if/else to define conditional tasks. Each sub-task can be any kind of task. You may need to consider things that are not explicitly mentioned, e. g. , Like a plan that is designed to handle several possibilities. Only one context is true at any time. When performing the task, you know which one is true. It"s generally in the form of a statement that may come with a condition. We can include any sub-task as part of an if statement. Indentation shows the extent of the subtasks in the then-clause. The if-else statement is a special case of the if/else statement.