Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Java GimmeCode Homework
suppose i have a text file as data.txt has following content such as
12.12.12.12 "www.google.com"|"www.yahoo.com"|"www.rediffmail.com"
13.13.12.12 "www.yahoo.com"|"www.rediffmail.com"|"www.google.com"|"www.google.com"
14.14.12.12 "www.yahoo.com"|"www.rediffmail.com"|"www.yahoo.com"
I have another text file as token.txt has following content such as
"www.google.com" 100
"www.yahoo.com" 200
"www.rediffmail.com" 300
i want to make new file as result.txt that should contain the following data such as
12.12.12.12 100 200 300
13.13.12.12 200 300 100 100
14.14.12.12 200 300 200 
I want code in java language
Posted 17-Aug-12 5:34am
Edited 17-Aug-12 9:32am
v4
Comments
Wes Aday at 17-Aug-12 11:39am
   
It would appear that you have mistaken CodeProject for a jobs board. Perhaps you meant to go to www.vworker.com?
gladiatron at 17-Aug-12 11:44am
   
Chris Maunder should consider renaming "Code Project" to something else I suppose:) Some people seem to be interpreting as "Code for Project work"
Wes Aday at 17-Aug-12 11:46am
   
They just don't bother reading the guidelines that are displayed with each and every question.
Albert Holguin at 17-Aug-12 15:08pm
   
Reading!? ...that's overrated...lol :p
gladiatron at 17-Aug-12 11:40am
   
We don't do your homework or projects for you. If you want that service try www.vworker.com. Code Project is where programmers come together to discuss and solve problems not writing code for lazy people.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
 
Try it yourself, you may find it is not as difficult as you think!
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

This is actually trivial to do. You read your files, first building an index of strings to numbers, then parse your other file, and look up numbers from the strings. As others said, we're not here to do your job for you, attempt to do your own work and ask us for specific help, or tell your boss/teacher that programming is not for you.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 CPallini 375
1 Sergey Alexandrovich Kryukov 370
2 BillWoodruff 314
3 George Jonsson 279
4 OriginalGriff 257
0 OriginalGriff 5,030
1 CPallini 4,115
2 Sergey Alexandrovich Kryukov 3,554
3 George Jonsson 2,826
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 17 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100