Skip to content
Tutorials Center
My learning

Topics

Lesson 50 of 50 ยท Practice and Interview

Software Engineering Cheat Sheet

A one-page software engineering cheat sheet: process models, UML diagram picker, requirement and test techniques, design principles, estimation formulas and metrics.

This is the page to keep open before an exam, an interview or a design meeting. It compresses the whole tutorial into tables, rules and formulas, with a link to the full lesson for each block. Nothing here is new: if a line does not make sense, follow its link and read the explanation.

Everything is read-only reference except two small JavaScript stand-ins near the end, which calculate the common formulas and generate test cases so you can check your arithmetic. They use invented numbers.

What is on this page

Process Models, agile and delivery.
Modeling UML and design rules.
Quality Requirements and testing.
Numbers Estimation and metrics.

Skim top to bottom, then reread the lessons you are weakest in.

1 / 2

Process models

Model Idea Best when Main weakness
Waterfall Phases in strict order Stable requirements, regulation Late feedback, costly change
V-model Each phase paired with a test level Safety-critical, formal Rigid, same as waterfall
Iterative Repeat the whole cycle, refining Unclear details Needs good planning
Incremental Deliver in working slices Early value needed Architecture can drift
Spiral Risk analysis in every loop Large, risky projects Expensive, needs risk skills
Agile (Scrum, XP) Short cycles, constant feedback Changing requirements Needs engaged customer
Kanban Continuous flow, WIP limits Support, operations No built-in cadence

Lessons: The SDLC, Waterfall, V-Model and iterative, Spiral, Choosing a process.

SDLC phases and outputs: requirements (SRS), design (architecture and detailed design), implementation (code), testing (test report), deployment (release), maintenance (fixes and enhancements).

Requirements

Item Rule
Functional What the system does
Non-functional How well: performance, security, usability, reliability, maintainability
Testable Contains a measure ("within 2 seconds for 95% of requests")
User story As a (role), I want (goal), so that (benefit)
INVEST Independent, Negotiable, Valuable, Estimable, Small, Testable
Acceptance criteria Given (context), When (action), Then (result)
MoSCoW Must, Should, Could, Won't (this time)
Traceability Requirement to design to code to test, in both directions

Lessons: Gathering requirements, Functional and non-functional, User stories, The SRS.

UML diagram picker

You want to show Use Type
What users want from the system Use case diagram Behavior
Classes, attributes, relationships Class diagram Structure
Messages between objects over time Sequence diagram Behavior
A workflow with decisions and parallel steps Activity diagram Behavior
Life cycle of one object State machine diagram Behavior
Parts and their interfaces Component diagram Structure
Hardware and where software runs Deployment diagram Structure
Data moving between processes and stores Data flow diagram (not UML) Structure of flow
Entities and cardinality for a database ER diagram (not UML) Data

Class relationships: association (uses), aggregation (has, parts can live alone), composition (owns, parts die with whole), inheritance (is a), dependency (temporarily uses). Multiplicity: 1, 0..1, * (many), 1..*.

Lessons: UML overview, Use cases, Class diagrams, Sequence and activity, State, component, deployment, DFD and ER.

Design principles and architecture

Principle One-line meaning
Abstraction Hide detail behind a simple interface
Information hiding Keep design decisions private to a module
High cohesion One module, one clear purpose
Low coupling Few, narrow dependencies between modules
Separation of concerns Different jobs in different places
DRY One authoritative place for each piece of knowledge
YAGNI Do not build it until you need it
SOLID Single responsibility, Open/closed, Liskov, Interface segregation, Dependency inversion
Architecture style Good for Watch out for
Layered Typical business apps Layers that leak
Client-server Web and mobile apps Server as a bottleneck
Event-driven Loose coupling, integration Hard to trace flows
Pipes and filters Data processing Shared state
Monolith Small teams, early stage Growing tangle
Microservices Many teams, independent scaling Operational cost
Hexagonal Testable core logic More structure to maintain

ADR parts: status, context, decision, consequences (good and bad), alternatives, revisit trigger. C4 levels: context, containers, components, code. Scenario parts: source, stimulus, environment, artifact, response, response measure.

Lessons: Design principles, Architecture styles, Architecture decisions, API design, Technical debt.

Agile and teamwork

Scrum Items
Roles Product Owner, Scrum Master, Developers
Events Sprint, Planning, Daily Scrum, Review, Retrospective
Artifacts Product Backlog, Sprint Backlog, Increment
Commitments Product Goal, Sprint Goal, Definition of Done

