1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Contact [7]
2 years ago
12

Create a method called letterGrade that will pass the student's average grade as a parameter and return a letter grade (char). O

nce passed, use an if..else if structure to determine whether the student has an A, B, C, D, or F. Return that letter grade. Use the standard grade scale: 90-100 (A), 80-89 (B), 70-79 (C), 60-69 (D), 0-59 (F).
Computers and Technology
1 answer:
Crank2 years ago
4 0

Answer:

The method in Java is as follows:

public static char letterGrade(int average){

    char grade =' ';

    if(average>= 90 && average <=100){ grade ='A'; }

    else if(average>= 80 && average <=89){ grade ='B'; }

    else if(average>= 70 && average <=79){ grade ='C'; }

    else if(average>= 60 && average <=69){ grade ='D'; }

    else if(average>= 0 && average <=59){ grade ='F'; }

    return grade;

}

Explanation:

This defines the method

public static char letterGrade(int average){

This initializes the grade to a blank

    char grade =' ';

If average is between 90 and 100 (inclusive), grade is A

<em>     if(average>= 90 && average <=100){ grade ='A'; }</em>

If average is between 80 and 89 (inclusive), grade is B

<em>     else if(average>= 80 && average <=89){ grade ='B'; }</em>

If average is between 70 and 79 (inclusive), grade is C

<em>     else if(average>= 70 && average <=79){ grade ='C'; }</em>

If average is between 60 and 69 (inclusive), grade is D

<em>     else if(average>= 60 && average <=69){ grade ='D'; }</em>

If average is between 0 and 59 (inclusive), grade is F

<em>     else if(average>= 0 && average <=59){ grade ='F'; }</em>

This returns the grade

    return grade;

}

You might be interested in
C program how to input this? ​
Neporo4naja [7]
Chchvjvcuvggiiog. Correct
3 0
2 years ago
Have you ever been told sensitive or confidential information that made you uncomfortable? How did you deal with the situation?
Korvikt [17]
I would tell said individual to stop what they’re trying to tell me because if it’s not stuff I should know about or want to hear about then I don’t wanna hear any of it
7 0
3 years ago
Your ___________ is what you can see without the presence of an obstruction.
SCORPION-xisa [38]

Answer:

Line of sight

Explanation:

Your line of sight is the noticeable path of travel from your vehicle to your destination area. This line can be obstructed by a curve, a hill, high-forest wooded zones, large trucks, or other obstruction that prevents drivers from seeing the vehicle ahead. Therefore, if you cannot see around an obstruction, you should slow down and be willing to adjust your position until you can reestablish a clear line of sight to your path of travel and targeting area.

8 0
3 years ago
Convert the decimal number -12 to hexadecimal (2's complement)
Helga [31]

Answer:

FFF4

Explanation:

Binary representation of 12 = 00001100

Expressing it in hexadecimal format : 0C

Binary representation of -12:

Step 1 : Computing 1's complement for 12 =11110011

Step 2 : Adding 1 to 1's complement to get the 2's complement =>

11110011+1 = 11110100

Converting the 2's complement representation to hexadecimal format:

F4 ( 8 bit representation) or FFF4 ( 16 bit representation)

4 0
3 years ago
Kathy is a senior teacher in her school. She is conducting a group discussion between parents and teachers. Her role is to ensur
Fynjy0 [20]
She is the leader of the discussion
3 0
2 years ago
Read 2 more answers
Other questions:
  • What is the most recognized and widely used database of published nursing practice literature?
    15·1 answer
  • An individual is first with the network before they are authorized to access resources on the network A. countermeasure B. vulne
    11·1 answer
  • Which guideline should you use when downloading software from the Internet?
    15·1 answer
  • User Interface Design ensures that the interface has elements that are easy to ________________. (Choose all that apply)
    10·2 answers
  • Choose all that apply.
    5·2 answers
  • Do you know the energy unit question?
    10·1 answer
  • Simple interest will always pay more interest than compound interest.
    14·1 answer
  • How to add links in HTML? ​
    8·1 answer
  • Which is government departments fund the Global Positioning System
    6·1 answer
  • in a small town, there are two providers of broadband internet access: a cable company and the phone company. the internet acces
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!