Ask Question
11 January, 14:30

Write a program named TypingGrades that allows a user to enter a student's number of words typed. The output is the letter grade. For example, if 8 words typed is input, the output should be Typing 8 words per minute: Grade F.

+1
Answers (1)
  1. 11 January, 15:50
    0
    complete question:

    Write a program named TypingGrades that allows a user to enter a student's number of words typed. The output is the letter grade. For example, if 8 words typed is input, the output should be Typing 8 words per minute: Grade F.

    Words typed Grade

    0-15 F

    16-30 D

    31-50 C

    51-75 B

    76 and over A

    Answer:

    import java. util. Scanner;

    public class TypingGrade {

    public static void main (String[] args) {

    Scanner in = new Scanner (System. in);

    System. out. println ("Enter number of words typed");

    int numWords = in. nextInt ();

    if (numWords<=15) {

    System. out. println ("Grade F");

    }

    else if (numWords>=16 && numWords<=30) {

    System. out. println ("Grade D");

    }

    else if (numWords>=31&&numWords<=50) {

    System. out. println ("Grade C");

    }

    else if (numWords>=51 && numWords<=75) {

    System. out. println ("Grade B");

    }

    else{

    System. out. println ("Grade A");

    }

    }

    }

    Explanation:

    Using Java programming Language Import Scanner Class to prompt and receive user input of number of words typed Use if ... elseif ... else statements to test each condition (the range of words) given in the question to print the expected output.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Write a program named TypingGrades that allows a user to enter a student's number of words typed. The output is the letter grade. For ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers