Building a Counteroffer

The UnforgivingBuilder class will reject requests that are anything less than fully formed. Suppose that the business decides that the software should make reasonable changes to requests that are missing certain details about the reservation. Specifically, suppose that an analyst asks you to set the headcount for an event to the minimum if this attribute is missing. Similarly, if the dollars/head value is missing, you are to set it to be high enough so that the total take is above the minimum. If you make either of these changes, you should mark the reservation as a counteroffer that the reservation system will confirm with the customer.

To meet this request, suppose that you add a Boolean counteroffer argument method ...

Get Design Patterns Java™ Workbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.