Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 11 of 11

Thread: Is this the correct way?

  1. #1
    Junior Member
    Join Date
    Oct 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Is this the correct way?

    not more nesecerray
    Last edited by Durabrite; October 8th, 2014 at 03:16 PM.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 697 Times in 679 Posts

    Default Re: Is this the correct way?

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

    Please post your code correctly using code or highlight tags per the above link.

    Post some sample runs. Make up runs that are easy to score to verify if the program's results are correct. Then make up more difficult ones and/or corner cases. What does a tie look like, how many ways are there to tie, etc.

  3. #3
    Junior Member
    Join Date
    Oct 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Is this the correct way?

    Hello,
    Just posted with the highlights!
    Thanks for this!

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 697 Times in 679 Posts

    Default Re: Is this the correct way?

    I don't get this logic:

    pointsClubA = pointsClubA + points;

    Can you describe what you're doing? Is it the top finisher gets 31 points and each finisher thereafter gets one point less that the previous finisher? I'll think about that for a bit, but it seems too heavily weighted towards the top finishers.

  5. #5
    Junior Member
    Join Date
    Oct 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Is this the correct way?

    Hello,
    Yes the top finisher get 31points and the last one get 1point. So yes every finisher get one point less.
    Its the only system that I can find out so that I can have a winning team with the runners in the best position.
    If there is a better solution, all ideas are welcome.

  6. #6
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 697 Times in 679 Posts

    Default Re: Is this the correct way?


  7. #7
    Junior Member
    Join Date
    Oct 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Is this the correct way?

    So you suggest instead of having the runner in position 1 getting the most points and every runner finishing after him gets 1 points less.... only the top 20 runners are having points. And position nr1 gets 1 point and every finisher after him gets 1 point more? And the team with the most points wins?

    Am I getting this correctly?

    Greetings

  8. #8
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 697 Times in 679 Posts

    Default Re: Is this the correct way?

    You said your system was the only one you could find. I'm showing you another but not suggesting you do anything differently. And, no, you did not correctly describe the scoring system I pointed to.

  9. #9
    Junior Member
    Join Date
    Oct 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Is this the correct way?

    How would you describe it then?
    Kind regards.

  10. #10
    Junior Member
    Join Date
    Oct 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Is this the correct way?

    I'm trying to understand you're code, but it's complicated and it lacks structure. But what I think you're trying to do:

    - User fills in 'backnumber' from top of list.
    - System checks at what position the player is.
    - System calculates ammount of points granted to player.
    - 'backnumber' payer gets assisgned an ammount of points.
    - User types in next 'backnumber' and repeats step 1-4 untill all 30 backnumbers have been submitted.
    - System checks which team has most points.
    - System prints out winning team Letter.

    Is this correct?

  11. #11
    Junior Member
    Join Date
    Oct 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Is this the correct way?

    That is indeed correct.

Similar Threads

  1. Not getting the correct output
    By Ashish S in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 26th, 2012, 03:56 AM
  2. is my code correct?
    By leonne in forum What's Wrong With My Code?
    Replies: 0
    Last Post: November 12th, 2012, 04:36 PM
  3. Getting collision correct..
    By Randor in forum What's Wrong With My Code?
    Replies: 0
    Last Post: November 6th, 2012, 02:49 PM
  4. Can anybody correct the code?
    By ur2cdanger in forum What's Wrong With My Code?
    Replies: 8
    Last Post: October 24th, 2011, 12:50 AM
  5. Can anybody correct the code?
    By ur2cdanger in forum JDBC & Databases
    Replies: 1
    Last Post: October 17th, 2011, 07:07 PM