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: GPA- Need to display having issues

  1. #1


  2. #2
    Member
    Join Date
    May 2011
    Location
    west palm beach, FL
    Posts
    189
    My Mood
    Tired
    Thanks
    41
    Thanked 11 Times in 10 Posts

    Default Re: GPA- Need to display having issues

    can you post the errors you are getting?

  3. #3
    Junior Member
    Join Date
    Jul 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: GPA- Need to display having issues

    These are the error messages:

    GradePoint2.java:40: error: <identifier> expected
    average = total / count;
    ^
    GradePoint2.java:41: error: <identifier> expected
    System.out.printf("\nThe GPA is : " + average );
    ^
    GradePoint2.java:41: error: illegal start of type
    System.out.printf("\nThe GPA is : " + average );
    ^
    GradePoint2.java:41: error: ')' expected
    System.out.printf("\nThe GPA is : " + average );
    ^
    GradePoint2.java:41: error: ';' expected
    System.out.printf("\nThe GPA is : " + average );
    ^
    GradePoint2.java:41: error: illegal start of type
    System.out.printf("\nThe GPA is : " + average );
    ^
    GradePoint2.java:41: error: <identifier> expected
    System.out.printf("\nThe GPA is : " + average );
    ^
    GradePoint2.java:41: error: ';' expected
    System.out.printf("\nThe GPA is : " + average );
    ^
    GradePoint2.java:42: error: reached end of file while parsing
    }
    ^
    9 errors

  4. #4
    Junior Member
    Join Date
    Jul 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: GPA- Need to display having issues

    I fix my errors. the code below was not wrapped in the method.

    average = total / count;
    System.out.printf("\nThe GPA is : " + average );

    My program runs good but the calculation for the GPA is off.

Similar Threads

  1. troubleshooting GPA Calculator
    By uswhovian in forum What's Wrong With My Code?
    Replies: 9
    Last Post: March 18th, 2013, 04:23 PM
  2. How to calculate GPA
    By leonne in forum What's Wrong With My Code?
    Replies: 4
    Last Post: November 20th, 2012, 01:37 PM
  3. Issues with my ordering program - if statement issues?
    By Shenaniganizer in forum What's Wrong With My Code?
    Replies: 5
    Last Post: October 31st, 2012, 10:17 PM
  4. GPA Calculation Program using an input file
    By ddk1992 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: November 6th, 2011, 05:28 AM
  5. GPA calc code... HELP
    By ber1023 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 13th, 2009, 11:20 PM