I've seen many forums threads on this site dancing around the topic of modifying or extending the DBMain interface with which I have an issue with, but none actually gave the type of answers I've been looking for, so I emailed firstname.lastname@example.org
with my question as specified in the assignment. This is what I got back. My Email containing the issue:
The assignment states 'Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface'. Part of the interface declares a method as follows:
// Reads a record from the file. Returns an array where each
// element is a record value.
public String  read(int recNo) throws RecordNotFoundException;
The instructions states 'Your project must conform to this specification. Features that deviate from specification will not receive full credit', and 'Automatic failures ... where this document uses the word "must" an absolute requirement is being described. If you fail to adhere to such a requirement, your assignment will be failed automatically'.
It also states 'Provided you do not contravene any specification in this document you will not be marked on the particular choice that you made...'
Even though it states that the supplied interface must be implemented by the Data.java class, it does not state that I am not permitted to modify the interface.
My question is would I be contravening the specification or be penalised in any manner if I modified the interface method previously mentioned method at follows where myRecord is a serialisable class that contains fields previously returned as an array:
public myRecord read(int recNo) throws RecordNotFoundException;
My reason for the modification would be that the method is public and in order to simpily the OO design making it easy for junior developers to understand (part of the clarity and maintainability requirements) I want to apply the Tranfer Object pattern to this area. In fact I want to apply as many design patterns as required through out the application to enable it to conform to globally recognised standards and therefore easier for any java develop to understand. This is their responce:
Thank you for contacting Sun Certification Customer Support.
There are ambiguities to the exam in order to allow you latitude in how you solve the problem. You are being tested not only on your knowledge of Java technology, but also on your problem solving ability. If you are uncertain of how to do something, document your thought process heavily in that section. The main idea is to ensure the project works according to specification and to document the choices you have made.
Since the assignment instructions do not specifically forbid you from modifying the interface, you should not be penalized�providing that the modification still allows the project to work as specified.
Sun Certification Customer Support email@example.com
So it seems as long as you comply with the following we should not have a problem:
1. don't modify the format of the data file,
2. can insert, update, delete and read the records,
3. have a class called Data that implements an interface called DBMain (heavily document reason why the modifications have been made)
4. make use of techniques to handle database concurrency issues such as locking and making use of threading.
5. use one of the specified networking frameworks (I'm going for RMI), as well as the non-networking solution,
6. have a swing GUI component used by the user that uses a jtable to display the records that match you search, and performs all of the previously mentioned connectivity to execute all all of the stipulated database DML(Data manipulation Language) methods.
Any input and point of views are welcome from anybody out there (especially persons that have successfully completed the SCJD and the moderators) on this topic.