Advertisement
Guest User

Untitled

a guest
Sep 21st, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1.  
  2. /**
  3. * Branson Grading Scale
  4. *
  5. * Jimmy Nguyen
  6. * 9/19/14
  7. */
  8. public class BransonGradingScale
  9. {
  10. public static void main(String[] args)
  11. {
  12. KeyBoardReader kb = new KeyBoardReader();
  13. System.out.print("Please enter the numberical average of a class: ");
  14. int grade = kb.getInt();
  15.  
  16. if ((grade > 0) && (grade < 100))
  17. System.out.println("This is an invalid input");
  18. else if ((grade >= 96) && (grade <= 100))
  19. System.out.println("You have an A+ in the class.");
  20. else if ((grade >= 92) && (grade <=95))
  21. System.out.println("You have an A in the class.");
  22. else if ((grade >= 88) && (grade <= 91))
  23. System.out.println("You have an A- in the class.");
  24. else if ((grade >= 84) && (grade <= 87))
  25. System.out.println("You have a B+ in the class.");
  26. else if ((grade >= 80) && (grade <= 83))
  27. System.out.println("You have a B in the class.");
  28. else if ((grade >= 77) && (grade <= 79))
  29. System.out.println("You have a B- in the class.");
  30. else if ((grade >= 74) && (grade <= 76))
  31. System.out.println("You have a C+ in the class.");
  32. else if ((grade >= 71) && (grade <= 73))
  33. System.out.println("You have a C in the class.");
  34. else if ((grade >= 67) && (grade <= 70))
  35. System.out.println("You have a C- in the class.");
  36. else if ((grade >= 60) && (grade <= 66))
  37. System.out.println("You have a D in the class.");
  38. else if ((grade >= 0) && (grade < 60))
  39. System.out.println("You have an F in the class.");
  40. System.out.println("Thank you for checking your grade. Good bye.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement