Question: Java 7. Ask the user for a float value that will represent a grade and determine if the grade is in the A range. Print
Java

7. Ask the user for a float value that will represent a grade and determine if the grade is in the "A" range. Print to the console "The grade is above an X" (where X is the minimum value for an "A" grade) if the grade is an "A" (You can decide for yourself what percentage is an "A" grade.) 8. Add to the previous "if" statement so that it becomes an "if/else" or multi-way if/else structure that will now also test to see if the grade is a "B" Output to the console if the grade is in that range. (While you don't necessarily have to use the logical "and" operator to solve this problem, note that in Java the "and" operator i:s represented by "&"or "&&") You can decide for yourself what percentage is a "B" grade. 9. Ask the user for a temperature, stored in a double. Is the temperature higher than 78 degrees or less than (or equal to) 78 degrees? Describe the current temperature as "higher than 78 degrees" or "less than or equal to 78 degrees". 10. For the temperature, write an "if/else" statement that asks if the temperature is (positive & odd) OR (zero & even)? (Notice the use of parenthesis here to define operator precedence. Look up order of operations (PEMDAS), "logical AND" and "logical OR" if this is unfamiliar in your text). If it is, output "yes; positive and odd or zero and even" and if it's not, say "no; not positive and odd or zero and even" on the console
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
