Answer:

  1. Fly from Hartford to Newark.
  2. Fly from Newark to Miami.

Different Ways to Divide a Task

sequence of tasks

You might question that answer. You might say that the major tasks are:

  1. Take-off from Hartford.
  2. Normal flight to Newark.
  3. Landing at Newark.
  4. Take-off from Newark.
  5. Normal flight from Newark to Miami.
  6. Landing at Miami.

Both answers are correct. The second answer shows details of the first answer:

  1. Fly from Hartford to Newark.
    1. Take-off from Hartford.
    2. Normal flight to Newark.
    3. Landing at Newark.
  2. Fly from Newark to Miami
    1. Take-off from Newark.
    2. Normal flight from Newark to Miami.
    3. Landing at Miami.

Dividing a task into smaller tasks, and then dividing those tasks into yet smaller tasks is the essential programming skill. Eventually, even the largest task can be divided into pieces so small that individual statements of a program can perform them.

QUESTION 10:

Consider the following "big task:"

The user enters a number of gallons. The program calculates the number quarts in that many gallons.

What are the tasks of this problem?