Hi Vrinda,
----------------------------------------------------------------
I was going thru Max's book and could not make out why there's a FileExtension and a RecordExtension? What purpose do they serve.
-----------------------------------------------------------------
If I am correct, both fileExtension and recrodExtension are same in Max's example. He is using two different varaibles to refer to the same
string - ".dvd".
A file extension serves the purpose of identifying the type of file. Max's example would probably work without the extension also since 'upc' is unique for each dvd but its a good coding practice to add the extension.
-------------------------------------------------------------------------
1. My understanding so far is all DVDs are stored as serailized objects on the file system. How do I map the above parameters to my understanding.
--------------------------------------------------------------------------
I do not understand this question, so I do not know i I am answer it correctly. The file system of Max's example is equivalent to the persistent storage of the certification assignment. The assignment uses a data file with byte stream for data and Max is using the Object Stream.
------------------------------------------------------------------------
2. Also, learnt that, if a client is trying to reserve a DVD and this is already in the "reservedDVDs" vector, then the client waits instead of returning. Im assuming we are not simulating the real world conditions, where when a DVD is reserved will not be available for at least five days. Is this implementation based on some understanding and trying to run home a point.
---------------------------------------------------------------------
In Max's example a DVD is added to the 'reservedDVDs' vector only for the duration during which some user is modifying the record. As soon as someone modifies the record, the DVD is 'released' from the vector and is available for other users.
Hope this helps.
regards,
Raj