Build and check the structure first

You are building a program that reads club attendance, prepares a summary, and displays it. Use a top-down workflow in which you check the overall coordination before implementing detailed helpers. Temporary stubs can supply fixed sample results during this check. Arrange the following milestones in their development order.

  1. 1.

    Write a high-level plan assigning attendance reading, summary preparation, and display to separate helpers.

  2. 2.

    Run the complete program with the real helpers and compare its displayed summary with the expected result.

  3. 3.

    Run the coordinating function with the stubs to check that the planned activities are connected correctly.

  4. 4.

    Replace the stubs with detailed helpers and test each completed helper against its assigned responsibility.

  5. 5.

    Implement the coordinating function using temporary stubs for the planned helpers.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Top-Down Design with Functions Questions: