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: Creating a java program to calculate what grades i need?

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Creating a java program to calculate what grades i need?

    Hi guys im obviously new here, im on a lot of forums for various things and im in my first semester of Java programming so time to join in a java forum! I was wanting to make a little personal program for myself and i hope this is close to the right place to put it! \ Im always trying to find what grades do i need in this class to get an A or whats my minimum for a B etc, so heres kind of what im looking to make the program do,

    First i want to input how many grades i have for the class total

    then id like to ask for the maximum possible points for each assignment

    Then ask how many of the assignments have been done and graded so far

    then ask for the amount of points i got on each of the graded ones

    then id like it to do one of two things, either list out what minimum grades i need for each letter grade A, B, C D F OR ask what letter grade i want to see my minimums for! Id like to print an error if lets say i cant make an A and i want to see the grades for an A then i want it to say already to low and repeat asking me what grade id like to get

    id also like it to do this in joptionpane and be able to run it as an japplet!

    Basically im curious if maybe someone has seen one like this out there or has done programs similar to this that wouldnt mind sharing with me! or a base program that i could work on from there or something, or of course i know some people who can throw code down like no other haha i however understand the basics of how they work and like running htem and using them and im better at working on them after ive seen something similar done i guess!

    ive posted code below for my starting out!

    Thanks!!


  2. #2
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: Creating a java program to calculate what grades i need?

    It would be easy to write something like this, but instead of asking others for a base program, why not just try to create it on your own first? You'll get far more out of the exercise this way, and then if you get stuck and come back with questions, you'll understand your own code much better than our code.

    Note that for a "personal project" it smells an awful lot like an academic assignment. Nice try but no dice.

  3. #3
    Junior Member
    Join Date
    Nov 2012
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Creating a java program to calculate what grades i need?

    lol okay so maybe you might have caught me...... in my defense he told us to make a personal program that we would use haha so i have started working on it, and for my first part that im a little stumped is here


    import java.util.Scanner;
     
     
    public class Prog5 {
     
    	public static void main(String args[])
    	{
    		int numberOfGrades;
    		int grades = 0;
    		int totalPoints;
    		int points;
     
     
     
     
     
    		Scanner input = new Scanner( System.in );
     
    		System.out.println("How many total grades will there be? ");
    		numberOfGrades = input.nextInt();
     
    		do            
    		{
    		 grades++;
     
    		System.out.println("Points possible for assignment " + grades + ":");
    		points = input.nextInt();
     
    		}while (grades < numberOfGrades);
     
    		totalPoints = points;
     
    		System.out.println(totalPoints);
     
     
     
    	}
    }

    how can i get it to add points to the former number of points ect ect ?

Similar Threads

  1. Why wont my program calculate sales tax?
    By scholaryoshi in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 28th, 2012, 08:30 PM
  2. Help with creating a dice rolling program in Java
    By lilmiss in forum Object Oriented Programming
    Replies: 4
    Last Post: October 26th, 2011, 09:27 PM
  3. Calculate federal taxes program! Help!
    By ocmjt in forum What's Wrong With My Code?
    Replies: 13
    Last Post: March 11th, 2010, 11:25 AM
  4. Creating program Blackjack - Dr.Java
    By TheUntameable in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 20th, 2010, 12:54 PM
  5. Simple java program to calculate wall covering of a room
    By parvez07 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: August 22nd, 2009, 03:31 PM