CS173: Intro to Computer Science - Introduction to Conditionals (3 Points)
Developed by Professor Tralie and Professor Mongan.Exercise Goals
The goals of this exercise are:- To use compound conditionals
Enter your Ursinus netid before clicking run. This is not your ID number or your email. For example, my netid is wmongan
(non Ursinus students can simply enter their name to get this to run, but they won't get an e-mail record or any form of credit)
Netid |
GradePrinter.java
public class GradePrinter {
public static void printGrade(double grade) {
/* TODO: fill this in by printing the letter grade
For example, if the grade is 92, you should:
System.out.println("A-");
You can assume that the grade variable contains the
number grade you're checking.
*/
}
}
Driver.java
public class Driver {
public static void main(String[] args) {
GradePrinter.printGrade(89.75);
GradePrinter.printGrade(96.9);
GradePrinter.printGrade(82.99);
}
}
Driver.main(null);