Hi guys, in the interface the delete method signature is
// Deletes a record, making the record number and associated disk
// storage available for reuse.
public void delete(int recNo) throws RecordNotFoundException;
and the data file has a flag for every record that indicates if the record is deleted or active, but based on the method's comment, every call to this method will delete the record from the file, meaning that the file will only have active records.
And for the create method:
// Creates a new record in the database (possibly reusing a
// deleted entry). Inserts the given data, and returns the record
// number of the new record.
public int create(
String [] data) throws DuplicateKeyException;
Then my question is, do I really need remove the record from the file? It does not make sense to me, to have a flag when all records are valid, am I missing something here?
Thanks, for your help.