SENG 365 — Software Engineering
2026-10-21
By the end of this module, you should be able to:
Before class: Read Chapter 9, Sections 9.1–9.5.
What is the object contributing besides one piece of behavior?
A functional interface gives a function a Java type. Lambdas and method references can supply values of that type without a named class.
Conciseness is useful only when the behavior remains legible.
Given separate classes for:
produce a before/after design using suitable library functional interfaces.
For each transformation, decide whether to use:
Library types maximize familiarity and composition.
An application type can communicate domain intent and constrain accidental use.
A small stateless Strategy or Command may collapse into a function value.
A named class may still be better when the behavior:
Functional style complements object-oriented design; it does not erase design forces.
A named class communicates intent better than a lambda when __________.
Before class: Read Chapter 9, Section 9.6, and review the Chapter 9 Insights.
What does this loop compute?
How long did it take to separate traversal mechanics from intent?
The pipeline names transformations. That does not automatically make it clearer.
Transform collection-processing code that:
Produce the imperative and functional versions side by side. Annotate each stream stage with its input and output type.
Evaluate both versions:
map or peek?The goal is declarative design, not maximum chaining.
These ideas extend beyond the chapter’s Java mechanisms:
resizeTo100px(image) is idempotent; shrinkByHalf(image) is not. This distinction matters when distributed work may be retried.
Retain the visual transfer exercise: Cube Composer.
While solving a level, identify:
Use it to transfer the reasoning, not merely to finish the puzzle.
Objects organize state and message passing; functions organize transformations and behavior composition. Actor, CSP, and reactive systems provide still other organizing models.
The course goal is not allegiance to a paradigm. It is recognizing which structure makes dependencies and change easiest to reason about.
A stream improves intent when __________; an ordinary loop is clearer when __________.

Course home · Neil Ernst ©️