Prototype: KeyValueStore supports void set, nullable get, and boolean delete. Empty keys and values are valid; null values are outside the domain.

Final: TransactionalStore adds begin, commit, rollback, and depth, each returning current/new depth as int. Commit/rollback close exactly one frame; at depth zero they raise IllegalStateException unchanged. Reads use the innermost view; deletion must hide parents. snapshot(prefix) returns a new key-sorted map of visible matching keys, with empty prefix selecting all.

The complete public API is in Exercise.java. All domain classes are public static nested classes of Exercise; construct them as new Exercise.ClassName(...). Do not implement a solution in the test runner. Each instance owns independent state. Unless explicitly allowed, null inputs are outside the domain. Failed operations leave state unchanged; validation happens before mutation.

Drag or use the arrow keys to resize. Home collapses the question; End collapses the editor. Enter or double-click resets the split.
Loading editor…
No results yet.

Complete the starter code, then run the checks.
Results and errors will appear here.

Java runs on this device with CheerpJ 4.3.