Results 1 to 2 of 2
  1. #1
    Ajay15 is offline Member
    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0

    Default Hi I am New to JAVA.......... need URGENTLY to complete the program

    Write a program for displaying data of individual teams:

    team name, number of matches played, overall points, overall goals scored/ conceded, points in home matches, points in away matches, listing of match results against other teams

    The program should repeatedly read a team name from console and display the results to console. It should have options for setting the order in which match results are sorted, e.g. by date, by opponent name, or grouped into home and away matches.

    the data I need to fetch from " leagueResults2010-11.csv(as per the attachment)"for fetching am able to write the program but not able understand how to get on remaining output......

    My Code

    import java.io.BufferedInputStream;

    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;

    public class Leaguetable {

    public static void main(String [] args) throws Exception{
    //Create file object
    File file=new File("C://FileIO//leagueResults2010-11.csv");

    BufferedInputStream bin=null;
    try
    {
    //create FileInputStream object \
    FileInputStream fin=new FileInputStream(file);
    bin=new BufferedInputStream(fin);
    while (bin.available()>0)
    {
    System.out.print((char)bin.read());
    }
    }
    catch(FileNotFoundException e)
    {
    System.out.println("File Not found"+e);
    }
    catch(IOException ioe)
    {
    System.out.println("Exception while reading file"+ioe);
    }
    finally
    {
    try
    {
    if(bin!=null);
    bin.close();
    }catch(IOException ioe)
    {
    System.out.println("Error while closing the stream:"+ioe);

    }
    }
    }
    }

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,585
    Rep Power
    12

Similar Threads

  1. Java Specialist urgently needed
    By Syntax123 in forum Jobs Offered
    Replies: 0
    Last Post: 11-19-2011, 09:39 PM
  2. Replies: 2
    Last Post: 04-23-2011, 04:27 PM
  3. Time it took to run and complete a program.
    By AcousticBruce in forum IntelliJ IDEA
    Replies: 3
    Last Post: 12-17-2010, 06:31 PM
  4. need help urgently new to java
    By deecaf in forum New To Java
    Replies: 10
    Last Post: 07-04-2009, 05:47 AM
  5. Replies: 0
    Last Post: 03-12-2008, 03:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •