nerdexam
Oracle

1Z0-805 · Question #81

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

The correct answer is B. DAO. Data Access Object Abstracts and encapsulates all access to a data source Oracle 1Z0-805 Exam 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)

Building Database Applications with JDBC

Question

Given:

public class DAOManager { public AccountDAO getAccountDAO() { return new AccountJDBCDAO(); } } Which design pattern best describes the class?

Options

  • ASingleton
  • BDAO
  • CFactory
  • DComposition

How the community answered

(28 responses)
  • A
    4% (1)
  • B
    75% (21)
  • C
    7% (2)
  • D
    14% (4)

Explanation

Data Access Object Abstracts and encapsulates all access to a data source Oracle 1Z0-805 Exam 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)

Topics

#DAO pattern#factory pattern#design patterns#JDBC

Community Discussion

No community discussion yet for this question.

Full 1Z0-805 Practice