Given:
What two changes should you make to apply the DAO pattern to this class?
A.
Make the customer class abstract.
B.
Make the customer class an interface.
C.
Move the add, delete, find, and update methods into their own implementation class.
D.
Create an interface that defines the signatures of the add, delete, find and update command.
E.
Make the add, delete, find, and update methods private for encapsulation.
F.
Make the getName and getId methods private fir encapsulation.
Explanation:
In computer software, a data access object (DAO) is an object that provides an
abstract interface to some type of database or persistence mechanism, providing some specific
operations without exposing details of the database. It provides a mapping from application calls to
the persistence layer. This isolation separates the concerns of what data accesses the application
needs, in terms of domain-specific objects and data types (the public interface of the DAO), and
how these needs can be satisfied with a specific DBMS, database schema, etc. (the
implementation of the DAO).
In the specific context of the Java programming language, Data Access Objects as a design
concept can be implemented in a number of ways. This can range from a fairly simple interface
that separates the data access parts from the application logic, to frameworks and commercial
products.