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 good specification covers functional requirements (what the system does), non-functional requirements (performance, security, usability), and acceptance criteria (how to verify it works).
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.
Sense of Study hint: When writing a specification, start by listing what the user needs to accomplish (user stories or use cases). Then define the specific behaviors the system must have (functional requirements). Add constraints like performance targets and supported platforms. Finally, write acceptance criteria that define 'done.'
Worked Examples
Example 1
easyAnswer
First step
Full solution
- 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 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).
Example 2
mediumExample 3
hardExample 4
hardExample 5
hardExample 6
challengePractice Problems
Try these problems on your own first, then open the solution to compare your method.
Example 1
mediumExample 2
hardExample 3
easyExample 4
easyExample 5
easyExample 6
easyExample 7
easyExample 8
easyExample 9
easyExample 10
easyExample 11
mediumExample 12
mediumExample 13
mediumExample 14
mediumExample 15
mediumExample 16
mediumExample 17
mediumExample 18
mediumExample 19
mediumExample 20
challengeExample 21
challengeExample 22
challengeExample 23
easyExample 24
easyExample 25
easyExample 26
easyExample 27
easyExample 28
mediumExample 29
mediumExample 30
mediumExample 31
mediumExample 32
mediumExample 33
mediumExample 34
mediumExample 35
mediumExample 36
mediumExample 37
mediumExample 38
hardExample 39
hardExample 40
hardExample 41
challengeRelated Concepts
Background Knowledge
These ideas may be useful before you work through the harder examples.