Welcome to Designing Solutions

Welcome to one of the most practical and rewarding areas of Digital Technology! Before a software developer writes a single line of code, they must plan exactly how their program will work. Think of it like building a house: you would never lay bricks without an architect's blueprint! In this chapter, you will learn how to break problems down, use standard design tools like flowcharts and pseudocode, choose appropriate data types, design user-friendly interfaces, and build rigorous test plans.

Don't worry if this seems like a lot to take in at first! We will break every concept down step-by-step with simple analogies and practical examples.


1. Understanding Algorithms & Problem Solving

An algorithm is simply a clear, step-by-step set of instructions designed to complete a specific task or solve a problem. In our daily lives, recipes, IKEA flat-pack manuals, and directions on a map are all everyday algorithms.

Decomposition and Abstraction

When faced with a large computational task, software designers use two key computational thinking techniques:
Decomposition: Breaking a complex problem down into smaller, more manageable sub-problems.
Abstraction: Removing unnecessary details to focus only on the essential parts needed to solve the problem.

Tools for Designing Algorithms

In GCSE Digital Technology, there are three primary design notations you need to know:

1. Structured English
This is everyday English organized into logical steps. It does not look like code, but it avoids vague descriptions.
Example:
Ask the user to enter their exam score.
If the score is 50 or higher, print "Pass".
Otherwise, print "Fail".

