Chapter 8
Waterfall — sequential phases (Requirements→Design→Implementation→Testing→Maintenance). Simple but rigid; changes are expensive once a phase is complete. V-Model — each development phase is paired with a testing phase on the opposite side of the V (Requirements↔Acceptance Test, Design↔Integration Test). Spiral — risk-driven, iterative; each cycle: plan→risk analysis→prototype→evaluate. Agile — iterative and incremental; working software over documentation, customer collaboration, responding to change. Prototype — builds an early working model to clarify requirements. Big Bang — no structured process (for very small/experimental projects).Elicitation (gather requirements from stakeholders via interviews, observation, surveys — first step) → Analysis (refine, resolve conflicts, detect ambiguities) → Specification (document in SRS) → Validation (check requirements are correct, complete, and testable) → Management (track changes throughout the lifecycle).Functional (module performs exactly one well-defined task — best) → Sequential → Communicational → Procedural → Temporal → Logical → Coincidental (unrelated tasks grouped randomly — worst).Data coupling (modules share only simple data parameters — best) → Stamp coupling → Control coupling → External coupling → Common coupling → Content coupling (module directly modifies another's internals — worst).Abstraction — hide complexity by exposing only essential details. Modularity — divide software into smaller, manageable, independent units. Refinement (Stepwise) — progressively elaborate from abstract to detailed design. Information Hiding — encapsulate module internals so changes don't propagate to other modules (Parnas principle).Client-Server — clients request services from a central server. Layered — software organised in layers (e.g., Presentation→Business Logic→Data). Distributed Object (e.g., CORBA) — objects distributed across network. Repository / Data-Centred — all components interact through a shared data store.Creational (Singleton, Factory, Builder), Structural (Adapter, Decorator, Facade), Behavioural (Observer, Strategy, Command). Originally codified by the 'Gang of Four' (GoF).Encapsulation — bundle data and methods, hide internals. Inheritance — reuse parent class behaviour. Polymorphism — same interface, different implementations. Abstraction — model only relevant aspects.Unit Testing — tests individual modules/functions in isolation (done by developers). Integration Testing — tests interactions between combined modules (interfaces, data flow). System Testing — tests the complete system against requirements. Acceptance Testing — validates with end users whether the system meets their needs (UAT).Verification — 'Are we building the product RIGHT?'. Reviews, inspections, walkthroughs — checks against specifications. Validation — 'Are we building the RIGHT product?'. Testing with real users — checks against actual needs.Level 1 Initial (chaotic, ad hoc), Level 2 Managed (projects planned and tracked), Level 3 Defined (standard processes org-wide), Level 4 Quantitatively Managed (metrics-driven), Level 5 Optimizing (continuous improvement).Change control (formal process for approving changes), Version control (tracking code revisions — Git), Release management (packaging and deploying software versions). Prevents uncoordinated changes from causing defects.Encapsulation (data + methods bundled, internals hidden), Inheritance (IS-A relationship, child reuses parent), Polymorphism (same interface, different forms), Abstraction (expose essentials, hide complexity).Structural diagrams — model the static structure: Class diagram (classes, attributes, methods, relationships), Object diagram (instances at a point in time), Component diagram (physical components), Deployment diagram (hardware/software nodes). Behavioural diagrams — model dynamic behaviour: Use Case diagram, Sequence diagram, Collaboration/Communication diagram, Activity diagram (workflow/flowchart), State diagram (state transitions).Actor (external entity interacting with the system — person, device, or another system), Use Case (a specific function/service the system provides), System boundary (defines scope), Relationships (include, extend, generalize).Generalization (IS-A) — inheritance relationship (Dog IS-A Animal). Association — general 'uses' relationship between classes. Aggregation (HAS-A, weak) — whole–part where part can exist independently (University HAS-A Department). Composition (HAS-A, strong) — whole–part where part cannot exist without the whole (House HAS-A Room). Dependency — one class uses another temporarily.Analysis focuses on WHAT the problem is — understanding and modelling the real world. Design focuses on HOW to solve it — defining classes, their responsibilities, and interactions in software terms. Design elaborates the analysis model into an implementable blueprint.Sequence diagram — emphasises time ordering of messages (vertical time axis, objects on horizontal). Collaboration / Communication diagram — emphasises the structural organisation of objects and their links (numbered messages showing sequence). Both show the same information — you can convert one to the other.Singleton — ensures only one instance of a class exists (global access point). Factory Method — defines interface for creating objects, but lets subclasses decide which class to instantiate. Observer — one object (subject) notifies multiple dependents (observers) when its state changes. Strategy — defines a family of algorithms; client selects which to use at runtime.+ = public (accessible by all). - = private (accessible only within the class). # = protected (accessible within the class and its subclasses). ~ = package (accessible within the same package).Creator (who creates an object?), Information Expert (assign responsibility to the class with the most relevant information), Controller (handles system events), Low Coupling, High Cohesion, Polymorphism, Indirection, Pure Fabrication, Protected Variations.Attributes → fields / instance variables in the class. Operations / Methods → method definitions with appropriate signatures. Constructor → initialises the object's state when instantiated. Associations → reference attributes (one class holds a reference to another). Visibility modifiers (+/-/#) → public/private/protected access modifiers in code.1 = single reference. * = collection.try (code that might throw), catch (handles specific exception types), throw (signals/raises an exception), finally (always executes — cleanup). Good OO design separates normal flow from error handling.Forward Engineering — the traditional direction: go from design (model) → source code. Reverse Engineering — go from existing source code → model (recover design from code, useful for legacy systems). Round-Trip Engineering — keeps model and code in sync automatically; changes in either direction are propagated to the other.