I'm new to Java and I'm not sure how to write the source code for this problem I got in class...

Write a java program using the while and if statement that will accept ten student grades and that will display the sum of the grades, the student average, and the respective letter grade for their average.
95-100 A+
90-94 A
85-89 B+
80-84 B
75-79 C+
70-74 C
65-69 D+
60-64 D
59 and below is F

Any help is appreciated ><

Sure! I can help you with that. Let's break down the problem into smaller steps:

Step 1: Set up variables and initialize them
- You will need variables to store the sum of grades, the count of students, and the average grade.
- You can initialize the sum to 0, the count to 0, and the average to 0.0.

Step 2: Accept ten student grades
- Use a loop (such as while or for) to iterate ten times.
- Inside the loop, prompt the user to enter a grade and read the input.
- Add the grade to the sum.
- Increment the count by 1.

Step 3: Calculate the average grade
- After the loop, calculate the average grade by dividing the sum by the count.

Step 4: Determine the letter grade
- Use if statements to check the range of the average grade and assign the respective letter grade.

Step 5: Display the result
- Print the sum of grades, average grade, and the corresponding letter grade.

Below is an example of the Java code that solves the problem:

```java
import java.util.Scanner;

public class GradeCalculator {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

int sum = 0;
int count = 0;
double average = 0.0;

while(count < 10) {
System.out.print("Enter a grade: ");
int grade = scanner.nextInt();

sum += grade;
count++;
}

average = (double) sum / 10;

String letterGrade;
if (average >= 95) {
letterGrade = "A+";
} else if (average >= 90) {
letterGrade = "A";
} else if (average >= 85) {
letterGrade = "B+";
} else if (average >= 80) {
letterGrade = "B";
} else if (average >= 75) {
letterGrade = "C+";
} else if (average >= 70) {
letterGrade = "C";
} else if (average >= 65) {
letterGrade = "D+";
} else if (average >= 60) {
letterGrade = "D";
} else {
letterGrade = "F";
}

System.out.println("Sum of grades: " + sum);
System.out.println("Average grade: " + average);
System.out.println("Letter grade: " + letterGrade);
}
}
```

To run this program, save the code in a file with a `.java` extension (e.g., `GradeCalculator.java`) and compile it using the `javac` command. After that, run the compiled code using the `java` command. You will then be prompted to enter ten grades, and the program will display the sum, average, and letter grade based on the logic provided.

I hope this helps you! Let me know if you have any further questions.