I just started working on Bodgitt & Scarper assignment. I wrote a method to read the DB file. It is working fine. But when I read the requirements of the assignment, it says:
"Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface:
public interface DB
// Reads a record from the file. Returns an array where each
// element is a record value.
public String read(int recNo) throws RecordNotFoundException;"
From above, I understood that "public String read(int recNo)" method should return the particular record based on the parameter we pass. That is, if we pass 3, it should return just the 3rd record..Is my understanding correct?
If my understanding is correct, can you guys suggest me how to get this done? Because, the db records does not have any index...I dont know how to do this...please help me out on this.