SENG 365 — Software Engineering
2026-07-31
Reading: Robillard, 3rd ed. — Ch. 2, Encapsulation (pp. 13–41).
OOP history
Where does Python fit in this graph? Is it OO?
Cynefin
Key: have a process, follow it, and reflect on the results.
What are some reasons to practise information hiding?
Java has 8 primitive types: int, boolean, double, float, byte, char, long, short.
Goals for abstractions:
Why we care: control complexity, isolate distinct computations, divide and conquer.
What are important attributes of a bookstore inventory system?
Approaches: nouns and verbs in object brainstorming; single responsibility (one reason to change).
How can we represent a playing card? What should the card do?
int/String (Primitive Obsession ☠)object diagram
scope
String).addPlayer: pre- and post-conditions — why?public keyword is a promise to external callers — other objects, other packages, or unknown library clients.private.final whenever possible.
Neil Ernst ©️