Design Specification Examples in CS Thinking

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Design Specification.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in CS Thinking.

Concept Recap

A document that describes what a software system should do, how it should behave, and what constraints it must satisfy, before coding begins.

A spec is a blueprint for software โ€” like an architect's plan before building a house. It answers 'what are we building and why?' before 'how?'

Read the full concept explanation โ†’

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: Good specifications reduce wasted effort. Building the wrong thing is more expensive than spending time on a clear spec.

Common stuck point: A spec describes what the system does, not how it's coded internally. Implementation details come later.

Worked Examples

Example 1

easy
What is a design specification and what should it include for a simple calculator app?

Solution

  1. 1
    Step 1: A design specification is a detailed plan that describes what the software should do, how it should look, and how it should behave โ€” before any coding begins.
  2. 2
    Step 2: For a calculator app it should include: purpose (perform basic arithmetic), inputs (numbers and operators), outputs (calculation results), user interface layout (buttons, display), and functionality (add, subtract, multiply, divide).
  3. 3
    Step 3: It should also specify constraints (e.g., handles numbers up to 10 digits, shows error for division by zero) and success criteria (how to verify it works correctly).

Answer

A design specification describes purpose, inputs, outputs, UI, functionality, constraints, and success criteria โ€” all defined before coding.
Design specifications prevent misunderstandings and scope creep. They serve as a contract between the developer and the client about what will be built.

Example 2

medium
A client asks for a 'fast and user-friendly website'. Explain why this is insufficient as a design specification and suggest specific, measurable criteria to replace these vague terms.

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

medium
Write a brief design specification for a school library book search system. Include at least: purpose, inputs, outputs, and three functional requirements.

Example 2

hard
Explain the difference between functional requirements and non-functional requirements. Give two examples of each for an online shopping system.

Background Knowledge

These ideas may be useful before you work through the harder examples.

pseudocodeflowchart