Software Modelling & Design, drawn out
The whole subject in nine Parts, taught through diagrams. Every idea is explained from scratch, every UML notation is drawn and labelled, and every past-exam question type is worked to a full-marks answer. You don't need the lectures or the study guide to follow it.
- Modela problem with use cases, a domain model and system sequence diagrams
- Designobjects that collaborate, guided by the GRASP principles
- Applythe GoF design patterns and recognise them in code
- Drawevery exam diagram by hand, in correct UML, against the clock
What this subject is about
Software design means deliberately choosing how a system behaves (how it responds to inputs and events) and how it is structured (which parts exist and how they collaborate). Software modelling means drawing simplified pictures of a system, called models, so that people can discuss a design, criticise it and compare alternatives before committing to code.
Design is hard for two reasons. The first is complexity: any part of a program can depend on any other, so with N components there are up to N(N−1)/2 possible dependencies. That is 45 for 10 components and 1,225 for 50. The second is change: on a typical project about a quarter of the requirements change before it ships. A good design keeps dependencies few and makes change cheap.
The subject teaches object-oriented analysis and design, following Craig Larman's textbook Applying UML and Patterns. Analysis works out what the system must do and what the world it lives in looks like. Design decides how software objects will do it. Each produces its own diagrams, called artefacts, and the map below shows how they connect. You will see a copy of it at the top of every Part, with that Part's artefacts highlighted.
Read the map from the top left. Use cases describe how people use the system. The domain model captures the concepts of the problem world. System sequence diagrams list the events an actor sends to the system, and operation contracts say what each event changes. Design then turns this into interaction diagrams (which objects send which messages), a design class diagram (the software classes that need to exist) and finally Java code. State machines describe objects whose behaviour depends on their state. Along the bottom are the ideas that guide every design decision: the GRASP principles, the GoF design patterns and architecture.
Larman's claim, and the spine of this subject: the most important skill in object-oriented design is assigning responsibilities to objects, which means deciding which object should know what and do what. UML is only the notation for writing those decisions down. Knowing UML without design skill just produces bad designs on paper.
Where the exam marks are
The exam is on paper, on campus, with 15 minutes of reading time and 2 hours of writing. It is worth 60% of the subject and carries a hurdle: you need 30 of the 60, which is 60 of the 120 raw marks. You may bring two double-sided A4 pages of notes, and pencil is allowed for diagrams. The two 2021 papers have exactly the same twelve kinds of question, so you can prepare a method for each one.
| Question type (2021 papers) | Marks | Taught in |
|---|---|---|
| Pattern-selection MCQs (10 × 2) | 20 | Part IV, VI, VII, all 20 in IX |
| Brief-format use case with an alternate scenario | 5 | Part I |
| System sequence diagram for a scenario | 10 | Part II |
| Domain class diagram from numbered sentences | 15 | Part II |
| Domain-level state machine from numbered sentences | 15 | Part V |
| Architecture: significant requirements and analysis; a technical memo | 10 + 10 | Part VIII |
| Java code → design class diagram; design sequence diagram with values | 10–12; 6–8 | Part III |
| GoF patterns evident in code; describe a Java class; Composite DCD | 5; 5; 7 | Part VI, VII |
The running examples
A handful of example systems come back again and again, in the textbook, the lectures and the exam. Meet them once here, so they feel familiar when they turn up later.
NextGen POS
A point-of-sale system for a shop: a Cashier rings up items on a Register, building a Sale of SalesLineItems, each pointing to a ProductDescription from the ProductCatalog, then takes a Payment. Most notation and GRASP examples use it.Monopoly
The board game: Players take turns rolling Dice and moving a Piece around Squares on a Board. Used to show Creator, Information Expert and Polymorphism (different kinds of square).Tony's Pizza
A pizza shop's ordering and delivery system, including delivery drones. Each week's workshop extended it: use cases, domain model, design, a state machine for an Order, then Adapter, Factory, Composite, Strategy and Observer.The Dice Game
A player rolls two dice and wins on a total of seven. Larman uses it to walk through the whole pipeline in four tiny diagrams (Part I).How to read this site
Each Part opens with what you'll be able to do by the end, and a copy of the map. Sections build on each other, so read a Part in order the first time. Coloured boxes mark the kind of content, so you can skim for what you need later:
A term you need to be able to state precisely.
A rule of good design, such as a GRASP principle or a pattern's intent.
Something that loses marks, usually shown next to the correct version.
How this topic is examined, and the method for answering.
A full-marks answer to a past-exam question.
An analogy or a plain-language way to think about it.
Step-through diagrams have Back and Next buttons. Use them to watch a diagram being built the way you would build it in the exam, one decision at a time, with the reason for each step written underneath. "Check yourself" questions hide their answers until you click; try each one honestly before you look. In the pattern Parts, colours mean roles: the same colour always marks the same job (client, abstraction, the pattern's key class, concrete classes), in both the diagrams and the text.
If a symbol in a diagram puzzles you, the UML notation appendix draws every diagram type once in full, with every element labelled.
Requirements & Use Cases
Analysis vs design, the Unified Process, use cases and use case diagrams. Part IIDomain Models & SSDs
Concepts, attributes and associations; system events; operation contracts. Part IIIObject Design
Sequence and communication diagrams, design class diagrams, mapping to and from Java. Part IVGRASP
Nine principles for deciding which object does what. Part VState Machines
States, events, guards and actions, from sentences to diagram to code. Part VIDesign Patterns I
Façade, Decorator, Builder, Adapter, Factory and Singleton. Part VIIDesign Patterns II
Strategy, Composite, Observer, Template Method, and telling them apart. Part VIIISoftware Architecture
Architectural factors, technical memos, layers and package diagrams. Part IXThe Exam
Time plan, notes sheet, a method per question type and all 20 past MCQs.Work through Parts I to VIII in order: each one uses the vocabulary of the ones before. Then do Part IX, and redraw every model answer from memory, on paper, in pencil, against a timer. Drawing is the skill the exam rewards most, and it only comes from practice.