Forums Register Login

Data conversion tool

+Pie Number of slices to send: Send
Hello All,
I registered for the SCJD on nov 28 and still got the project with
text file. Need to write the data conversion tool.
After reading through the given code I had a few questions.May be I
am tinking too much, but hope some one can clarify.
(1) In the text file given there is no explicit record number field (
starts with flight number). while I am converting this text file to
binary I am planning to add a unique record number field as the
first field in the binary file. Am I justified in doing this?
My Reasons for doing it:
a. Persistance of data in the binary file, that is if I don't add a
record number field then once the program stops running the record
number information associated with a record is gone.
b. Also in the find method ( given along with the project) of the
Data class the javadoc states " For this assignment, the key field is
the record number filed" and the search for the record is done using
values[0].equls(toMatch). To me this means that the first field
should be record number.
My confusion stems from the following fact.
If record number is going to be the first field of the record, then
why should the DataInfo class ( given with project) hava a separate
private variable recordNumber. The recordNumber information can be
derived from values[0] ? Aren't we creating a redundant variable
here?
Hoping to hear some response. ( Sorry this was long ...)

Thanks
-Sri
+Pie Number of slices to send: Send
Sri Parthas,
I am also working on the same module, but i am not adding any record number. Reason is, if you look closely at the getRecord() method in Data class, the integer parameter is used to seek through the file to the particular record, using the record length calculations. Of course, it is my point of view. Do anyone else view it differently???
Praveen.K
You can thank my dental hygienist for my untimely aliveness. So tiny:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 729 times.
Similar Threads
Where does recordNumber come from?
Data Conversion Tool.
Data file format from new assignment
UrlyBird 1.3.2 locking with no cookie
Pls Help ( javadoc comment for DataAccessFactory)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:01:20.