Good day all.
I was thinking of adding Runtime.getRuntime().addShutdownHook to the Data class contructor so that I can place a
thread in there that will close the database file just before the program terminates.
Since there is no method that that says connectDatabase on the Interface that I was given, I assumed that there will be no need for a method that says closeDatabase(). So I will add some code to the Data class constructor to close the database instead of extending the interface I was provided with to add a method that closes the database.
Is there anything wrong with this approach ?