SENG 365 — Software Engineering
2026-10-01
By the end of this module, you should be able to:
Before class: Read Robillard, 3rd ed., Chapter 3.
Would you add another branch, an enum, or an interface? Name the next change your choice handles well.
Design pressure: New games draw from standard decks, multiple decks, or fixed card sequences. They also arrange hands differently.
Which design decisions are fused to HandBuilder? (i.e., what will be harder to change in the future? )
Could a library type such as Comparator<Card> or Iterable<Card> express the requirement more clearly?
Pattern names help communicate a recurring force and its consequences. They do not make a design good.
This course example is not from the card-library narrative:
Compare a named class, anonymous class, lambda, and factory method. Which communicates intent best if the comparison is stateful or reused?
Python can rely on “if it can do the operation” at run time :
Java normally makes that expectation explicit in a declared type.
Both approaches can be strongly typed; Java is statically typed, while Python is dynamically typed. The design question remains: what behaviour does the client require?
An interface is justified in HandBuilder because __________.
It would be premature if __________.
Before class: Review Chapter 3, especially Section 3.3.
Bring your previous class design or a photograph of it.
What can a class diagram reveal more quickly than this code?
Name one important fact the diagram cannot establish.
Draw only what matters for this question:
How difficult is it to test a
Gamewith a fixed card sequence and a different view?
Include:
Do not transcribe every field and method.
Propose a second diagram that makes the desired variation explicit.
Label each change with its rationale:
The diagram exposed the dependency from __________ to __________.
That matters because __________.

Course home · Neil Ernst ©️