Question:Create a method that takes 2 parameters and take the average of the two numbers.
Display the numbers and the text based on:
If the grade is exactly 10, display:
Your grade: 10 Excellent!If the grade is lower than 10 but equal or higher than 7, display:
Your grade: 8.0 Above Average!If the grade is lower than 7 but equal or higher than 6, display:
Your grade: 6.5 Average!If the grade is lower than 6 but equal or higher than 1, display:
Your grade: 2.0 Bad!You must also check if the grade(s) given cannot be greater than 10
GeSHi (java):
public void gradeCalculator(double grade1, double grade2) {
// your code here
}
Created by GeSHI 1.0.7.20
Hint 1:Possible output:Your grade: 10.0 Excellent!
Your grade: 8.0 Above Average!
Your grade: 6.5 Average!
Your grade: 4.0 Bad!
The anwer(s) will be given after a few days.