April 2017
Beginner
504 pages
14h 11m
English
We have a consistency checker class, and an instance of it is injected into the controller. This class is used to check the consistency, but it does not actually perform the check itself. It only controls the different checkers that we provide and invokes them one by one to do the real work.
We require that a consistency checker, such as the one that checks whether the order contains a power cord when a desk-side lamp is ordered, implements the ConsistencyChecker interface:
package packt.java9.by.example.mybusiness.bulkorder; import ... public interface ConsistencyChecker { boolean isInconsistent(Order order); }
The method isInconsistent should return true if the order is inconsistent. It returns false if it does not ...
Read now
Unlock full access