5 Replies Latest reply: Sep 29, 2008 3:16 PM by 807589 RSS

    A java application that grades student's performance in an examination.

    807589
      The program should use the following information. Marks Grade >=90 A 80 – 89 B 70 – 79 C 60 – 69 D <=59 Fail Indicate how many students have passed and also the number of students who have failed.

      This is what i got so far:
      /*
      * StudentGrade.java
      *
      * Created on 26 September 2008, 13:56
      *
      * To change this template, choose Tools | Options and locate the template under
      * the Source Creation and Management node. Right-click the template and choose
      * Open. You can then make changes to the template in the Source Editor.
      */

      /**
      *
      * @author Win
      */
      import java.util.Scanner;
      public class StudentGrade {

      /** Creates a new instance of StudentGrade */
      public StudentGrade() {
      }

      /**
      * @param args the command line arguments
      */
      public static void main(String[] args) {
      Scanner input= new Scanner(System.in);
           int grade;
           int passes=0;
           int failures=0;
           int studentCounter=1;
           int result;
           
           System.out.println("Enter Grade");
           grade=input.nextInt();
           if(grade>=90)
                System.out.println("A");
                else
                     if(grade>=80)
                     System.out.println("B");
                     else
                     if(grade>=70)
                     System.out.println("C");
                     else
                     if(grade>=60)
                     System.out.println("D");
                     else
                     System.out.println("F");
      while(studentCounter<=20)
                {
                System.out.print("Enter result(A,B,C,D=passes,F=Failures");
                result=input.nextInt();
                if(result==A,B,C,D)
                passes=passes+1;
           else
                failures=failures+1;
      studentCounter=studentCounter+1;
                }
      System.out.println("Passed:%\nFailed:%\n",passes,failures);
      }
      }


      please help!!!!!!