Within one running process, a class controls creation so callers share its one instance. Which arrangement does this describe?
What does a design pattern's name give a team?
Once a design has a recognised pattern name, it needs no checks against its requirements.
Circle one: True False
A sensor calls each registered listener's update(value) after a change. A second board is added. Which change keeps the sensor independent of concrete board classes?
Python runs these statements in order. Both objects honour quote(total)'s contract. Which pattern does this trace illustrate?
pricing = weekday_pricer
pricing.quote(total)
pricing = weekend_pricer
pricing.quote(total)
An account delegates sending to a sender and storage to a store. Retry logic changes, but the sender keeps the whole send(message) contract. Where should that implementation change go?
One direct function meets all requirements for a fixed calculation. No replacement or separate testing is needed. A teammate proposes three swapping layers with no other benefit. Which review comment fits?
Python runs these statements in order:
LIMIT = 24
cached_limit = LIMIT
LIMIT = 36
The next check reads cached_limit. Which assignment, inserted at the stated point, makes that check use 36?