Hi Java masters,
I'm facing some difficulties with a java quizz.
Please give me some ideas.
--------------------------------------------------
Quiz01 :
The text file has three records like :
John
NO.123, HirLet Road,LL 234
025-5-5455
1 5 0 2 7000
Paul
NO.23, Hello Road,LL 235
025-5-5454
1 5 0 2 6000
Mary
NO.23, Mine Road,LL 235
23-5-5454
1 5 0 2 9000
According to the above info, we know the file has John's related record and Paul's related one, and Mary's related one.7000,6000 and 9000 are their respective salaries.
For each record,create an object and add it to ArrayList.
Having created all objects, write those objects to a binary where those whose salaries are over 6000.
Again, display the name of them.
-----------------------------------------------
For the above,
� Do I have to implement StringTokenizer() to make apart each person ?
If so,how ? I guess each record span four lines. So I cut out four lines for each record ?
� How can I compare their salaries ?
To do so,I think I have to use StringTokenizer again.
I'm facing some difficulties with a java quizz.
Please give me some ideas.
--------------------------------------------------
Quiz01 :
The text file has three records like :
John
NO.123, HirLet Road,LL 234
025-5-5455
1 5 0 2 7000
Paul
NO.23, Hello Road,LL 235
025-5-5454
1 5 0 2 6000
Mary
NO.23, Mine Road,LL 235
23-5-5454
1 5 0 2 9000
According to the above info, we know the file has John's related record and Paul's related one, and Mary's related one.7000,6000 and 9000 are their respective salaries.
For each record,create an object and add it to ArrayList.
Having created all objects, write those objects to a binary where those whose salaries are over 6000.
Again, display the name of them.
-----------------------------------------------
For the above,
� Do I have to implement StringTokenizer() to make apart each person ?
If so,how ? I guess each record span four lines. So I cut out four lines for each record ?
� How can I compare their salaries ?
To do so,I think I have to use StringTokenizer again.