The Artima Developer Community
Sponsored Link

Java Answers Forum
hello

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Gopala Krishnan

Posts: 1
Nickname: gops
Registered: Sep, 2002

hello Posted: Sep 10, 2002 10:17 AM
Reply to this message Reply
Advertisement
sir/madam
i want a java program which will search words from a file and sort them in alpabetical order

The input file will be like this:
@z: architecture\32 (main heading)
@a: World of animals(sub heading)
@b: hai welcome
@c: william black( author)
@d: contents (means some paragraphs)
@e: some notes(same as contents)
@f: 234 4455 345pp US 5.65 Aug. 2002

like this many main headings will be there and many subheadings will come.

i have to sort each and every text shown above. first i have to find @z: and i have to read the first five letters after the ":" in "@z:" and sort the main headings in alphabetucal order. I have to extract all the characters after the "\" from the main heading and i have to sort that according to the alphabetical order(numbers and letters will come). Then i have to go for @a:, @b:, @c:, etc and i have to follow the same procedure(i.e. checking the first five letters, and sorting accordingly. I am sure that the even if the first 4 letters are same the last one will not be).

In @f: i have to extract the 234 4455 and then the 345pp,US 5.65, Aug. 2002. The US 5.65 must be converted to US$5.65 and Aug. 2002 to 8/2002.

The output file for the input file i specified must be in the following format

architecture
World of animals
hai welcome
william black
contents (means, some paragraphs)
some notes(same as contents)
(32) 234 4455 US$5.65 8/2002

The architecuture may have subheadings and all the subheadings must be sorted
for example, if the subheading is "yoke frame" then then it has to come next to the subheading "world of animals". In this case we have to ignore the main heading. The main heading must occur once only.

Some times the next main heading consists of \pk so, accordingly we have to arrange.

If you are providing me the coding for this it will be very useful
thank you
looking forward for the reply
gopal

Topic: Plz help me with some answers Previous Topic   Next Topic Topic: Quotes in Command Line Arguments?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use