Given the fragment:public class CustomerApplication {public static void main (String [] args) {CustomerDAO custDao = new CustomerDAOMemoryImp1 ();// . . . other methodsWhich two valid alternatives to line 3 would decouple this application from a specific implementation of customerDAO?
A. CustomerDAO custDao = new customerDAO();
B. CustomerDAO custDao = (CustomerDAO) new object();
C. CustomerDAO custDao = CustomerDAO.getInstance();
D. CustomerDAO custDao = (CustomerDAO) new CustomerDAOmemoryImp1(); E. CustomerDAO custDao = CustomerDAOFactory.getInstance();
Given the fragment:public class CustomerApplication {public static void main (String [] args) {CustomerDAO custDao = new
-
- Site Admin
- Posts: 899559
- Joined: Mon Aug 02, 2021 8:13 am