After reading the above problem definition, it seems that each line from the list represents a single rule. The rules are simple—few conditions and a consequence. The consequence will report a customer that failed a validation rule. Two types of messages will be used—error and warning.
We'll now define a report model that will store this information. The model might look like the following figure:
As it can be seen in the above figure, we have a
Message interface and a
ValidationReport interface. This validation report is then used by a
BankingValidationService, which represents some service that will run the validation rules and will act ...