UNIT 2 • MODULE 2 • LESSON 05
The analysis phase produced a requirements specification for the library: what the system must do. Design answers a different question: how will the system be organised so that it does those things well? A good design is like an architect’s plan for a house. Before anyone lays a block, the plan shows the rooms, how they connect, where the pipes run and what each room is for. In software, the “rooms” are sub-systems and modules, and the “pipes” are the data passed between them.
You already met top-down design and hierarchy charts in Unit 1 • Module 2 • Lesson 02 – Top-Down, Bottom-Up, Stepwise Refinement and Hierarchy Charts, where they helped you design a single algorithm. This lesson places the same thinking inside system design and adds the tools professionals use: structure charts, design strategies and design deliverables.
What you will learn
- The four design activities: architectural, interface, data structure and algorithm design.
- System structuring into sub-systems, modules and programs.
- Top-down and bottom-up design methods.
- How to read and draw a structure chart, including data couples and control flags.
- Functional versus object-oriented design strategies.
- Coupling and cohesion as measures of a good modular design.
- The deliverables of design: the system architecture and the design specification.
Part 1: The four design activities
| Activity | Decides | Library example |
| Architectural design | The overall structure: the sub-systems, the modules within them, and how they relate and communicate. | Split into Loans, Catalogue and Membership sub-systems that share one database. |
| Interface design | How each component communicates: with users (screens, reports) and with other components (parameters, data formats). | The loan screen layout; recordLoan takes a member ID, a book ID and a day number. |
| Data structure design | How data is organised and stored: records, files, tables, arrays. | A Loan record with MemberID, BookID, LoanDay, DueDay, ReturnDay; loans held in a table. |
| Algorithm design | The step-by-step logic of each module. | Pseudocode for finding all loans more than 14 days old. |
These activities overlap and feed each other. Architectural design usually comes first, because it decides what modules exist. Interface, data and algorithm design then fill in the detail for each one.
System structuring: sub-systems, modules and programs
Large systems are divided into layers of smaller parts:
- A sub-system is a major part of the system that could almost stand alone, with its own purpose (for example the Loans sub-system).
- A module is a smaller, named unit within a sub-system that does one job (for example Record loan). In C a module is usually a function, or a source file of related functions.
- A program is an executable unit built from modules (for example the front-desk loans program that staff run).
Structuring is what makes large systems manageable. Different programmers can build different modules at the same time; each module can be tested alone; and a later change usually affects only one module.
Try it 1Which design activity?
Choose the design activity each decision belongs to.
Part 2: Top-down and bottom-up design
| Top-down | Bottom-up | |
| Starts with | The whole system as one problem | Small, well-understood components |
| Then | Breaks it into sub-problems, then breaks those down again (stepwise refinement) until each piece is simple | Combines components into larger units until the whole system is built |
| Strengths | Keeps the overall goal in view; clear structure; easy to divide work | Reuses existing tested parts; useful low-level pieces are built and tested early |
| Weaknesses | Low-level problems may be found late; can produce duplicate modules | Overall structure may be unclear until late; parts may not fit together |
In practice designers mix both. They sketch the system top-down to get the structure, but reuse existing library functions and components bottom-up. Reuse-oriented development from Lesson 02 is largely a bottom-up approach.
Part 3: Structure charts
A structure chart shows the modules of a program and how they call each other, together with the data passed between them. It looks like the hierarchy charts from Unit 1, with extra symbols for data.
| Symbol | Meaning |
| Rectangle | A module (in C, usually a function). The top module controls the others. |
| Line from a higher to a lower module | The higher module calls (uses) the lower one. |
| Arrow with an open circle | A data couple: data passed between modules, in the direction of the arrow. |
| Arrow with a filled circle | A control flag: a signal (such as found, ok, end of file) that affects what the receiving module does. |
| Curved arrow around lines (optional) | The calls are repeated (a loop). |
| Small diamond at a module (optional) | The call is made only if a condition is true (selection). |
Reading the chart above. The top module main calls three modules. It passes a member, a book and a day number down to Record loan and receives an ok flag back, which tells main whether to print a confirmation or an error. Record loan calls Find book, passing a book ID and getting back an index (its position in the list of books). Print overdue receives today’s day number and, for each loan, calls Days late. You will turn this exact chart into C in Lesson 07.
Structure chart vs DFD
Do not confuse the two. A DFD (Lesson 04) is an analysis model of how data flows through the whole system, including people and stores. A structure chart is a design model of how a program’s modules are arranged and call each other. A common design step is to turn each DFD process into one or more modules on a structure chart: process 1 Record loan becomes the Record loan module, and so on.
Try it 2Read the structure chart
Use the structure chart above to answer each question.
Worked example: from DFD to structure chart
Here is how the designer produced the chart above from the level 1 DFD in Lesson 04. Follow the same steps for your own systems.
| Step | What the designer did | Result |
| 1. One controller | Create a top module that runs the program and decides which task to do. | Library loans (main) |
| 2. One module per DFD process | Each numbered process becomes a second-level module, named with the same verb phrase. | Record loan, Record return, Print overdue |
| 3. Find repeated or separable jobs | Look inside each process for a sub-task that is clearly separate or could be reused. | Searching for a book, searching for a loan, working out days late |
| 4. Add data couples | For each call, ask: what data must go down, and what result must come back? | book down, index up; loan and day down, days up |
| 5. Add control flags | Where a module must report success or failure, add a flag. | ok returned from Record loan |
| 6. Check quality | Does each module do one job? Are couples few and clear? | Yes: six small, cohesive modules |
Notice what disappeared: the external entities and data stores of the DFD are not boxes on the structure chart. Entities become input and output inside modules (for example, printing the overdue list for the librarian), and data stores become data structures (arrays of records in Lesson 07, or files and database tables in a larger system).
CASE tools in design
The CASE tools from Lesson 04 are just as useful here. Design tools can draw structure charts and class diagrams, keep every module description in the shared repository alongside the data dictionary, check that each data couple on a chart is defined, and in some cases generate function headers or class skeletons directly from the design. As in analysis, the tool records and checks the design; the designer still makes the decisions.
Part 4: Good modular design: coupling and cohesion
Two ideas help judge whether a structure chart is a good design.
- Cohesion is how closely the parts inside one module belong together. Aim for high cohesion: each module does one clear job. “Find book” is highly cohesive. A module called “Do loan stuff and print report and check password” is not.
- Coupling is how much modules depend on each other. Aim for low coupling: modules communicate only through a few clearly defined parameters, not through shared global variables. Low coupling means a change inside one module rarely breaks another.
High cohesion and low coupling directly support maintainability (Lesson 01) and make modules easier to test separately (Lesson 08). When a structure chart has a module with many data couples going in and out, or a module that seems to do several unrelated things, that is a sign the design should be improved.
Part 5: Design strategies: functional vs object-oriented
| Functional (function-oriented) design | Object-oriented design | |
| Focus | The functions (actions) the system performs | The objects (things) in the system and their behaviour |
| System is built from | Functions that transform data; data is often shared between them | Classes that bundle data (attributes) with the operations (methods) on it |
| Typical tools | DFDs, structure charts | Class diagrams and other UML diagrams |
| Library example | Functions recordLoan, recordReturn, printOverdue working on loan records | Classes Member, Book and Loan; a Loan object knows its own due day and can calculate its days late |
| Suits | Systems with clear processing steps; languages such as C | Large systems with many interacting things; languages such as Java, Python, C++ |
Because this course uses C, our designs are functional: structure charts of functions. You should still be able to describe the object-oriented alternative and compare the two. A key advantage of object-oriented design is encapsulation: an object’s data can be changed only through its own methods, which protects it from accidental change. A key advantage of functional design is simplicity for smaller, process-driven systems.
Part 6: Deliverables of the design phase
| Deliverable | Contents |
| System architecture | The sub-systems and modules and how they connect, usually shown as block diagrams and structure charts; hardware and network layout if relevant. |
| Design specification | The detailed design: structure charts, module descriptions (inputs, outputs, purpose), data structures and file or database designs, screen and report layouts, and algorithms in pseudocode. |
The design specification is what programmers work from in the implementation phase. A good one is detailed enough that two different programmers would produce code that fits together. It also becomes system documentation for later maintainers.
Worked example: a module description
Module: findBook Purpose: locate a book by its ID In: book ID (int) Out: index in books array, or -1 Called by: recordLoan Algorithm: linear search
Every module on the structure chart gets a short description like this. Notice how it links to your Unit 2 Module 1 work: the algorithm is the linear search from Unit 2 • Module 1 • Lesson 07 – Searching in C: Linear Search and Binary Search.
Try it 3Design drill
“Concepts” checks design vocabulary. “Charts” checks structure chart symbols and quality.
Common mistakes
- Mixing up structure charts and DFDs. Structure charts show calls between program modules; DFDs show data movement through a system.
- Drawing a structure chart with no data couples. The data passed between modules is a key part of the design.
- Using a control flag where a data couple is meant, or the reverse.
- Describing top-down design as "starting with the code". It starts with the whole problem.
- Forgetting interface design includes interfaces between modules, not just screens.
Summary
| Idea | Key point |
| Four design activities | Architectural, interface, data structure, algorithm. |
| Structuring | System, sub-systems, modules, programs. |
| Methods | Top-down (decompose) and bottom-up (compose), often mixed. |
| Structure chart | Modules, calls, data couples (open circle), control flags (filled circle). |
| Quality | High cohesion, low coupling. |
| Strategies | Functional (functions and data flows) vs object-oriented (classes and objects). |
| Deliverables | System architecture and design specification. |
Review questions
1. Name and describe the FOUR design activities.
Show answer
Architectural design (overall structure of sub-systems and modules and their relationships); interface design (how components communicate with users and each other); data structure design (how data is organised and stored); algorithm design (the step-by-step logic of each module).
2. What is architectural design?
Show answer
Deciding the overall structure of the system: identifying the sub-systems and modules and the relationships and communication between them.
3. Compare top-down and bottom-up design.
Show answer
Top-down starts with the whole system and breaks it into smaller parts; it keeps the goal in view but may find low-level problems late. Bottom-up builds and combines small components; it reuses tested parts but the overall structure may be unclear until late.
4. Distinguish between a data couple and a control flag.
Show answer
A data couple (open circle) carries data that the receiving module processes, such as a book ID. A control flag (filled circle) carries a signal that affects what the receiving module does, such as found or ok.
5. Explain why low coupling and high cohesion are desirable.
Show answer
High cohesion means each module does one job, so it is easier to understand and test. Low coupling means modules depend on each other little, so a change in one module is unlikely to break others. Both improve maintainability.
6. Compare functional and object-oriented design strategies.
Show answer
Functional design decomposes the system into functions that transform data, using tools such as structure charts. Object-oriented design identifies objects that combine data and operations, using class diagrams; it supports encapsulation and reuse.
7. List THREE items in a design specification.
Show answer
Any three: structure charts; module descriptions; data structures or file and database designs; screen and report layouts; algorithms in pseudocode.
Homework
- Draw a structure chart for the sports club system from Lesson 04, with at least five modules, data couples and one control flag.
- Write module descriptions (purpose, in, out, called by) for two of your modules.
- List the classes you would use for the sports club in an object-oriented design, with two attributes and one method each.
- Find a module in one of your own Unit 1 C programs that has low cohesion, and explain how you would split it.
Mastery quiz: Software design
This 10-question quiz is separate from the short Quick quiz at the end of the lesson. Score 8/10 or higher to earn this lesson’s badge. Your best score is saved in this browser on this device.
Mastery quiz: Software Design: Architecture, Structure Charts and Design Strategies
Your course badges: loading saved progress…
View badges
No course badges earned yet. Score 8/10 in a lesson quiz to earn its badge.
Saved in this browser on this device. Clearing browser data may remove your badges.
Answer all 10 questions. Earn this lesson’s badge at 8/10 or higher. Read the explanations, revisit the Try it activities and retry as often as you need. These are self-study badges, not formal grades.
Exam tips
Specimen Unit 2 Paper 01 (2021), Item 28. This item describes the activity of identifying sub-systems and their relationships and asks which design activity it is. Learn a one-line definition of each of the four design activities so that you can match a description to its name quickly.
For structured questions, a structure chart earns marks for correct hierarchy (who calls whom), sensible module names, and labelled data couples and flags. Use a ruler-straight, top-to-bottom layout and keep labels short.
When asked to compare strategies or methods, use a two-column comparison: focus, tools, strengths, and a short example.
Previous: Unit 2 • Module 2 • Lesson 04 – Data Flow Diagrams, Data Dictionaries and CASE Tools. Next: Unit 2 • Module 2 • Lesson 06 – Entity-Relationship Diagrams and User-Interface Design.
Syllabus link: CAPE Computer Science (CXC A19/U2/21), Software Engineering (Unit 2, Module 2). Specific Objective 5 (first part): design activities (architectural, interface, data structure, algorithm); structure charts and CASE tools; top-down, bottom-up and system structuring (sub-systems, modules, programs); functional versus object-oriented design strategies; deliverables (system architecture, design specification).
Video search terms
Search YouTube for: "structure chart data couple control flag", "top down vs bottom up design", "coupling and cohesion explained", "function oriented vs object oriented design".
Try it 4Quick quiz
Tap an answer. All eight questions are self-checks on this lesson.
Updates
2026/12/01
- First version of the lesson.
© 2026 islandclass.org
