Hi Jack, (Better smile when you say that at an airport!)
In the assign,do we need to implement the add and delete method?
You need to implement them as a requirement to expose the public Data interface, but you should never actually call them in this assignment.
And for lock/unlock,do we need to implement database lock?I mean lock(-1).
Once again, you need to implement database locking and optionally database unlocking but whether you actually lock the database depends on whether you decide on having a graceful shutdown on your server. I did employ a graceful shutdown, but others like Eugene did not. Eugene and I both scored perfect on server and locking, so apparantly either way is acceptable. Hope this helps, Michael Morris
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher