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-");
Use the syllabus to determine the correct letter
grades for each grade range!
You can assume that the grade variable contains the
number grade you're checking. DO NOT create your own grade
variable this time, as I'll automatically provide a few
to test your code from below.
*/
}
}
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);