For the Java Development assignment, I am required to write some code for the lock and unlock method but I am baffled on how to do that. The basic problem is keeping check of which records are locked. However, I have thought of an idea. Is it possible to have a file containing information on which records are currently locked? This file will be updated continually in that when a record is not used anymore it is removed from the file and when a record is used it is stored in file so the operation will involved lot of writing/deletion. Is that a good approach?