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
Packet switching was invented by: <br> Apple <br> DARPA <br> Google <br> Microsoft
riadik2000 [5.3K]

Answer:  darpa

Explanation:

8 0
3 years ago
Please solve in 5 mins very fast​
Dmitriy789 [7]

Answer:

a. virtual reality

b. Master Boot Records

c. Primary function of a router

d. zoom

Explanation:

4 0
3 years ago
Read 2 more answers
A variable like userNum can store a value like an integer. Extend the given program to print userNum values as indicated.(1) Out
dimulka [17.4K]

Answer:

The program in Java is as follows:

import java.util.*;

public class Main{

public static void main(String[] args) {

 int userNum;

 Scanner input = new Scanner(System.in);

 System.out.print("Enter integer: ");

 userNum = input.nextInt();

 System.out.println("You entered "+userNum);

 System.out.println(userNum+" squared is "+(userNum*userNum));

 System.out.println(userNum+" cubed is "+(userNum*userNum*userNum));

 int userNum2;

 System.out.print("Enter another integer: ");

 userNum2 = input.nextInt();

 int sum= userNum + userNum2; int product = userNum2 * userNum;

 System.out.println(userNum+" + "+userNum2+" = "+sum);

 System.out.println(userNum+" * "+userNum2+" = "+product); } }

Explanation:

This declares userNum

 int userNum;

 Scanner input = new Scanner(System.in);

This prompts the user for input

 System.out.print("Enter integer: ");

This gets user input from the user

 userNum = input.nextInt();

Number (1) is implemented here

 System.out.println("You entered "+userNum);

Number (2) is implemented here

 System.out.println(userNum+" squared is "+(userNum*userNum));

 System.out.println(userNum+" cubed is "+(userNum*userNum*userNum));

This declares another variable userNum2

 int userNum2;

This prompts the user for another input

 System.out.print("Enter another integer: ");

This gets user input from the user

 userNum2 = input.nextInt();

This calculates the sum and the product

 int sum= userNum + userNum2; int product = userNum2 * userNum;

Number (3) is implemented here

 System.out.println(userNum+" + "+userNum2+" = "+sum);

 System.out.println(userNum+" * "+userNum2+" = "+product);

8 0
2 years ago
Tech A states that batteries have different sizing and configuration requirements. Tech B states that this helps them to fit the
Ymorist [56]

Answer:

Both

Explanation:

Batteries come in different sizes and configurations. This is evident in car batteries where third sizes vary from car to car depending on the space and manufacturer's discretion.

Thus, Both technicians are correct.

Cheers

3 0
3 years ago
A stigma is
mario62 [17]
The answer to your question is A. A mark of social disgrace that sets tyre deviant apart from the rest of society. Hope I helped.
8 0
3 years ago
Read 2 more answers
Other questions:
  • Can someone please help me with this question?
    12·1 answer
  • How many total channels are available in the United States for wireless LAN use in the unlicensed 2.4ghz ism band ?
    6·1 answer
  • Your uncle spent most of his teen years in a hospital undergoing treatment for a severe physical illness. As an adult, he is rat
    10·1 answer
  • A tower or mini tower pc is a type of all- in -one unit true or false
    9·2 answers
  • You are given two int variables j and k, an int array zipcodeList that has been declared and initialized, an int variable nZips
    10·2 answers
  • In a linked chain implementation of a queue, the performance of the enqueue operation
    10·1 answer
  • Select the correct answer.
    10·1 answer
  • -) An attribute is a(n)?
    5·1 answer
  • Write at least 4 sentences
    9·1 answer
  • St. CHarles school's music community is organizing a fundraiser. They want to create a simple but attractive website. However, t
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!