Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.JOptionPane;
- import java.util.Scanner;
- public class revision {
- public int score;
- public String HD = "HD";
- public String DI = "DI";
- public String CR = "CR";
- public String PA = "PA";
- public String NN = "NN";
- public int getGrade() {
- System.out.println("enter your score.");
- Scanner percentage = new Scanner (System.in);
- return score = percentage.nextInt();
- }
- {
- if (score > 80 && score < 100)
- System.out.println(this.HD);
- else if (score >= 60 && score <= 79)
- System.out.println(this.DI);
- else if (score >= 50 && score <= 59)
- System.out.println(this.DI);
- else if (score >= 0 && score <= 49)
- System.out.println(this.NN);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement