Alexandru Dragoi wrote:I was just under the impression that the service layer must exactly match the interface that I was provided in the exam instructions (for the data access layer).
No more, no less...
But if I have the freedom to customize my service layer, then this is a cool thing.
This means that I can expose to the client completely different methods than those provided in the exam instructions.
I passed the OCMJD exam (in 2009) with a thin client approach. So my business service exposed just 2 methods (which are required by the client): findRooms and bookRoom. I even created a subinterface of the required-to-implement interface and added a few extra methods (which were required for my solution). And my Data class implemented this subinterface (and thus also implemented the required-to-implement interface). I
In the assignment there are very few limitations. The only things you are required to do are the must requirements in your assignment. So every sentence containing "must", you must do. If you violate one of them (e.g. another name for your Data class), you will almost certainly fail. For all other decisions, it's completely up to you what you want to do. Many (or even all) of these decisions you could/should document/justify/explain in your design decisions document.
Hope it helps!
Kind regards,
Roel