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 4 of 4

Thread: help with statements to keep track of names and scores.

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default help with statements to keep track of names and scores.

    Project2.pdf (instructions)

    I have to write a program(instructions attached) to read in a file with golf scores and names, i am currently trying to get if statements to keep track of the best scores over 18 and under 18, but i cant seem to get it to work. I also attached a text document with the problem area between the asterisks. any help would be greatly appreciated.
    Thanks (code) java code.txt


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: help with statements to keep track of names and scores.

    What have you tried?

    Post your code and your questions here on the forum.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Mar 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: help with statements to keep track of names and scores.

    the scores of the first and second place adults come out fine, but the third place is wrong, and also all the names show up as "abc" which i previously declared them as, i am unsure if i'm completely wrong on doing so, but i was unsure. Thanks

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: help with statements to keep track of names and scores.

    Sorry, I forgot to ask this:
    Please edit your post and wrap your code with
    [code=java]
    <YOUR CODE HERE>
    [/code]
    to get highlighting and preserve formatting.

    all the names show up as "abc"
    Where are the values of the variables changed? Is the code that is supposed to change the values executed?
    If you don't understand my answer, don't ignore it, ask a question.

  5. The Following User Says Thank You to Norm For This Useful Post:

    CleaVer (March 7th, 2013)

Similar Threads

  1. use array of scores to calculate an average
    By littlebit45 in forum Other Programming Languages
    Replies: 1
    Last Post: November 30th, 2012, 03:25 PM
  2. [SOLVED] Keeping Track
    By Nuggets in forum Loops & Control Statements
    Replies: 2
    Last Post: April 15th, 2012, 05:37 PM
  3. keep track of objects
    By keep smiling in forum Java Theory & Questions
    Replies: 4
    Last Post: February 20th, 2012, 03:44 PM
  4. How to get scores from user in Canvas J2ME?
    By elenora in forum Java ME (Mobile Edition)
    Replies: 0
    Last Post: April 4th, 2011, 04:10 AM
  5. Arcade scores reset
    By JavaPF in forum The Cafe
    Replies: 1
    Last Post: July 3rd, 2010, 05:31 PM