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
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