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

Thread: Hey Everyone!

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Hey Everyone!

    It's great to see such an active community. I came to the forum with multiple questions. I am a college student at Trine University and am seeking help on a program. If anyone is willing to help you can message me. I am not seeking any exact answers, but any help would be greatly appreciated; possibly for a certain area of the code.

    The code I am writing is posted below.

    Write a program that reads all records from a file named input.txt in the following format [15 points]

    studentId studentName gpa
    studentId studentName gpa

    (studentid is integer, studentName is a two word string and gpa is a double value).

    The program should count the number of records read from the file and the average gpa of the class. The program should also count how many students have gpa greater than 3.0. Output all the information in proper format (use DecimalFormat class). Follow the example 6.2 from the textbook to read data from file. Do not make any assumptions about the file other than what is mentioned above.

    The file input.txt has to be located in your project folder under Netbeans Projects, so if your project name is Homework5 then file input.txt should be in the folder (Netbeans Projects\Homework5), not inside build directory.

    Extra Credit:Find and print the max gpa score

    Feel free to guide me through this, as I am absolutely lost on this one. I don't think we have touched up on file reading enough yet in order to write this program. Once again, any help would be appreciated.
    -Chris Messersmith


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Hey Everyone!

    Its hard to guide without knowing your experience, what you've tried, and where exactly you are stuck. Being lost is one thing, asking how to read a file is another (easily answerable question). The following link is a great explanation for breaking problems down http://www.javaprogrammingforums.com...e-posting.html
    Lastly, I have moved your thread to a more appropriate topic so it gets the widest and most appropriate audience.

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Hey Everyone!

    And please do not double post. I am locking this thread. Please keep all correspondences to a single thread (your other thread)
    http://www.javaprogrammingforums.com...ting-data.html