Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7rnC7jppGGdHGESvy
18 lines
1.1 KiB
Plaintext
18 lines
1.1 KiB
Plaintext
Q12 state: advance() x3 -> NEW -> PAID -> SHIPPED -> DELIVERED
|
|
Q12 state: advance() on DELIVERED -> IllegalStateException: already delivered
|
|
Q12 strategy: total(1000) with NONE=1000.0 then FESTIVAL=900.0
|
|
Q13 sort by length (Comparator strategy): [fig, pear, banana]
|
|
Q13 sort reversed alphabetical: [pear, fig, banana]
|
|
Q13 inline lambda strategy: total(200)=150.0
|
|
Q14 publishNaive, 2 listeners, first unsubscribes itself: delivered to [first] (no exception, second was skipped)
|
|
Q14 publishNaive, 3 listeners, first unsubscribes itself -> ConcurrentModificationException
|
|
Q14 publishSafe, two events, self-unsubscribing listener: [once, other, other]
|
|
Q14 java.util.Observable @Deprecated(since="9")
|
|
Q15 template method run(): [open, sales rows, close]
|
|
Q15 strategy version runWith(): [open, ad-hoc rows, close]
|
|
Q15 run() is final (subclasses cannot reorder the steps): true
|
|
Q16 valid request -> 200 ok via [auth, rate-limit, controller]
|
|
Q16 no token -> 401 via [auth]
|
|
Q17 after two commands: "Hello, world"; undo -> "Hello"; undo -> ""
|
|
Q18 2 + 3 * 4 via sealed switch=14 via Visitor=14
|