| Given: | Friday, 29 February |
| Due Date: | Wednesday, 19 March |
SimpleDB only knows how to read files in the forward direction.
a) Revise the classes RecordFile and RecordPage to support a previous method, as well as the method afterLast, which positions the current record to be after the last record in the file (or page).
b) Write a test program to print the records of the STUDENT file in reverse order. In particular, your program should ask the user for the name of a table in the database. Your program should print the contents of the specified table in backwards order. That is, your code will need to use the afterLast and previous methods to traverse the table backwards. It will also need to use the methods in Schema to loop through the fields of the table. Your program should use the SimpleDB metadata manager to obtain the TableInfo object corresponding to that table. In particular, if variable tblname holds the name of the table, then the following statement obtains its table info: