I'm currently working on URLyBird (1.1.2) and the instructions contain the following statement:
Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface:
[Definition of sunceritfy.db.DB interface follows...]
My question is - what is the scope of a "data access class"?
Minimally, it's clear that the class declaration for suncertify.db.Data must look like:
But does "Data Access Class" also mean that all aspects of the data access - including locking, file access, etc. must also be contained within the suncertify.db.Data class?
For example, let's say I wanted implement the "create" method in Data.java as follows:
where "doCreate" would be defined as an abstract method (thereby making suncertify.db.Data an abstract class) that would be overridden by subclasses that provide an implementation (e.g. a FixedFieldDataFile subclass would provide an implementation required for this assignment). In other words, I'd use a Template Method
pattern.
Would the above approach (and similar) where implementation details have become the responsibility of classes other than suncertify.db.Data violate the requirement that mandates that suncertify.db.Data serve as the "Data Access Class"?
Thank you.