Which design pattern best describes the class?

Given:
<code>
public class DAOManager {
public AccountDAO getAccountDAO() {
return new AccountJDBCDAO();
}
</code>
Which design pattern best describes the class?

Given:

public class DAOManager {
public AccountDAO getAccountDAO() {
return new AccountJDBCDAO();
}

Which design pattern best describes the class?

A.
Singleton

B.
DAO

C.
Factory

D.
Composition

Explanation:
Data Access Object
Abstracts and encapsulates all access to a data source
Manages the connection to the data source to obtain and store data
Makes the code independent of the data sources and data vendors (e.g. plain-text, xml, LDAP,
MySQL, Oracle, DB2)



Leave a Reply 1

Your email address will not be published. Required fields are marked *