My specs for Dataclient implementation say:
To connect with your server, you should create a client program. This implementation should include a class that implements the same public methods as the suncertify.db.Data class, although it will need different constructors to allow it to support the network configuration.
But in my implementation i have made use of a Factory class, which as per the parameter passed by the client,connects to database locally or through the network. Will i be ok by explaining my implementation in design doc, or should i cahnge my DataClient implementaion and include two constructors in DataClient for two modes instead.
Kindly comment am confused.
I dont see any problem with what you have done.
I think the important part of the instructions are that the public methods defined in the Data class are accessible via either networked or local mode. It sounds like you have done this.
I read the instruction about the constructors to mean that we do not have to implement the same sorts of constructors over the network - instead we may use any constructor that we deem to be appropriate.
For example, the Data class has a constructor which allows you to create a brand new database with no records. You would probably not want to have such a constructor available to every networked client.
Similar to you, I had a factory to connect in either local or networked mode. The client code did not even see the constructors for local or remote mode - this was hidden within the classes used by the factory. All the client saw was that it used a method in the factory to get an instance of a connection to the database which provided all the methods of the Data class. I did not loose any points on the GUI side, so I guess this must have been OK