10. Adapter
EasyStructural1 hidden requirement
Talking to the interface an adapter offers, rather than reaching through it
WeatherPanel shows a temperature in Celsius, and the tests pass.
It is handed a Thermometer, which promises exactly that — and then reaches through it with a cast to get at the Fahrenheit station behind, so it can do the conversion again itself.
RoofStation already converts. Rewrite headline() to ask the Thermometer it was given.
Run compiles every file and runs Tests.java — the tests you can read.
Submit runs those again, then applies 1 requirement you have not seen, one at a time.
Your code is never edited. Each requirement is added to the project as it stands. If the design is right, nothing you wrote has to change.
- Ctrl/⌘ + Enter runs the tests
Run the tests to see where you are.
Hidden requirements
Stdout
TERMINALPROBLEMSOUTPUT
Try:
honeytrap shell. Two commands are wired up: cd and cat.