Machine Problem

 Write a program that will ask the user to give test score,   and then the program will convert the given test score into  grade numerical equivalent, display the results on the screen.

  I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Program Listing

package test;
/* grade.java
 * 
 * Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
 * www.jakerpomperada.com and www.jakerpomperada.blogspot.com
 * jakerpomperada@gmail.com
 * Bacolod City, Negros Occidental Philippines
 * 
 * Machine Problem
 * 
 * Write a program that will ask the user to give test score, 
 * and then the program will convert the given test score into
 * grade numerical equivalent, display the results on the screen.
 * 
 */
import java.util.Scanner;

public class grade {
	
   public static void main(String[] args)
   {
      double  score;    // To hold a test score
      double grade;    

      // Create a Scanner object to read input.
      Scanner console = new Scanner(System.in);

      
      System.out.println("\n");
      System.out.println("\tTest Score Grade Equivalent in Java");
      System.out.println("\n");
      // Get the test score.
      System.out.print("\tEnter your numeric test score : ");
      score = console.nextDouble();

      // Calculate the grade.
 if (score >=98)
      {
         grade = 1.00;
      }
      else if (score >=95)
      {
         grade = 1.25;
      }
      else if (score >=94)
      {
         grade = 1.50;
      }
      else if (score >= 90)
      {
         grade = 1.75;
      }
      else if(score>=87)
      {
         grade = 2.00;
      }
      else if(score>=84)
      {
         grade =2.25;
      }
      else if(score>=81)
      {
         grade = 2.50;
      }
      else if(score>=76 &&  score <= 78)
      {
          grade =2.75;
      }
      else 
      {
           grade =3.00;
      }
      // Display the grade.
 	System.out.println("\n");
      System.out.println("\tYour grade is " + grade);
      console.close();
      System.out.println("\n");
      System.out.println("\tEnd of Program");
      System.out.println("\n\n");
   }
 }

Leave a Reply

Your email address will not be published.