I'm a bit disappointed that @OP is satisfied with such his approach solving this exercise.
I was studying myself and I know that having everything so chaotic leads nowhere. Better code organization is expected right from the 1st day of Introduction to Programming course. Meaning no prior experience is needed, but better code organization *is* expected. And that is not because somebody requires like that, that is because *that way* is much easier to solve problems.
1. All the comments you have aren't useful. And in some places - misleading. An example:
So what we see here. My guess is that OP's comments referring to the preceding lines. However, if you look closely, this comment is nonsense. I'll leave for OP to figure out what is wrong there.
2. Very first line says Averages5.java, yet the class declaration says it is Averages7. That shows how such comments go out of date in a blink of an eye. So better not to have such comments which say nothing and usually say wrong.
3. Snippet below:
@OP You don't need all these && operators. Think how you could simplify this code. i.e.:
4. Did you learn methods yet? Anyway, since you already using them, i.e.: main(), I'd suggest start organizing your program into methods, where each method does one thing and one thing only. i.e.:
Every little detail is important. You need to take control of your code and don't let the chaotic code ruin your project.
I would do it the other way round. If the boundary value (80 or 70) is included in the upper grade, I would start small, and I would use the < operator because I think it is easier to read than ≥ or >=Note the last option is a plain simple else. My grades are different from OP's.