hello guys...
can you help me to find coding for grading system for my new assingment...( grade n grade point)
grade A= 4.00
A- = 3.70
B+ = 3.50
B = 3.00
B- = 2.67
C+ =2.50
C = 2.00
C- = 1.67
D+ = 1.33
D = 1.00
E = 0.00
its must cout for the grade point..when the user/students enter the grade,the cout must be the grade point??did you get my question...I'm a malay student so my english is not very well...

Write a method that accepts an integer (the grade) and then uses a mathematical calculation to return the grade point. It's your job to figure it out though. But are you supposed to use Java to do your assignment? Because "cout" and "cin" are in C and C++, not in Java.

Write if statements. Have a method that takes as argument what you want and return the other. You say that the uses enters the grade and expects to see the grade point

public void nameTheMethod(Stirng grade) {
   if ("A".equals(grade)) {
          System.out.println(4.00);
   } else if ("A-".equals(grade)) {
        System.out.println(3.7);
   } else if () ...
}

Or better:

public double nameTheMethod(Stirng grade) {
   if ("A".equals(grade)) {
          return 4.00;
   } else if ("A-".equals(grade)) {
        return 3.7;
   } else if () ...
}

I think there is probably a way to calculate it without if-statements... I would look up the math to translate a number grade out of 100 to the gpa system before coding tons of if-statements unnecessarily.

commented: I agree. But I believe that it would be difficult to be done by him judging on his level +6

thanks guys 4 the help....
this program is not for the java it actually for c++ program..
let me explain to yo..
in this coding..the users must enter the grade.ex:grade A,then it must appear in grade point which its 4.00....so that means we must cin the grade point...but I still did'nt get the correct coding....can you guys help me by giving the full coding for this program...

thanks guys 4 the help....
this program is not for the java it actually for c++ program..
let me explain to yo..
in this coding..the users must enter the grade.ex:grade A,then it must appear in grade point which its 4.00....so that means we must cin the grade point...but I still did'nt get the correct coding....can you guys help me by giving the full coding for this program...

I already provided code that does that and kvass offered a more clever solution.
Do some studying in order to find the right C++ commands that do what we describe, or post to the C forum of this site.
Also better explain at what part exactly are you having problems with.
But don't expect anyone to give the answer if you don't show some effort

well said javaAddict xD

hai guys.. I already do it..but it doesnt work..I do not know where the mistake...this is what I've done so far..

/* Program to find out students grade pointer*/
#include<iostream.h>
void main()
{
char grade[2];
//grade  = 0;
cout<< " please enter your grade : ";
{
if (grade =="A")
cout<< grade;//4.00";
else if (grade =="A-")
cout<< "3.70";
else if (grade == "B+")
cout<< "3.50";
else if (grade == "B")
cout<< "3.00";
else if (grade == "B-")
cout<< "2.67";
else if (grade == "C+")
cout<< "2.50";
else if (grade == "C")
cout<< "2.00";
else if (grade == "C-")
cout<< "1.67";
else if (grade == "D+")
cout<< "1.33";
else if (grade == "D")
cout<< "1.00";
else if (grade == "E")
cout<< "0.00";
}
//return 0;
}

Thread was reposted here

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.