Page 2 of 2 FirstFirst 12
Results 21 to 37 of 37
  1. #21
    joshdgreen's Avatar
    joshdgreen is offline Senior Member
    Join Date
    Oct 2010
    Location
    Colorado Springs, CO
    Posts
    212
    Rep Power
    4

    Default

    Wow, that sucks man. Are you familiar with loops and such to complete the program the right way?
    Sincerely, Joshua Green
    Please REP if I help :)

  2. #22
    socboy6579 is offline Member
    Join Date
    Oct 2010
    Posts
    81
    Rep Power
    0

    Default

    i know. im so mad. i dont know what im going to do. this program is due tomorrow. but if i were have to use loops. whould i need a scanner. because i could just put numerical values for a,b,c,d,f and then find the average of letter grades that you output. correct?

  3. #23
    joshdgreen's Avatar
    joshdgreen is offline Senior Member
    Join Date
    Oct 2010
    Location
    Colorado Springs, CO
    Posts
    212
    Rep Power
    4

    Default

    You still need Scanner either way to input any data at all. I tried coding the program myself and am almost done with it actually. It is more advanced stuff than you probably know how to do at the moment.
    Sincerely, Joshua Green
    Please REP if I help :)

  4. #24
    socboy6579 is offline Member
    Join Date
    Oct 2010
    Posts
    81
    Rep Power
    0

    Default

    would you mind to show me your program? to give me an idea. im trying it right now. but i always seem to get stuck. these programs are ahead of what we learn idk why our teachers do this.

  5. #25
    joshdgreen's Avatar
    joshdgreen is offline Senior Member
    Join Date
    Oct 2010
    Location
    Colorado Springs, CO
    Posts
    212
    Rep Power
    4

    Default

    When I'm done I will give you hints and help, but I won't just give you the code.
    Sincerely, Joshua Green
    Please REP if I help :)

  6. #26
    socboy6579 is offline Member
    Join Date
    Oct 2010
    Posts
    81
    Rep Power
    0

    Default

    okay thank you.. would we use both for and while loops ?

  7. #27
    joshdgreen's Avatar
    joshdgreen is offline Senior Member
    Join Date
    Oct 2010
    Location
    Colorado Springs, CO
    Posts
    212
    Rep Power
    4

    Default

    Probably, although you can use them interchangeably.
    Sincerely, Joshua Green
    Please REP if I help :)

  8. #28
    socboy6579 is offline Member
    Join Date
    Oct 2010
    Posts
    81
    Rep Power
    0

    Default

    could you give me a hint on how to get the letter grades to be assigned to a numerical GPA value using the loops. im stuck there

  9. #29
    joshdgreen's Avatar
    joshdgreen is offline Senior Member
    Join Date
    Oct 2010
    Location
    Colorado Springs, CO
    Posts
    212
    Rep Power
    4

    Default

    Here's a little something to get you started:

    Java Code:
    Scanner keyboard = new Scanner(System.in);
    
    double classCount = 0;
    boolean valid = true;
    // More variables...
    		
    while(valid == true)
    {
         //Keep getting grades until a "non-grade" is entered.
         //Keeping track of classCount as good grades are entered.
    }		
    
    for(int i = 0; i < classCount; i++)
    {
         //Do manipulations and place your if statements here.
         //Keep a running total for the GPA.
    }
    		
    // Calculate the total GPA
    // Output appropriately
    Sincerely, Joshua Green
    Please REP if I help :)

  10. #30
    joshdgreen's Avatar
    joshdgreen is offline Senior Member
    Join Date
    Oct 2010
    Location
    Colorado Springs, CO
    Posts
    212
    Rep Power
    4

    Default

    Quote Originally Posted by socboy6579 View Post
    could you give me a hint on how to get the letter grades to be assigned to a numerical GPA value using the loops. im stuck there

    You would check to see what grade it is, and then add to the GPA sum appropriately.
    Sincerely, Joshua Green
    Please REP if I help :)

  11. #31
    joshdgreen's Avatar
    joshdgreen is offline Senior Member
    Join Date
    Oct 2010
    Location
    Colorado Springs, CO
    Posts
    212
    Rep Power
    4

    Default

    Keep posting updated portions of you code so we can see where you are at.
    Sincerely, Joshua Green
    Please REP if I help :)

  12. #32
    socboy6579 is offline Member
    Join Date
    Oct 2010
    Posts
    81
    Rep Power
    0

    Default

    what is that for loop for again? im sorry im just very confused

  13. #33
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  14. #34
    joshdgreen's Avatar
    joshdgreen is offline Senior Member
    Join Date
    Oct 2010
    Location
    Colorado Springs, CO
    Posts
    212
    Rep Power
    4

    Default

    You don't need it, I was just giving something to look at to give you ideas.
    Sincerely, Joshua Green
    Please REP if I help :)

  15. #35
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    I noticed the yahoo post some time ago - but is it a cross post of the OP? Well I guess only the OP can say...

    There are a number of instances of this problem (wording always the same) and questions about it across the web from 2002 onwards.

  16. #36
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by pbrockway2 View Post
    I noticed the yahoo post some time ago - but is it a cross post of the OP? Well I guess only the OP can say...


    That yahoo question was posted today and is almost word-for-word the original post.

  17. #37
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default

    Last edited by DarrylBurke; 10-25-2010 at 09:33 AM. Reason: Noticed that link to Yahoo! cross post is already in the thread

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Using scanner for CSV
    By getName() in forum Advanced Java
    Replies: 7
    Last Post: 06-20-2010, 04:33 PM
  2. Help With Scanner
    By jtmoney0511 in forum New To Java
    Replies: 10
    Last Post: 10-12-2009, 11:24 PM
  3. Need help with scanner.
    By mainy in forum New To Java
    Replies: 3
    Last Post: 07-28-2009, 02:11 PM
  4. Scanner questions
    By Suzanne1187 in forum New To Java
    Replies: 12
    Last Post: 03-12-2009, 02:31 AM
  5. need help with scanner
    By whiterex in forum New To Java
    Replies: 1
    Last Post: 04-22-2008, 01:41 PM

Posting Permissions

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