Ask your own question, for FREE!
Computer Science 15 Online
OpenStudy (anonymous):

Write a Java program to calculate the grade of the student using the below criteria. Grade "Excellent": Marks>75 Grade "Satisfactory": 75>Marks>50 Grade "Needs Improvement": 50>Marks>40 Grade "Failing": Marks<40

OpenStudy (konradzuse):

this is actually extremely easy using a case statement... How much do you know about Java?

OpenStudy (anonymous):

Just started taking a Java class in January. I can't get this program to work. Can U help?

OpenStudy (konradzuse):

post what you have please.

OpenStudy (anonymous):

class Grade { public static void main(String args[]) { int A, B, C, D, F;

OpenStudy (konradzuse):

ok a few things. 1 it's String[] args 2. your grades aren't A-F Grade "Excellent": Marks>75 Grade "Satisfactory": 75>Marks>50 Grade "Needs Improvement": 50>Marks>40 Grade "Failing": Marks<40 They are "Excellent, Sat, etc. You need to do if statements. int mark; if(mark > 75) { system.out.println("Excellent"); } else if(.......) ...... ... ...

OpenStudy (konradzuse):

now does it work?

OpenStudy (anonymous):

Yes it does..

OpenStudy (konradzuse):

Well good show me lad! Welcome to the programming world.

OpenStudy (anonymous):

All I needed was to get pointed in the right direction. Thanks again!

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!