2. Pseudocode
Pseudocode looks and reads like real computer code, but it does not follow the strict syntax rules of any single language (like Python or C#). It allows programmers to focus purely on logic.
Example:
OUTPUT "Enter score: "
INPUT score
IF score >= 50 THEN
    OUTPUT "Pass"
ELSE
    OUTPUT "Fail"
ENDIF

3. Flowcharts
A flowchart is a visual diagram that uses standard geometric shapes connected by directional arrows (flowlines) to show how data and decisions move through an algorithm.

Standard Flowchart Symbols

You must memorize the standard flowchart shapes and their purposes:

Terminator (Rounded Rectangle / Oval): Represents the START or STOP / END of an algorithm.
Process (Rectangle): Represents an action, calculation, or internal operation (e.g., \(total = price \times quantity\)).
Input / Output (Parallelogram): Represents entering data into the system (e.g., entering a PIN) or displaying data to the user (e.g., printing a receipt).
Decision (Diamond): Represents a question or condition with two possible outcomes (e.g., Yes/No or True/False).
Flowline (Arrow): Shows the direction of control flow from one step to the next.

Common Mistake to Avoid: Confusing the Process rectangle with the Input/Output parallelogram. If data is moving into or out of the computer, always use the slanted parallelogram!

Key Takeaway: Designing algorithms using Structured English, Pseudocode, or Flowcharts allows you to catch logical errors early before writing actual program code.


2. The Three Fundamental Programming Constructs

Every program ever written, from a simple calculator to complex video games, is built using combinations of just three core constructs:

A. Sequence

Sequence means executing instructions in strict, consecutive order, one after the other, from top to bottom. If the order is swapped, the program will produce incorrect results or fail completely.

Analogy: Putting on your socks before your shoes. The order matters!

B. Selection

Selection allows a program to make decisions and take different paths depending on whether a condition is true or false.

IF... THEN... ELSE: Used when there are two primary paths.
CASE / SELECT: Used when there are multiple distinct choices (e.g., selecting option 1, 2, 3, or 4 from a menu).

C. Iteration (Repetition / Looping)

Iteration means repeating a block of instructions multiple times. There are two main categories of iteration:

Count-Controlled Iteration (e.g., FOR loop): The loop repeats a set, predetermined number of times (e.g., repeat 10 times).
Condition-Controlled Iteration (e.g., WHILE loop or REPEAT...UNTIL): The loop repeats until a specific condition changes or is met (e.g., keep prompting for a password until the correct one is entered).

Key Takeaway: Sequence = step-by-step; Selection = branching decisions; Iteration = repeating loops.


3. Data Types, Variables, and Constants

When designing solutions, you must specify how data will be stored in computer memory.

Variables vs. Constants

Variable: A named storage location in memory whose value can change while the program is running (e.g., player_score, user_age).
Constant: A named storage location whose value remains fixed and cannot be altered during program execution (e.g., \(PI = 3.14159\), \(VAT\_RATE = 0.20\)). Using constants prevents accidental changes and makes code easier to maintain.

Standard Data Types

Integer: Whole numbers with no decimal part (e.g., \(42\), \(-5\), \(0\)). Ideal for counting people or items.
Real / Float: Numbers with a fractional or decimal part (e.g., \(19.99\), \(-3.5\), \(3.14\)). Used for currency and measurements.
Character: A single alphanumeric symbol, letter, or punctuation mark enclosed in quotes (e.g., 'A', '9', '$').
String: A sequence of text or characters joined together (e.g., "Belfast", "BT1 1AA").
Boolean: Can only take one of two possible values: TRUE or FALSE (e.g., isLoggedIn = TRUE).

Top Tip for Exams: Telephone numbers and postal codes should always be stored as Strings, not Integers! Why? Because telephone numbers often start with a leading zero (which integers delete), and postal codes contain letters.


4. Data Validation and Verification

When users enter data, mistakes happen. To keep programs working reliably, designers must plan data checks.

Validation

Validation is an automatic check carried out by software to ensure that entered data is sensible, reasonable, and follows specific rules. (Note: Validation cannot check if data is 100% accurate, only that it is valid!)

Common validation checks include:

Presence Check: Ensures a field is not left blank (e.g., an online form requiring an email address before submitting).
Range Check: Ensures a numerical value falls within set upper and lower boundaries (e.g., an exam percentage must be between \(0\) and \(100\)).
Length Check: Ensures data has an exact number of characters or falls within a length limit (e.g., a bank PIN must be exactly 4 digits).
Type Check / Character Check: Ensures data contains only the correct data type (e.g., entering letters into an age field causes an error).
Format Check: Ensures data follows an exact pattern (e.g., a UK National Insurance number must follow the format LL NN NN NN L, where L = letter and N = number).
Lookup Check: Checks input against an existing list of acceptable options (e.g., choosing a country from a drop-down menu).

Verification

Verification checks whether data has been copied or transferred accurately from one source to another.
Double Entry: Entering data twice (e.g., typing a new password twice to confirm).
Visual / Screen Check: The user manually reads the entered data on-screen before confirming.

Memory Trick:
Validation = Is it allowable by the computer rules?
Verification = Is it identical to the original source?


5. User Interface (UI) Design & Navigation

A solution must be easy and intuitive for people to use. When designing digital user interfaces, designers create visual plans.

Interface Design Tools

Wireframes / Screen Layouts: Simple line sketches showing the arrangement of buttons, text boxes, images, and labels on screen.
Storyboards: Sequences of wireframes showing how screens change over time or through user interactions.
Navigation Structure Diagrams (Site Maps): Tree-like hierarchical diagrams showing how different pages or screens connect and link together.

Good User Interface Principles

Consistency: Use uniform fonts, colors, and button placements across every screen.
Accessibility: Provide features such as high-contrast color modes, resizable text, and screen-reader support for users with visual or physical impairments.
Clear Feedback: Provide informative messages when actions succeed or error alerts when an input is invalid.
Target Audience Suitability: Design with the end user in mind (e.g., bright colors and large icons for young children; clean, minimalist layouts for professional business tools).


6. Designing Robust Test Plans

To guarantee that software functions without crashing, a detailed test plan must be written during the design stage before building begins.

Structure of a Test Plan Table

A standard test plan contains the following column headings:
1. Test ID: A unique reference number (e.g., Test 1, Test 2).
2. Test Description / Purpose: What feature or rule is being tested.
3. Test Data: The exact input value being entered.
4. Type of Test Data: Normal, Boundary / Extreme, or Erroneous / Invalid.
5. Expected Result: What should happen if the system works correctly.
6. Actual Result: What actually happened when tested (completed after coding).
7. Remedial Action: What needs fixing if the test fails.

Types of Test Data

Imagine a system that only accepts user ages between \(11\) and \(18\) inclusive (\(11 \le age \le 18\)):

Normal Test Data: Data that is completely valid and falls comfortably within expected limits.
Example: \(14\) or \(16\).
Expected Outcome: Data is accepted.

Boundary / Extreme Test Data: Data that sits right on the minimum and maximum edges of acceptable limits.
Example: \(11\) and \(18\).
Expected Outcome: Data is accepted.

Erroneous / Invalid Test Data: Data that falls outside acceptable limits or is of the wrong data type.
Example: \(9\), \(25\), or "Twelve".
Expected Outcome: Data is rejected, and a helpful error message is displayed.

Quick Review Box:
For a range check between \(1\) and \(100\):
Normal: \(50\)
Boundary/Extreme: \(1\) and \(100\)
Erroneous/Invalid: \(0\), \(101\), or "Ten"


Chapter Summary Checklist

• Algorithms are step-by-step instructions designed using Structured English, Pseudocode, and Flowcharts.
• The standard flowchart symbols are Terminator, Process, Input/Output, and Decision.
• All solutions rely on Sequence, Selection, and Iteration.
• Choose the correct data type (Integer, Real, Character, String, Boolean) and use Constants for fixed values.
Validation checks if data is sensible (Range, Length, Type, Presence, Format, Lookup), while Verification checks accuracy.
• Design interfaces with clarity, accessibility, and consistency in mind.
• Test plans must test Normal, Boundary/Extreme, and Erroneous data systematically.