1 Reply Latest reply: Oct 21, 2012 7:10 PM by Jörg RSS

    Java program

    969679
      Hello,
      I want to ask Your help, if someone could help me I'll be very thankful.

      I need to make Java program which can read from 2 files and comapre information from them.
      Task: Enter music style by keyboard and get information: How many sponsors(cities which support) have this style of music? Who are sponsors of this music style(which cities)? How many concerts are organized in city which support this style of music? (For ex.: New York support Pops style (from 1st file) and Pops concert are organized in New York (from 2nd file))

      I have 2 text files for example:
      New York // city
      Hard rock // music style which support this city
      Pops // music style which support this city
      //empty string
      Mexico // city
      Pops // music style which support this city
      Trance // music style which support this city
      //empty string
      .....
      .....
      .....
      At all will be 10 cities in list
      And second file:
      Pops // Music style
      Dance 4 ever // Name of concert
      New York // city
      //empty string
      Trance // Music Style
      Feel free // Name of concert
      Mexico // city
      //empty string
      .....
      .....
      .....
      At all will be 10 music styles in list
      If someone have time, please help me. I need anything what you can help me, parts of codes, ideas how to make It, anything.

      Thank you.
        • 1. Re: Java program
          Jörg
          Are you allowed to use and do you have a DBMS? If yes, create a city and a concert table and read the files into the db. Then you can query the db to your heart's content.
          If not, one way could be to read the data of the first file into a 2-dimensional String array and the data of the 2nd file into a 3-dimensional String array. Then you have to loop through both arrays to find/count what you are looking for.