Computer Science I / Integrated Programming Synthesis
Practice question · Select all that apply

Select every edge case the lesson says the word-frequency counter's tests should cover.

Hints
  1. Four of these are cases the program must decide how to handle; one is not a program behaviour at all.
  2. Ask which option describes a limitation of the hardware rather than a decision the code makes.
Show the answer
  • A. An empty input file
  • B. Punctuation attached to words
  • C. Ties among the top ten counts
  • D. Words differing only in capitalisation
Why

Empty input, punctuation, case-folding and ties are all points where the program must make a choice, and a test pins that choice down. A file bigger than the disk cannot exist to be read, so it is not a behaviour the program can define. Edge cases are decisions, not disasters.

Read the lesson: Integrated Programming Synthesis →

Practise Integrated Programming Synthesis

The app has 5 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Integrated Programming Synthesis