Published on 2 Feb 2013
School
Department
Course
Professor

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.
-
Relational expressions.
○
Boolean expressions.
○
Context is often determined by:
-
Each sub-task can be any kind of task.
-
Objective
Express the condition.
○
Describe the task.
○
To describe a conditional task.
-
How to recognize dial tone, etc
○
You may need to consider things that are not explicitly mentioned, e.g.,
-
Problem solving
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.
-
You don't know which one is true!
○
You have to plan for both cases.
○
When designing the algorithm.
-
Conditional task
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 statement.
The else part is optional.
○
The if-else statement is a special case of the if/else statement.
-
The if/else statement
Conditional Tasks
January-31-13
9:56 AM
CMPT 113.3 Page 1