SHARE
TWEET

Untitled

a guest May 19th, 2017 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.*;
  2.  
  3. public class Course {
  4.  
  5.    
  6.     public static void evaluate(){
  7.         int subject=0 ;
  8.         int Assessment1;
  9.         int Assessment2 ;
  10.         int Totalmark ;
  11.         String grade = "";
  12.          
  13.         Scanner reader = new Scanner (System.in);
  14.        
  15.         while (subject3){
  16.            
  17.             System.out.println("Collecting information for subject");
  18.             System.out.println("Enter mark out of 50 for Assessment Task 1");
  19.              Assessment1= reader.nextInt();
  20.         while (Assessment1 <0 || Assessment1>50){
  21.             System.out.println("Invalid mark. Please re-enter the mark");
  22.             Assessment1= reader.nextInt();
  23.         }
  24.             System.out.println("Enter mark out of 50 for Assessment Task 2");
  25.             Assessment2= reader.nextInt();
  26.         while (Assessment2 <0 || Assessment2 >50){
  27.             System.out.println("Invalid mark. Please re-enter the mark");
  28.             Assessment2= reader.nextInt();
  29.             }
  30.             Totalmark = Assessment1 + Assessment2 ;
  31.             if (Totalmark < 50)
  32.             {
  33.                 System.out.print(Totalmark);
  34.                 System.out.println("NN");
  35.             } else if (Totalmark >50 || Totalmark <=59 ) {
  36.                 System.out.print(Totalmark);
  37.                 System.out.println("PA");
  38.            
  39.             } else if (Totalmark >60 || Totalmark <=69)
  40.             { System.out.print(Totalmark);
  41.                 System.out.println("CR");
  42.            
  43.             } else if (Totalmark >70 || Totalmark <=79){
  44.                 System.out.print(Totalmark);
  45.                 System.out.println("DI");
  46.            
  47.             }
  48.             else
  49.             { System.out.print(Totalmark);
  50.             System.out.println("HD");
  51.            
  52.             }
  53.             subject++;
  54.  
  55.    
  56.            
  57.            
  58.        
  59.            
  60.         }
  61.        
  62.     }
  63.  
  64. }
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top