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: (Total Beginner): Any suggestions on how to do that?

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    6
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default (Total Beginner): Any suggestions on how to do that?

    Ok so what I want to do is to make a "grade system " for students so that when I insert the mark (number) it will give me a string with a grade...like

    For mark 30 and below the grade will be "Fail"
    For mark 46 and above the grade will be "blablabla"
    for mark 60 and above the grade will be "ballhdfhsdh"
    and so on.... till 100

    The way I want to do that is by creating a method with the mark as a parameter and then use the method on my main to produce the results....

    How am I suppose to do that?
    Could you help me pls?


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,254
    My Mood
    Hungover
    Thanks
    142
    Thanked 617 Times in 528 Posts

    Default Re: (Total Beginner): Any suggestions on how to do that?

    Word to the wise- "pls" is not a word.

    What have you tried? Where are you stuck?

    Recommended reading: How to Program (stuck on homework? READ THIS BEFORE POSTING)
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Junior Member
    Join Date
    Jan 2012
    Posts
    6
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Re: (Total Beginner): Any suggestions on how to do that?

    Quote Originally Posted by KevinWorkman View Post
    Word to the wise- "pls" is not a word.

    What have you tried? Where are you stuck?

    Recommended reading: How to Program (stuck on homework? READ THIS BEFORE POSTING)
    Wow I'm actually not taking any lessons...I just want to start java myself so I may not know some basic staff like the steps in your post.(That are really helpful and a huge thanks for that!)

    Yes I followed your steps and solved my problem...Is there a way to delete that thread ?
    Last edited by ggmike; January 5th, 2012 at 02:08 PM.

  4. #4
    Member
    Join Date
    Dec 2011
    Location
    United States
    Posts
    94
    My Mood
    Amused
    Thanks
    5
    Thanked 8 Times in 8 Posts

    Default Re: (Total Beginner): Any suggestions on how to do that?

    I was once a newbie like you and I do not blame you for asking questions like you did. I have a few suggestions for you: First, a problem like that can be solved using a series of [if .... else ] statements which is quite longer to do and the second choice is to use [a switch ] statement which is simple but powerful. If you do not know what a switch or if statements are, use Google to find tutorials out there. I hope that this will help you explore more ways of solving the same problem. Take care

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

    ggmike (January 6th, 2012)

Similar Threads

  1. (TOTAL BEGINNER)Stupid problem but still...
    By ggmike in forum What's Wrong With My Code?
    Replies: 7
    Last Post: January 5th, 2012, 09:01 PM
  2. JComboBox suggestions/help how can i do this?
    By derekxec in forum AWT / Java Swing
    Replies: 2
    Last Post: August 24th, 2011, 02:58 PM
  3. Replies: 1
    Last Post: May 3rd, 2011, 09:46 AM
  4. Suggestions how to do this?
    By aussiemcgr in forum Java Theory & Questions
    Replies: 1
    Last Post: September 2nd, 2010, 12:18 PM

Tags for this Thread