Start studying →
Exam Cram · Tomorrow

Master Software Engineering in one focused session.

A clean, structured walk-through of every topic in your slides — processes, Agile, Scrum, UML, requirements, architecture, evolution, and testing. With mnemonics that actually stick and short scenarios that test the idea.

12
Units
45+
Key concepts
30+
Mnemonics
15+
Scenarios
1
Unit 1 · Foundations

Intro to Software Engineering

Programming writes code. Software engineering builds reliable systems — systematically, disciplined, quantifiably.

Definition

Software Engineering is the systematic, disciplined, and quantifiable approach to the development, operation, and maintenance of software.

The four SE process activities

1Specification
Define what the software must do — with customers.
2Development
Design and program the system.
3Validation
Verify it meets customer needs.
4Evolution
Modify to reflect change.
Memory hack — “SDVE”

Read it as “Some Developers Validate Everything.” Spec must come before dev, and evolution never ends.

Typical SDLC activities

Planning Requirements Design Implementation Testing Deployment Maintenance
Memory hack — 7 SDLC phases

“People Really Do Insist Testing Delivers Maintenance.”
Planning · Requirements · Design · Implementation · Testing · Deployment · Maintenance

SDLC vs Process model

SDLCProcess Model
Universal high-level phases any software project goes through. A specific recipe for moving through those phases (Waterfall, Agile, Spiral…).

SDLC = what stages. Process model = how you execute them (sequential vs iterative).

Why SE matters

  • Rising software complexity, large teams, long lifecycles
  • Cost of failure is enormous — Ariane 5 exploded in 40 seconds from a 64→16-bit bug
  • Late delivery, blown budgets, poor quality

ACM/IEEE Code of Ethics — 8 principles

1Public
Act in public interest.
2Client & Employer
Best interest of client/employer.
3Product
Highest professional standards.
4Judgment
Integrity and independence.
5Management
Ethical management practice.
6Profession
Advance the profession.
7Colleagues
Fair and supportive.
8Self
Lifelong learning.
Memory hack — 8 ethics principles

Order = outward → inward: Public → Company → Product → my own Judgment → Management → Profession → Colleagues → Self. The further you go, the more personal it gets.

Try this scenario

Your employer is about to ship a safety-critical medical device without finishing test cases. Which ethical principle applies?
Answer: PUBLIC (#1) overrides CLIENT (#2). Public welfare always comes first — refuse to sign off, escalate.

2
Unit 2 · Process Models

Software Processes — Waterfall to Spiral

Two families: Sequential (locked-in, document-heavy) vs Iterative/Incremental (cyclical, feedback-driven).

The big picture

FamilyModelsBest for
SequentialWaterfall, V-Model, Big BangFixed requirements, regulated/critical systems
IterativeIterative Waterfall, Spiral, Prototype, RAD, RUPRisky, evolving, large projects
IncrementalAgile (XP, Scrum, Kanban, Lean)Changing requirements, fast delivery

Waterfall

Linear, sequential — each phase finishes before the next. Requirements → Design → Implementation → Testing → Deployment → Maintenance.

+ Advantages
  • Simple, easy to manage
  • Clear documentation
  • Predictable cost & timeline
  • Disciplined structure
− Disadvantages
  • No flexibility for change
  • Late testing → expensive bugs
  • No working software until late
  • High risk for complex projects
When to use Waterfall

“Fixed · Small · Regulated” — fixed requirements, small scope, regulation (defense, aviation, medical).

V-Model — Verification & Validation

Waterfall extension — each dev phase has a matching test phase, forming a V. Test plans are written upfront, not at the end.

Dev sideTest side
Requirements↔ Acceptance Testing
System Design↔ System Testing
Architecture Design↔ Integration Testing
Module Design↔ Unit Testing
↳ Coding (bottom of the V) ↲
Memory hack — V-Model

Every level of design has a mirror level of testing. The V is the handshake between requirements and acceptance.

Iterative Waterfall

Adds feedback loops between phases — you can revisit earlier stages. Better for large/complex projects where requirements need refinement.

Spiral Model — risk-driven

Combines Waterfall + Iterative. Each loop has 4 quadrants:

1Planning
Define objectives, gather requirements.
2Risk Analysis
Identify risks, build prototypes.
3Engineering
Design, code, test the build.
4Evaluation
Customer review, plan next spiral.
Memory hack — Spiral quadrants

“PREE — Plan, Risk, Engineer, Evaluate.” Always check Risks before you Engineer. That's why Spiral is the go-to for high-risk projects.

Try this scenario

You're building an e-commerce platform with payment processing. Requirements are unclear; security is a major risk. Which model?
Answer: Spiral — explicit risk analysis quadrant + iterative refinement. Waterfall would lock in flawed assumptions; pure Agile may not surface security risks early enough.

Big Bang

Minimal planning, mostly coding. Suitable only for tiny or academic projects.

Quick chooser

SituationPick
Fixed reqs, regulated industryWaterfall / V-Model
High risk, evolving reqs, big budgetSpiral
Small/medium, fast-changing reqsAgile (Scrum/XP)
Tiny prototype, learningBig Bang
Large with some refinement neededIterative Waterfall
3
Unit 3 · Agile Methods

Agile & Extreme Programming

Agile = umbrella term. Born from the 2001 Agile Manifesto as a reaction to heavyweight processes like Waterfall.

The Agile Manifesto — 4 values

“While there is value in items on the right, we value the items on the left more.”

We valueOver
Individuals & interactionsprocesses & tools
Working softwarecomprehensive documentation
Customer collaborationcontract negotiation
Responding to changefollowing a plan
Memory hack — 4 manifesto values

“People · Product · Partner · Pivot.” Individuals (people), working software (product), customer collab (partner), responding to change (pivot).

Agile characteristics

  • SDLC activities are interleaved, not sequential
  • Requirements = outline only (no formal SRS — though minimal docs do exist)
  • Increment duration: 2–3 weeks
  • Adaptive — customer feedback shapes the next increment
  • Informal customer communication
  • Heavy tool support (automated testing, configurable software)
Common misconception

Agile does not mean “no documentation” or “no design.” It means minimal, just-enough documentation and design. Don't fall for this on the exam.

Extreme Programming (XP)

Defined by Kent Beck (1996). Concept: take good practices and push them to the extreme.

XP principles

Rapid Feedback
React immediately.
Assumed Simplicity
YAGNI + DRY.
Incremental Changes
Small > big bang.
Embracing Change
Support new requirements.
Quality Work
Take pride.

The 4 XP practice clusters

1Incremental development
Small, frequent releases.
2Customer involvement
On-site customer writes acceptance tests.
3Embracing change
Refactoring + test-first development.
4Maintaining simplicity
Through refactoring & pair programming.

Core XP components

  1. User stories — informal feature descriptions from the user's view
  2. Refactoring — continuous code improvement
  3. Test-First Development (TDD) — write tests before code
  4. Pair Programming — driver + navigator
Memory hack — 4 XP components

“URTP” = User stories, Refactoring, TDD, Pair programming. “U(R) Testing and Pairing.”

YAGNI & DRY

YAGNI — You Ain't Gonna Need It
Don't add generality for changes that may never come.
DRY — Don't Repeat Yourself
Refactor duplication immediately.

Test-Driven Development (TDD)

Write a failing test Write code to pass Refactor Repeat

TDD advantages

  • Tests define the interface & behavior spec (reduces ambiguity)
  • Forces clarification of omissions before implementation
  • Avoids “test-lag” — devs can't outpace testers

TDD challenges

  • Devs prefer coding to testing — may write incomplete tests
  • Hard to test UI display logic / screen workflows incrementally
  • Hard to judge test completeness

Pair Programming

Driver writes code · Navigator reviews in real time. Promotes collective code ownership, continuous code inspection, and refactoring.

Try this scenario

A client keeps adding features mid-development. The team is small (6 devs) and the product is non-regulated. Best fit?
Answer: Agile (Scrum or XP) — embraces change, small co-located team, no heavy regulation. Pick XP if code quality matters most; Scrum if you need project management structure.

4
Unit 4 · Scrum

Scrum — Agile Project Management

Scrum manages the process. XP manages the code. They're complementary, not competitors.

The 3-5-3 structure

3 Roles · 5 Events · 3 Artifacts. This is the single most exam-worthy thing in Scrum.

3 Roles

Product Owner
Voice of the customer. Owns and prioritizes the Product Backlog. Maximizes value.
Scrum Master
Servant leader. Removes impediments, enforces Scrum, shields the team.
Developers
Cross-functional team (≤10 typically). Build the increment.

5 Events

1The Sprint
Fixed-length timebox, 1–4 weeks. Produces a working increment.
2Sprint Planning
Decide the What and the How for the sprint.
3Daily Scrum
15-minute daily sync — progress, plan, blockers.
4Sprint Review
Show increment to stakeholders, adapt backlog.
5Sprint Retrospective
Team-only meeting — reflect and improve process.

3 Artifacts

Product Backlog
Ordered, evolving list of everything needed.
Sprint Backlog
Items selected for current sprint + delivery plan.
Increment
Sum of all completed items meeting Definition of Done.
Memory hack — 3-5-3

Roles: Product Owner, Scrum Master, Developers.
Events: Sprint wraps the other 4 → Planning → Daily → Review → Retro. Think of a day at school: bell rings (Planning), morning check-in (Daily), parent show-and-tell (Review), team huddle after class (Retro).
Artifacts: P → S → I Product Backlog narrows to Sprint Backlog narrows to Increment.

The 3 Scrum phases

  1. Outline Planning — general objectives, software architecture
  2. Sprint Cycles — each delivers an increment
  3. Project Closure — wrap up, docs, lessons learned

Sprint cycle workflow

Product Backlog Select features Sprint (team isolated) Review w/ stakeholders Next sprint

During the sprint, the Scrum Master shields the team — all external comms route through them.

Scrum benefits

  • Big product broken into manageable chunks
  • Unstable requirements don't stall progress
  • Whole-team visibility → better communication
  • Customers see on-time delivery, gain real feedback
  • Trust and a “we'll succeed” culture

Scaling Agile

Scaling UPScaling OUT
Using agile for large systems a small team can't build alone.Spreading agile across a large organization with legacy practices.

When scaling, keep the fundamentals: flexible planning, frequent releases, continuous integration, TDD, communication.

Scrum vs XP vs Waterfall

WaterfallScrumXP
FocusPhases & docsProcess & teamworkCode quality
Change handlingResists changeEmbraces changeEmbraces change
IterationNone2–4 wk sprints1–3 wk releases
Customer roleUp front onlyReviews each sprintOn-site, writes tests
Engineering practicesHeavyweightNot specifiedTDD, pairing, refactoring
Try this scenario

Your team finishes a sprint. The stakeholder demos a feature and says, “Love it — can we add a vegan filter?” You're the PO. What now?
Answer: Add it to the Product Backlog (not the current Sprint Backlog). Sprint scope is fixed during a sprint; only Product Backlog evolves continuously.

5
Unit 5 · User Stories

User Stories

Informal, end-user perspective descriptions of features. They articulate value delivered.

The standard format

Template

As a [role/persona],
I want [action/goal],
So that [benefit/value].

Example: “As a returning shopper, I want to save my payment details, so that I can check out faster next time.”

INVEST criteria

I — Independent
Can be developed on its own.
N — Negotiable
Not a rigid contract — open to discussion.
V — Valuable
Delivers clear user benefit.
E — Estimable
Small enough to estimate effort.
S — Small
Fits in one sprint.
T — Testable
Has clear acceptance criteria.
Memory hack — INVEST

“Stories you can INVEST in.” Each letter is a quality test — fail any one and the story isn't ready.

Story elaboration process

  1. Start with Epics — large, high-level features
  2. Break down into smaller stories
  3. Refine as a team — remove ambiguity, add subtasks
  4. Add Acceptance Criteria — 3–5 specific outcomes (happy + error path)

Epic vs User Story

EpicUser Story
Big-picture goalSpecific, actionable step
Spans many sprintsFits in one sprint
VagueConcrete with acceptance criteria

Acceptance criteria

  • Happy path — successful flow (e.g. invite sent)
  • Error path — invalid input handled (e.g. malformed email rejected)
  • Boundary — limits enforced (e.g. ≤ 5 MB upload)
Try this scenario — write a story

Sarah is a teacher with 40 students. She doesn't want to add them manually; she wants to invite them all at once.

Story: As a teacher, I want to bulk-invite my students by uploading a list of emails, so that I can save setup time before class.
AC (happy): CSV with up to 50 emails → invites sent within 30s.
AC (error): Invalid row → shown to teacher, valid rows still sent.
AC (boundary): File > 5 MB rejected with a clear message.

The main problem with user stories

Completeness. Experienced users skip “obvious” details when describing their work. Mitigate with ethnography, prototypes, and structured questions.

6
Unit 6 · Requirements Engineering

Requirements Engineering

Requirements describe the services a system provides and the constraints on its operation.

Two big splits

User Requirements
Natural language, problem-domain, customer-facing.
“System must let a customer transfer money between accounts.”
System Requirements
Technical, detailed, solution-domain.
“On Transfer, validate balance via Banking Protocol API, update SQL DB within 2s.”

Functional vs Non-Functional

FunctionalNon-Functional
What it definesWhat the system doesHow well it does it
ExamplesLogin, search, generate reportSpeed, security, availability, reliability
If it failsFeature brokenSystem unstable or unusable
ScopeTied to specific componentsSystem-wide

Functional requirement quality

Completeness
All services & information defined.
Consistency
No contradictions.
Precision
Unambiguous between customer & dev.
Memory hack — FR quality

“CCP” = Complete, Consistent, Precise. “Functional reqs need CCP clearance.”

NFR categories

Product
Constrains runtime behavior — speed, reliability, memory.
Organizational
From customer/dev org policies — OS, dev tools, standards.
External
From outside the system — legal, ethical, interoperability.
Memory hack — NFR types

“POE” = Product · Organizational · External. “Edgar Allan POE writes non-functional reqs.”

NFRs as vague goals — and how to fix them

Stakeholders often say: “System should be easy to use.” SE must convert this to quantifiable:

Quantified

“Medical staff shall be able to use all functions after 2 hours of training. Average errors made by experienced users shall not exceed 2 per hour of use.”

Requirements engineering process

1Elicitation & Analysis
Discover from stakeholders.
2Specification
Convert to standard form.
3Validation
Check it defines what customer wants.
4Management
Handle changes & their impact.
Memory hack — RE process

“ESVM” = Elicit → Specify → Validate → Manage. “Every Sensible Validation Matters.”

Elicitation techniques

Interviews
Closed: predefined questions.
Open: no agenda, exploratory.
Mix works best.
Ethnography
Observe day-to-day work — reveals real (vs documented) processes.
Stories & Scenarios
Narrative (story) → detailed structured flow (scenario).

Interview do's

  • Open-minded — avoid preconceived ideas
  • Use springboard questions (“tell me what you want” fails)
  • Ask for proposal documents upfront

Ethnography advantages

  • Captures actual work practice (air traffic controllers turning off over-sensitive alerts)
  • Reveals cooperation patterns — awareness of adjacent sectors

Ethnography disadvantages

  • Doesn't support innovation (just describes current practice)
  • Doesn't give broader organizational/domain requirements

Stories vs Scenarios

StoryScenario
Narrative text, big pictureStructured, detailed
High-level system useInputs, outputs, normal & error flow, end state

A scenario describes: initial assumption · normal flow · what can go wrong · concurrent activities · system state on completion.

Try this scenario — vague to quantifiable

Stakeholder says “The system must be fast.” Rewrite as a proper NFR.
Answer: “95% of search queries shall return results within 1.5 seconds under a load of 500 concurrent users.” — measurable, testable, bounded.

7
Unit 7 · Prioritization

MoSCoW Technique

A simple, powerful prioritization framework — four categories, clear trade-offs, used heavily in agile timeboxed projects.

Why prioritize?

  • Limited resources (time, money, people)
  • Agile uses fixed-schedule timeboxes — must decide what fits
  • Dynamic, ongoing — priorities shift as the project evolves

The 4 categories

M — Must Have
Critical, non-negotiable. Without these, project fails. Core functionality, security.
S — Should Have
Important, adds significant value. Deferrable if time is tight.
C — Could Have
“Nice-to-have.” Low impact if omitted. First to drop under deadline pressure.
W — Won't Have
Explicitly excluded from current scope. Prevents scope creep.
Memory hack — MoSCoW

The lowercase o's are filler (from Moscow the city). Real letters: M · S · C · W.
Must ship · Should ship · Could ship · Won't ship.”
Test: “Will the project fail without it?” If yes → M. Can wait one release → S. Would miss but survive → C. It's out → W.

Steps to apply MoSCoW

  1. Gather requirements (no initial filtering)
  2. Engage cross-functional stakeholders
  3. Define rules & dispute resolution (voting?)
  4. Allocate resources — Must Haves ≤ 60% of total effort (predictability)
  5. Categorize via litmus tests
  6. Review & adjust continuously

Other named techniques

In/Out
Binary cut.
Pairwise
Rank-order via 1-on-1 matchups.
Three-level
High/Med/Low.
MoSCoW
4 buckets.
$100 method
Stakeholders distribute $100.
QFD spreadsheet
Value × cost × risk model.
Try this scenario

For an MVP of a banking app: login, transfer, dark mode, voice-pay, transaction history. Apply MoSCoW.
Answer: M: login, transfer · S: transaction history · C: dark mode · W: voice-pay. Bank can't launch without login/transfer; history adds trust but can wait; dark mode is cosmetic; voice-pay is a future product line.

8
Unit 8 · System Modeling

UML Diagrams

UML = standard visual modeling language. Models are abstractions — simplifications that show only what matters.

3 UML diagram families

FamilyShowsDiagrams
StructuralStatic structure (irrespective of time)Class · Object · Component · Deployment · Package · Composite
BehavioralDynamic behavior over timeActivity · State Machine · Use Case · Interaction
InteractionObject communication (sub-family of Behavioral)Sequence · Communication · Interaction Overview · Timing
Memory hack — families

Structural = Snapshot (frozen in time).
Behavioral = Behavior over time.
Interaction = who talks to whom, and In what order.

Class Diagram (Structural)

The most-used UML diagram. Shows classes, attributes, methods, and relationships. The “blueprint” of OO systems.

  • Box with three compartments: name, attributes, methods
  • Relationships: association, aggregation (◇), composition (♦), inheritance (▷), dependency (- - ->)
  • Multiplicity: 1, *, 0..1, 1..*

State Machine Diagram (Behavioral)

Models the states of an entity and transitions triggered by events. Shows movement through finite states.

Purpose

  • How to enter a state
  • How to leave a state
  • What actions happen while in a state

Build two lists first: State list (e.g. Available, Cancelled, Full) and Stimulus list (e.g. enroll, drop, capReached).

Memory hack — when to use State

If the entity has history (a course is open, then full, then closed) → state diagram. If it's about flow of actions → activity diagram.

Activity Diagram (Behavioral)

The OO equivalent of a flowchart / DFD. Models workflow — control flow, decisions, parallelism.

Elements

Activity
Rounded rectangle, verb phrase (“process order”).
Event/Transition
Directed arrow between activities.
Decision (◇)
Diamond, multiple guarded exits.
Fork/Join
Bar — parallel activities split & merge.
Branch/Merge
Conditional behavior start/end.
Start/End
Filled circle · bullseye.

Limitation: doesn't show which object performs each activity (unless labeled with swimlanes).

Use Case Diagram (Behavioral)

External view — what the system does for actors. Use case = sequence of actions delivering measurable value to an actor.

  • Actor — stick figure (person, org, external system)
  • Use case — horizontal ellipse
  • Association — solid line between actor & use case
  • «include» — required sub-use-case · «extend» — optional extension

Sequence Diagram (Interaction)

Shows objects interacting over time. X-axis = objects, Y-axis = time (top to bottom).

Key elements

  • Object box[instance]:[Class]
  • Lifeline — vertical dashed line below object
  • Activation box — thin rectangle on lifeline = object busy processing
  • Message — solid arrow between lifelines (synchronous = filled, asynchronous = stick arrow)
  • Return — dashed arrow (optional; skip if obvious)
  • «create», «destroy» — special messages

Control info

  • [condition] — message only sent if true
  • *[expression] — iteration/loop
  • Self-call — arrow looping back to same lifeline
Watch out

Don't use sequence diagrams for detailed algorithm modeling — use activity diagrams, pseudo-code, or state-charts instead. Sequence diagrams only handle simple alternatives.

Picking the right diagram

I want to show…Use
Static structure / classesClass Diagram
Workflow / business processActivity Diagram
Entity life historyState Machine Diagram
External behavior / actor viewUse Case Diagram
Object interactions over timeSequence Diagram
Physical deployment of componentsDeployment Diagram
Try this scenario — Smart Café-Bot

A user approaches a touch-screen coffee machine. Pick diagrams.
Activity Diagram: user selects drink → pays → machine grinds → brews → notifies. (workflow)
State Machine Diagram: states = Waiting · Brewing · Out-of-water. (entity history)
Use both — they capture different perspectives.

Try this scenario — Movie Ticket Booking

Customer selects showtime → System checks availability → Customer pays → System processes payment → System generates e-ticket. → Activity Diagram with two swimlanes: Customer | System.

9
Unit 9 · Architectural Design

Software Architecture Patterns

Architectural patterns let you design flexible systems from components that are as independent as possible.

Architectural design drivers

If priority is…Architecture should…
PerformanceLocalize critical ops in few components, deploy on one machine
SecurityUse layered structure; critical assets in innermost layer
SafetyIsolate safety-related ops in one (or few) components
AvailabilityInclude redundant components for hot-swap
Memory hack — drivers

“PSSA” → Performance · Security · Safety · Availability. “Patterns Serve Specific Aims.”
Trick: Performance localizes, Security layers, Safety isolates, Availability replicates.

Pattern 1 — MVC

  • Model — data + business logic
  • View — presentation
  • Controller — input handling, mediates model ↔ view

Separation of concerns. Same Model can drive multiple Views.

Pattern 2 — Layered

  • Each layer talks only to the layer immediately below
  • Each layer has a well-defined interface used by the layer above
  • Higher layer sees lower layer as services

Typical layers: UI → Application functions (use cases) → Domain → Infrastructure (DB, network).

Memory hack — Layered

“Each floor only talks to the floor right below.” That's why it's secure — the deeper you go, the more protected the data.

Pattern 3 — Repository

Sub-systems share data via a central database/repository. Efficient for large data volumes.

Alternative: each sub-system owns its DB and passes data explicitly.

Pattern 4 — Client-Server

Distributed system. Computations on separate programs/hardware that cooperate.

  • Server — provides services, listens, accepts connections, responds to messages
  • Client — accesses one or more servers to obtain services
  • One server, many clients simultaneously

Examples

World Wide Web · Email · Network File System · Transaction Processing · Remote Display · Database System

Pattern 5 — Pipe-and-Filter

  • Stream of data flows through a series of processes
  • Each process transforms the data
  • Components run concurrently
  • Very flexible — components can be removed, replaced, reordered

Classic example: Unix shell pipelines (cat | grep | sort), compilers.

Pattern 6 — Transaction-Processing

  • Process reads a series of inputs one by one
  • Each input describes a transaction (a command to change state)
  • Transaction dispatcher routes each one to a handler component

Examples

Payroll · Ticket Reservation · Purchase Order Entry · Airline Reservation

Memory hack — 6 patterns

“My Lazy Cat Plays Right Tunes”MVC · Layered · Client-server · Pipe-filter · Repository · Transaction.

Try this scenario — pick the pattern

A bank needs a system where every customer action (deposit, withdrawal, transfer) hits a central record. Many user-facing apps share the same data. Which pattern?
Answer: Repository (for shared central data) + Transaction-Processing (for the dispatcher routing each operation). Often combined in real-world bank cores.

Try this scenario — video game layers

How would you divide a video-game system into layers?
UI Layer: input handling, score display.
Game Logic Layer: object positions, collision, rules, scoring.
Graphics/Rendering Layer: draw objects on screen.
Platform Layer: OS, GPU drivers, networking.
Each layer talks only to the one below — UI never touches the GPU directly.

10
Unit 10 · Software Evolution

Software Evolution & Maintenance

Software doesn't stop on delivery. It must change to stay useful — and that change is expensive.

What triggers evolution?

  • Software defects reported
  • Changing business requirements
  • Changes in other systems in the environment

Why software evolves forever

  • Large systems have 10–30+ year lifetimes (ATC: 30+, business: 10+)
  • Companies need ROI on their software investment
  • Business environment shifts; the system must too

3 types of maintenance

Corrective (Fault Repair)
Coding errors → cheap. Design errors → moderate. Requirements errors → most expensive.
Adaptive (Environmental)
Hardware, OS, support software changed → adapt the system.
Perfective (Functionality / Quality)
New requirements + improving structure/performance.
Memory hack — 3 maintenance types

“CAP” = Corrective · Adaptive · Perfective.
“Maintenance wears a CAP — fix bugs, adapt to environment, perfect features.”

3 reasons for urgent change

Failure
Serious fault — must fix to keep running.
Ripples
Environment change broke us unexpectedly.
Business
New competitor / legislation / market move.

Why post-delivery changes cost more

ReasonWhy it bites
Team stabilityOriginal team is gone; new team has to learn the system
Poor dev practiceMaintenance contract often separate — no incentive to write maintainable code
Staff skillsMaintenance seen as low-prestige → assigned to juniors; languages may be obsolete
Program age / structureCode degrades with each change; docs lost; old systems weren't configuration-managed

Software re-engineering

When a system is still useful but increasingly hard to maintain. Functionality is preserved; the system is restructured.

Activities

  • Re-documenting
  • Refactoring architecture
  • Translating programs to a modern language
  • Modifying/updating data structure & values

Benefits over replacement

Reduced risk
No big-bang rewrite; existing logic is preserved.
Reduced cost
Usually cheaper than rebuilding from scratch.

Refactoring vs Re-engineering

RefactoringRe-engineering
Continuous, during developmentOne-off, after system has degraded
Prevents degradationReverses degradation
Manual, small stepsOften uses automated tools
Agile / XP practiceLegacy system response

Legacy system — 4 strategic options

1Scrap completely
When the system no longer contributes to business processes.
2Leave unchanged
Continue regular maintenance — when stable with few change requests.
3Re-engineer
When quality has degraded and more changes are still being proposed.
4Replace (all/part)
When hardware forces it, or off-the-shelf systems are viable.
Memory hack — legacy options

“SMRR” = Scrap · Maintain · Re-engineer · Replace.
Ordered by increasing investment (scrap = cheapest, replace = priciest).

Agile ↔ Plan-driven handover pain

DirectionProblem
Agile → Plan-driven teamEvolution team expects heavy docs that agile didn't produce
Plan-driven → Agile teamNo automated tests, no refactored code — needs re-engineering first
Try this scenario

A 20-year-old payroll system is in COBOL. It still works but only one developer understands it. The business is launching new payroll regulations next year. What strategy?
Answer: Re-engineer — preserve business logic (high risk to lose it), but modernize structure/language so multiple developers can maintain it. Pure replacement is risky (specification has been lost); leaving unchanged is unsustainable (bus-factor of 1).

11
Unit 11 · Software Testing

Software Testing

“Testing can show the presence of bugs, but never their absence.” — Dijkstra, 1972

Definition

Testing = the process of executing a software system to determine whether it matches its specification and runs in its intended environment.

Error vs Fault vs Failure

TermMeaning
ErrorA human mistake during development
Fault (bug)The error manifested in code
FailureThe fault observed at runtime — wrong output/behavior
Memory hack — E-F-F

“A dev makes an Error → it becomes a Fault in code → the user sees a Failure.” Cause → artifact → effect.

Verification vs Validation

VerificationValidation
“Are we building the product right?”“Are we building the right product?”
Static, against specDynamic, against user needs
Memory hack — V&V

Verification = matches the spec (Verb-against-spec). Validation = satisfies the user (Vali-user).

7 fundamental testing principles

  1. Testing shows presence of defects, not absence
  2. Exhaustive testing is impossible
  3. Early testing saves money
  4. Defect clustering — 80% of bugs in 20% of modules
  5. Pesticide paradox — same tests stop finding bugs; update them
  6. Testing is context-dependent (medical ≠ e-commerce)
  7. Absence-of-errors fallacy — bug-free but useless = still useless
Memory hack — 7 principles

“Please Eat Every Donut Past Closing Always”Presence · Exhaustive impossible · Early · Defect clustering · Pesticide · Context · Absence fallacy.

Testing levels (V-Model)

1Unit
Individual components/functions. By devs.
2Integration
Interfaces between combined units.
3System
Full integrated system vs requirements.
4Acceptance (UAT)
End-user / client validates.
Memory hack — test levels

“UISA” → Unit → Integration → System → Acceptance. “Units Integrate into a System, which the user Accepts.”

Box approach

Black-Box
Based on spec only — inputs/outputs. Can't measure code coverage. Finds omissions.
White-Box
Based on internal logic & paths. Hard to find missing features. Finds commissions.
Gray-Box
Hybrid — limited knowledge of internals.

Black-box test design

Equivalence Partitioning
Divide inputs into valid/invalid classes; pick one from each.
Boundary Value Analysis
Test at edges — min, min+1, max-1, max, and just outside.
Decision Table
Map complex business rules → test cases.

Static vs Dynamic

StaticDynamic
No code execution — reviews, inspections, walkthroughsCode executes — functional & non-functional tests

Walkthroughs are shorter and informal; inspections are formal and structured. Both record faults (don't fix them).

Non-functional testing

  • Performance — Load, Stress, Scalability
  • Usability, Security, Reliability

Test-Driven Development (recap from XP)

  1. Identify a small increment of functionality
  2. Write an automated test (it will fail)
  3. Run all tests
  4. Write code to pass the test, re-run
  5. Refactor & move on

Even with TDD you still need system testing for performance, reliability, and unwanted-output checks.

Release vs System testing

Release TestingSystem Testing
Validation — does it meet customer requirements?Defect testing — find bugs
Done by separate team (not devs)Done by dev team
Black-box / functionality testingBoth black and white box

Scenario & requirement-based testing

Requirement-based: one requirement → set of test cases. Mentcare: if patient is allergic, prescription must warn. Tests: no allergy → no warning; one allergy → warning; ignored warning → user must give reason.

Scenario testing: test sequences of requirements via a credible user story (nurse on home visits encrypts/decrypts records, etc.).

Performance testing

Operational Profile
If 90% of real transactions are type A, design tests with ~90% type A. Then ramp incrementally.
Stress Testing
Push beyond design limits. Reveals fail-soft vs collapse behavior. Critical for distributed systems.

User testing — 3 flavors

Alpha
Internal employees + select users, at dev site. Early defect detection. Used in agile / product dev.
Beta
Early release to a larger group of customers. Finds env-interaction issues. Also a marketing tool.
Acceptance
Customer decides if ready to deploy. Triggers final payment. Custom-systems standard.
Memory hack — A/B/A testing

Alpha = at home (devs' place). Beta = broader (real customers). Acceptance = approve and pay. Greek alphabet order matches release-readiness order.

Why bugs escape

  • User ran untested code paths
  • Statements executed in different order than tested
  • Untested input combinations
  • User's environment wasn't tested

Why exhaustive is impossible: too many paths (5 paths × 20 loops = ~100 trillion), too many inputs, too many environments.

Test automation

Manual test: $X every time. Automated test: 3–30× $X upfront, ~$0 every run after. Worth it for any test that will run repeatedly.

Try this scenario — beta testers' bias

You ship a beta. Bug reports are sparse. Should you assume the product is solid?
Answer: No. Beta testers are usually techies — they tolerate bugs, skip usability issues, ignore the “obvious” ones. Solid release reports require varied user profiles and proactive user research.

Try this scenario — test design

A function accepts ages 0–120. Design test inputs.
Answer: Equivalence partitioning: -1, 50, 121. Boundary value analysis: 0, 1, 119, 120, 121, -1. Combine both for thorough coverage of black-box input space.

12
Unit 12 · Communication

Writing a Software Project Proposal

A proposal is a contract of understanding. “A well-written proposal is already half the project done.”

What a proposal does

  • Defines a problem
  • Proposes a software-based solution
  • Justifies why and how it should be built

Goal: convince readers that the problem is worth solving, the solution is feasible, and your team can deliver.

Characteristics of a good proposal

Clear
No ambiguity.
Focused
Specific, well-defined problem.
Feasible
Realistic given time/skills/resources.
Justified
Backed by literature/data.
Professional
Well-structured & well-written.
Genuine
Your own work (no AI plagiarism).

Standard structure

  1. Title & Overview — clear title; 3–5 line summary
  2. Problem Statement — who · what · why · what if not solved
  3. Background & Literature Review — existing solutions and gaps
  4. Proposed Solution — features, modules, architecture, key tech
  5. Scope — what's in AND what's not
  6. Tools & Technologies — choices justified for the problem
  7. Expected Outcomes & Deliverables — app, reports, docs, demo
  8. Timeline / Gantt Chart — big-picture for non-technical readers
  9. Conclusion — synthesis & commitment
Memory hack — proposal sections

The Old Professor Brings Solutions, Scope, Tools, Outcomes, Time & Conclusion” → Title · Overview · Problem · Background · Solution · Scope · Tools · Outcomes · Time · Conclusion.

Poor vs good problem statement

PoorGood
“Manual systems are inefficient.”“Small clinics rely on manual appointment booking, leading to long waiting times, scheduling conflicts, and poor patient experience.”

Common mistakes

  • Vague problem statements
  • Over-ambitious scope
  • Copy-paste / plagiarism
  • No justification for tool choices
  • Poor formatting & grammar
  • Treating the proposal as a formality
AI misuse — real incidents

Samsung (2023) — leaked source code via ChatGPT. Law firm (2024) — $5,000 fine for AI-generated fake legal cases. Air Canada (2024) — held liable for chatbot misinformation. AI-generated proposals can be plagiarism + unmaintainable.

Final sweep

Last-Minute Cheat Sheet

If you only have 10 minutes before the exam, read this.

The mnemonic bundle

TopicMnemonicMeans
SE process activitiesSDVESpec · Develop · Validate · Evolve
SDLC phases (7)P-R-D-I-T-D-MPlan · Req · Design · Implement · Test · Deploy · Maintain
Ethics (8)Outward → InwardPublic → Client → Product → Judgment → Mgmt → Profession → Colleagues → Self
Spiral quadrantsPREEPlan · Risk · Engineer · Evaluate
Agile valuesPeople · Product · Partner · PivotIndividuals · Software · Collab · Change
XP componentsURTPUser stories · Refactoring · TDD · Pair
Scrum structure3-5-33 Roles · 5 Events · 3 Artifacts
User story qualityINVESTIndependent · Negotiable · Valuable · Estimable · Small · Testable
FR qualityCCPComplete · Consistent · Precise
NFR typesPOEProduct · Organizational · External
RE processESVMElicit · Specify · Validate · Manage
PrioritizationMoSCoWMust · Should · Could · Won't
UML familiesS-B-IStructural · Behavioral · Interaction
Arch driversPSSAPerformance · Security · Safety · Availability
Arch patterns (6)My Lazy Cat Plays Right TunesMVC · Layered · Client-server · Pipe · Repository · Transaction
Maintenance typesCAPCorrective · Adaptive · Perfective
Legacy strategySMRRScrap · Maintain · Re-engineer · Replace
Test levelsUISAUnit · Integration · System · Acceptance
User testingAlpha · Beta · AcceptanceInternal → Wider → Customer-approves

One-liners that win marks

  • SE = systematic, disciplined, quantifiable approach to development, operation, and maintenance.
  • Agile vs Waterfall = embrace change vs lock-in. Working software vs comprehensive docs.
  • Scrum Master is a servant leader, not a manager. Shields the team.
  • Product Owner owns the backlog. Developers own the increment. Scrum Master owns the process.
  • Functional reqs = what; Non-functional = how well.
  • Verification = build it right (spec). Validation = build the right thing (user).
  • Error → Fault → Failure. Human mistake → code defect → observed wrong behavior.
  • Black-box finds omissions; White-box finds commissions.
  • Refactoring = continuous during dev. Re-engineering = one-off restructure of legacy.
  • Pesticide paradox: same tests stop catching bugs — must evolve test suite.
  • Dijkstra: testing shows presence of defects, not absence.

If the question says…

Clue wordProbably about
“fixed / locked / regulated requirements”Waterfall / V-Model
“high-risk, evolving requirements”Spiral
“customer on-site, fast change”Agile (XP/Scrum)
“central shared data, multiple subsystems”Repository
“stream of data transformed step-by-step”Pipe-and-Filter
“entity life history / modes”State Machine Diagram
“workflow / business process”Activity Diagram
“external actor's view of features”Use Case Diagram
“object messages over time”Sequence Diagram
“measurable quality attribute”Non-Functional Requirement
“value / voice of customer”Product Owner
“15-min daily”Daily Scrum
“customer test for free”Beta testing
“tests before code”TDD
“pre-deployment customer approval”Acceptance testing
Last tip

When asked “which model / pattern / test would you use?”, justify with two factors: the constraint (regulation, risk, budget) and the goal (speed, quality, flexibility). Two-factor answers always score higher than one-line ones.