Given the fragment:public class CustomerApplication {public static void main (String [] args) {CustomerDAO custDao = new
Posted: Wed Jun 07, 2023 6:11 am
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();
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();