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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access