Home » Oracle » 1z0-804 » Which two valid alternatives to line 3 would decouple this application from a specific implementation of CustomerDAO?
Given the fragment:
Which two valid alternatives to line 3 would decouple this application from a specific implementation of CustomerDAO?
A. CustomerDAO custDao = CustomerDAO();
B. CustomerDAO custDao = (CustomerDAO) new Object ();
C. CustomerDAO custDao = CustomerDAO.getInstance();
D. CustomerDAO custDao = (CustomerDAO) new CustomerDAOmemoryImp1();
E. CustomerDAO custDao = customerDAOFactory.getInstance();
Correct Answer: CE
Explanation/Reference:
Explanation:
Note: In software development, the term"decoupling"is used to identify the separation of software blocks that shouldn’t depend on each other. Some building blocks are generic and shouldn’t know details of others.
Special design techniques allow software designers to have as few dependencies as possible. This typically reduces the risk of malfunction in one part of a system when the other part changed. It also forces the developer to focus on one thing at a time.
Decoupling lowers or minimizes Coupling.
Download Printable PDF. VALID exam to help you PASS.
|
|