Ok I am aware that all of us are always concerned about certain issues like automated
testing and about the interface given to you. I have e-mailed Sun Microsystems, and they replied to me with the following:
Question 1: I understand that I'm not allowed to modify the DB interface. However, all I have done is remove the "public" keyword from all the method signatures, as interface methods are always public, so adding that keyword is redundant. At the same time, I did not include the original comments from the instructions into my file (although I wrote the javadoc for the interface). Are such changes permitted? Does the "no modification" rule only apply to the method signatures and interface name?
Reply from Sun Microsystems: This is considered legal modification, as the method signatures themselves are unchanged. As long as the method names, return types and arguments adhere to the specs, you are fine.
Question 2: By stating that my Data class must implement the DB interface, does it mean DIRECT implementation? Am I allowed to create a subinterface of DB, and let the Data class implement that subinterface?
Reply from Sun Microsystems: Contrary to popular belief, this is actually legal. Implementation can be either direct or indirect, as long as your class implements it.
Question 3:All the specs require is that the Data class implements the DB interface. Does this actually mean that I can design this class in any way I want, as long as I implement the interface? I'm worried about how Sun Microsystems actually performs automated testing on the Data class. My Data class has external dependencies that can only be fulfilled when certain conditions are met (e.g. client connects to server).
Reply from Sun Microsystems: Don't worry about automated tests. We stopped using automated testing several years ago. Your assignment specs probably mentioned about software testing. The software testing only tests the following:
1) Your JAR file contents. They must conform to the specs (such as the folders you must have and so on).
2) Test if you illegally modify the interface given to you, and test if your implementation class implements that interface (once again, indirect implementation is allowed).