This content has been marked as final. Show 1 reply
If you have a factory then it is not an interface. If it just a class.
If you want to create an abstract factory then it requires an interface for the factory.
I wonder why you are using a factory at all. And if you are using a factory then it would be really odd to have it exposing the data source, since presumably, that would be the very thing that would complicate the creation of the DAOs in the first place. Of course the reason one uses a factory is because creation is complicated.
So ignoring that then specific comments.
public CustomerIF createCustomerIF();Nope. It should be called CreateCustomer() because you are not creating an interface.
interface MainFactoryInterfaceI am not a great fan of using 'IF' like that but I am however a great fan of consistency. So either name all of your interfaces with 'Interface' or with 'IF'. One or the other not both.
public CustomerIF createCustomerIF();
Is this a right way to do?Excluding everything above then yes.