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
You need to fax a portion of a map from a large hard-cover atlas to a client from an internal fax-modem. To fax the map, the bes
Kay [80]
The fax modem is used to send and receive fax messages by only having phone line (fax machine is not required). The scanned documents should be saved as digital file (image or PDF format) in order to be sent. So, in order to send a portion of a map you should first convert the map into digital file and than simply send it through the fax modem. The best way to convert it to a digital file is to use an optical character recognition (OCR). 
6 0
3 years ago
A compound boolean expression created with the ___ operator is true only if all its connected expressions are true.
kiruha [24]
The answer to this is OR..I think..Hope i helped
4 0
3 years ago
You have an application that you would like to run on your Windows workstation every Monday at 3:00 p.m. Which tool would you us
NikAS [45]

Answer:

Task Scheduler

Explanation:

Task Scheduler allows you to automate tasks in Windows 10

7 0
3 years ago
In g.o.o.g.l.e sheet Columns are labeled by ____​
telo118 [61]

Answer:

Explanation:

Click the Data option.

Click on Named Range. This will open the 'Named ranges' pane on the right.

Click on the 'Add a range' option.

Enter the name you want to give the column (“Sales” in this example)

Make sure the column range is correct. ...

Click on Done.

3 0
2 years ago
What are the advantages and disadvantages of globalization and new technologies?
snow_lady [41]

Answer:

the advantage is the better the tech. the easier life gets

the disadvantages is the better it gets. the more danger it puts us in (depending on the tech) and the more lazy we become

7 0
3 years ago
Other questions:
  • 7 features of QBASIC
    6·1 answer
  • Which Computer career field enables you to create and design interactive multimedia products and service
    5·2 answers
  • _____ involves those activities that ensure the orderly dissolution of a system, including disposing of all equipment in an envi
    7·1 answer
  • When looking to ensure your website is easily accessible by mobile users, what should you focus on doing first
    8·1 answer
  • Common input devices include the keyboard, ____, and integrated video cameras.
    12·1 answer
  • Why is it difficult to detect a Trojan horse?
    13·2 answers
  • You would like to narrow your search on this topic.
    15·2 answers
  • QueSUUN TU
    15·1 answer
  • It took her 9 more months but Marina has managed to save the full $725 plus more to cover fees to pay off the pay-day loan compa
    9·1 answer
  • Who was making the high-pitched growling noise that Francisco hears?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!