hello, i'm developing the b&s-project. i read some approaches how to handle the access to the remote/local db (throwing ioexceptions instead of remote ones, and so on)
my assignment says "your data access class must be called "data.java" and must implement the dbaccess interface."
now my question: what about the approach to extend dbaccess interface to an interface that additional extend serializable. and my data-class implements it. the assigment says only "must implement", but not "must directly implement".
(dbaccess <-- dbaccess+serializable <-- data)
with this approach i can implement an remote-dbfactory with one method getDBAccessSerializable().
the advantage would be, to use all the original exception defined in the dbaccess interface.
could someone confirm this approach with the assignment?
thanks in advance.
ps: sorry for my poor english...
posted 9 years ago
Or can't you implement both interfaces in Data class?
Is the extra interface needed?
This way you would implement it directly, and we have other question: "Can Data implement more interfaces?"