honeytrap.devexercisesabstract-factory.javaSettings
Description

7. Abstract Factory

HardCreational1 hidden requirement

Getting a whole family of objects from one place, so they cannot be mismatched

Form draws a button and a checkbox, and both themes come out right. The tests pass.

It decides on each widget separately, by looking at the theme’s name. Two decisions, made in two places, that have to agree — and nothing makes them.

Theme already has makeButton() and makeCheckbox(). Rewrite Form so the pair comes from one place.

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