Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: URGENT !!! I need help !!!

  1. #1
    icycold89 is offline Newbie
    Join Date
    Jan 2007
    Location
    S'pore
    Posts
    8
    Rep Power
    0

    URGENT !!! I need help !!!

    I need help with this ..
    i need to create a program for this but i don't know how to do ..
    PLEASE help ...
    Thanks ...
    would appreciate if any kind soul help ...



  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143
    First thing: identify clearly the information you need to collect.
    Second thing: identify clearly what you need to do with that information.
    Third thing: identify, you guessed it, clearly how you can store both sets of information.
    Fourth: write code to collect the information.
    Fifth: test that code to verify it works.
    Sixth: write code to compute additional information.
    Seventh: test that code to verify it works.

    My guess is that you are on step 1.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    AfTriX is offline Programming God
    Join Date
    Jan 2007
    Location
    Chicago
    Posts
    586
    Rep Power
    0
    Program seems to be pretty simple, I'll post you the answer once I've finished the coding. When do you need this program to be done?

  5. #4
    icycold89 is offline Newbie
    Join Date
    Jan 2007
    Location
    S'pore
    Posts
    8
    Rep Power
    0
    erm ... thanks a lot ..
    i need it by monday ..
    i'm so sorry that i replied so late.
    my e-mail is chocogurl89@gmail.com.
    Thanks a lot.

  6. #5
    AfTriX is offline Programming God
    Join Date
    Jan 2007
    Location
    Chicago
    Posts
    586
    Rep Power
    0
    You are Welcome.

    I was waiting for your response. And I'll start doing the program tomorrow morning. And hopefully I can reply you tomorrow.

    (Sometimes my methods may be lengthier but will be getting the proper output)

  7. #6
    icycold89 is offline Newbie
    Join Date
    Jan 2007
    Location
    S'pore
    Posts
    8
    Rep Power
    0
    Thanks you so much ...
    btw may i know wat program do u use for ya prgramming ?

  8. #7
    AfTriX is offline Programming God
    Join Date
    Jan 2007
    Location
    Chicago
    Posts
    586
    Rep Power
    0
    I also just started learning Java, not more than a week either. And for the moment I use only Notepad as my editor. Further thanks only after the code submission please. Don't worry it'll easily be done.

  9. #8
    icycold89 is offline Newbie
    Join Date
    Jan 2007
    Location
    S'pore
    Posts
    8
    Rep Power
    0
    hee , are u quite done with it yet ?

  10. #9
    AfTriX is offline Programming God
    Join Date
    Jan 2007
    Location
    Chicago
    Posts
    586
    Rep Power
    0

    Here;s the code

    Code:
    import java.io.*;
    
    class TriathlonTiming {
     public static void main (String [] args) throws Exception{
    
      InputStreamReader isr = new InputStreamReader(System.in);
      BufferedReader bf = new BufferedReader(isr);
    
      String[] names = new String[10];
      int[][] time = new int [9][10];
      int choiceNo=0;
    
      while (choiceNo != 4)
      {
    
      System.out.println("*************Triathlon Timing*************");
      System.out.println("1) Enter Participant's timing");
      System.out.println("2) Display all participant's timing");
      System.out.println("3) Display the Winner");
      System.out.println("4) Exit Program");
      System.out.println("******************************************");
      System.out.print("Please select your choice (1-4) : ");
    
      choiceNo=Integer.parseInt(bf.readLine());
    
      System.out.println("******************************************");
      System.out.println();
    
       if (choiceNo > 0 && choiceNo <= 4)
       {
        if (choiceNo == 1)
        {
         System.out.print("Enter No of Participants (max 10): ");
         int participantsNo=Integer.parseInt(bf.readLine());
         for (int count=0; count < participantsNo; count++ )
         {
          System.out.print("Enter athlate's name: ");
    
          String[] athlate = new String [participantsNo];
    
          names[count] = (bf.readLine());
    
    
          System.out.println("Enter timing for Swim : ");
          System.out.print("  No of hours : ");
          time[0][count]=Integer.parseInt(bf.readLine());
          System.out.print("  No of minutes : ");
          time[1][count]=Integer.parseInt(bf.readLine());
          while (time[1][count] > 59)
          {
           System.out.println(" Can't be more than 60, Please re-enter: ");
           System.out.print("  No of minutes : ");
           time[1][count]=Integer.parseInt(bf.readLine());
          }
          System.out.print("  No of seconds : ");
          time[2][count]=Integer.parseInt(bf.readLine());
          while (time[2][count] > 59)
          {
           System.out.println(" Can't be more than 60, Please re-enter: ");
           System.out.print("  No of seconds : ");
           time[2][count]=Integer.parseInt(bf.readLine());
          }
    
          System.out.println("Enter timing for Bike : ");
          System.out.print("  No of hours : ");
          time[3][count]=Integer.parseInt(bf.readLine());
          System.out.print("  No of minutes : ");
          time[4][count]=Integer.parseInt(bf.readLine());
          while (time[4][count] > 59)
          {
           System.out.println(" Can't be more than 60, Please re-enter: ");
           System.out.print("  No of minutes : ");
           time[4][count]=Integer.parseInt(bf.readLine());
          }
          System.out.print("  No of seconds : ");
          time[5][count]=Integer.parseInt(bf.readLine());
          while (time[5][count] > 59)
          {
           System.out.println(" Can't be more than 60, Please re-enter: ");
           System.out.print("  No of seconds : ");
           time[5][count]=Integer.parseInt(bf.readLine());
          }
    
          System.out.println("Enter timing for Run : ");
          System.out.print("  No of hours : ");
          time[6][count]=Integer.parseInt(bf.readLine());
          System.out.print("  No of minutes : ");
          time[7][count]=Integer.parseInt(bf.readLine());
          while (time[7][count] > 59)
          {
           System.out.println(" Can't be more than 60, Please re-enter: ");
           System.out.print("  No of minutes : ");
           time[7][count]=Integer.parseInt(bf.readLine());
          }
          System.out.print("  No of seconds : ");
          time[8][count]=Integer.parseInt(bf.readLine());
          while (time[8][count] > 59)
          {
           System.out.println(" Can't be more than 60, Please re-enter: ");
           System.out.print("  No of seconds : ");
           time[8][count]=Integer.parseInt(bf.readLine());
          }
         }
        }
    
        else if (choiceNo==2)
        {
         System.out.println("****************************************************************");
         System.out.println("Name\t\tSwim\t\tBike\t\tRun");
         System.out.println("****************************************************************");
         for (int i=0; i<10; i++)
         {
          if (names[i] != null)
           {
            System.out.print(names[i] + "\t\t" + time[0][i] + ":" + time[1][i] + ":" + time[2][i] + "\t\t" + time[3][i] + ":" + time[4][i] + ":" + time[5][i] + "\t\t" + time[6][i] + ":" + time[7][i] + ":" + time[8][i]);
    	System.out.println();
           }
         }
        }
       }
       else
        System.out.print("Selection should be 1 to 4 : ");
    
       System.out.println();
       System.out.println();
      }
     }
    }
    Last edited by AfTriX; 01-27-2007 at 10:05 AM. Reason: Update Code

  11. #10
    AfTriX is offline Programming God
    Join Date
    Jan 2007
    Location
    Chicago
    Posts
    586
    Rep Power
    0
    You only need to find out the first person. Its so simple. Just try it by your self.

Closed Thread
Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. I need an urgent help
    By Adeiza in forum C and C++
    Replies: 2
    Last Post: 03-22-2010, 07:44 AM
  2. urgent help plz
    By efim in forum PHP Development
    Replies: 1
    Last Post: 03-17-2010, 09:32 AM
  3. Pls help me, urgent very urgent. no joke.
    By salvate_me in forum C and C++
    Replies: 7
    Last Post: 10-10-2009, 07:26 PM
  4. little help ( urgent )
    By ahmed in forum C and C++
    Replies: 6
    Last Post: 10-29-2008, 07:22 PM
  5. urgent help please
    By radio86 in forum PHP Development
    Replies: 0
    Last Post: 10-04-2008, 05:09 PM

Tags for this Thread

Bookmarks

Posting Permissions

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