Kanban: visualize work, limit work in progress, manage flow, make policies explicit. XP practices: pair programming, TDD, continuous integration, small releases, refactoring, collective ownership. Agile values: individuals and interactions, working software, customer collaboration, responding to change (over process, documentation, contracts, plans).

Lessons: Agile principles, Scrum, Kanban and XP, Estimation and planning, Working in a team.

Testing

Technique Use it for Example
Equivalence classes Group inputs that behave alike Test one age from each price band
Boundary values Edges of ranges 17, 18, 19 around an adult limit
Decision table Combinations of conditions 3 conditions give 8 rules
State-based Sequences of events Order: draft, placed, paid, shipped
Error guessing Experience with usual bugs Empty string, null, huge value
Level Scope Speed
Unit One function or class Fastest, most numerous
Integration Modules together Medium
System Whole product Slow
Acceptance Meets the customer's need Slowest, fewest

Black-box tests use the specification; white-box tests use the code structure. TDD cycle: red (failing test), green (smallest code to pass), refactor. Cyclomatic complexity: V = decisions + 1, or E - N + 2P on the control-flow graph. Coverage shows what ran, not what was verified.

Lessons: Testing levels, Test design, TDD and quality, Version control and CI, Maintenance.

Management and estimation

Topic Formula or rule
PERT mean (optimistic + 4 x likely + pessimistic) / 6
PERT deviation (pessimistic - optimistic) / 6
Basic COCOMO effort E = a x KLOC^b person-months
Basic COCOMO schedule D = c x E^d months
COCOMO organic a 2.4, b 1.05, c 2.5, d 0.38
COCOMO semi-detached a 3.0, b 1.12, c 2.5, d 0.35
COCOMO embedded a 3.6, b 1.20, c 2.5, d 0.32
Risk exposure probability x impact
Schedule variance EV - PV; SPI = EV / PV
Cost variance EV - AC; CPI = EV / AC
Forecast at completion BAC / CPI (if the trend continues)
Sprints left remaining backlog / average velocity
Critical path Longest path through dependent tasks: the minimum project duration

Risk responses: avoid, reduce, transfer, accept. Semantic versioning: MAJOR.MINOR.PATCH (breaking, feature, fix). Change control: request, assess impact, approve, implement, verify, record.

Lessons: Project management, Risk, Cost estimation, Configuration and change, Ethics, security, licensing.

Formula calculator

Check your hand calculations here. The numbers are examples; change them and rerun.

JS Estimation formulas at a glance

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Test case generators

Boundary cases, decision-table rows and semantic version bumps in a few lines. These are stand-ins for the techniques, not test tools.

JS Boundaries, decision rows and version bumps

Press Run (or Ctrl + Enter) to see the console output here.

No output.

With 32 KLOC the organic COCOMO model gives about 91 person-months over roughly 14 months, a team near seven. The backlog of 130 points at an average velocity of 21 needs 7 sprints, with a best case of 6 and a worst case of 8.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. Which technique tests 17, 18 and 19 for an adult age limit of 18?

    Boundary value analysis tests at and next to the edges of a range, where off-by-one errors hide.
  2. 2. A project has EV 40,000, PV 50,000 and AC 48,000. What is its SPI?

    SPI is EV divided by PV: 40,000 / 50,000 = 0.80, so the project is behind schedule. The 0.83 value is the CPI (EV / AC).
  3. 3. Which UML diagram best shows messages between objects over time?

    Sequence diagrams put participants along the top and messages in time order down the page.
  4. 4. How many rules does a full decision table with 4 yes/no conditions have?

    Each condition doubles the rows, so 2 to the power of 4 gives 16 combinations.
  5. 5. In semantic versioning, which part changes for a backward-incompatible change?

    A breaking change increments the MAJOR number, a compatible feature increments MINOR and a compatible fix increments PATCH.

Summary

  • Pick a process by volatility, risk and regulation; most real projects mix plan-driven and agile ideas.
  • Write testable requirements, model with the right UML diagram, and design for high cohesion and low coupling.
  • Record architecture decisions in ADRs and state qualities as measurable scenarios.
  • Choose test cases with equivalence classes, boundaries, decision tables and states; coverage is a map of what ran, not proof of quality.
  • Keep the key formulas at hand: PERT, COCOMO, risk exposure, SPI and CPI, sprints left, and complexity.
  • Revisit the full lessons whenever a line on this page feels like a memorized fact instead of an understood one.

You have reached the end of the Software Engineering tutorial. Go back to the curriculum start to review any chapter, or try the practice exercises again with different data.