Design Note
This class is not final. This allows creating {@link MemberDAOFake} as a subclass.Instead of using a subclass to define the fake DAO, some might prefer to define an interface for the DAO instead, along with two concrete implementations, one for the real DAO, and one for the fake DAO.
The subclass style was used here since it seems a bit more compact : only two top-level items need to be defined, not three.
Either style will work.
|
|