EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
8th Edition
ISBN: 9781305480537
Author: FARRELL
Publisher: CENGAGE LEARNING - CONSIGNMENT
bartleby

Videos

Expert Solution & Answer
100%
Book Icon
Chapter 6, Problem 8PE

Explanation of Solution

Program:

File name: “QuizScoreStatistics.java

//Import necessary header files

import java.util.Scanner;

//Define a class named QuizScoreStatistics

public class QuizScoreStatistics

{

    //Define main method

    public static void main(String[] args)

    {

        //Create an object for Scanner class

        Scanner sc = new Scanner(System.in);

        //Declare the variables

        int count = 0;

        int score = -1;

int min = Integer.MAX_VALUE, max = Integer.MIN_VALUE, sum = 0;

        //Prompt the user to enter the scores

        System.out.println("Enter the scores: (to stop enter 99) ");

        //do..while loop

        do

        {

            //Reads a string of digits

            score = sc.nextInt();

/*If the user enters any number of student quiz scores other than 99*/

            if (score != 99)

            {

//If the score entered is less than 0 or more than 10

                if (score < 0 || score > 10)

                {

                   //Print the message

                   System.out.println("Score must be between 0 and 10");

                }

                //Else if the score lies between 0 and 10

                else

                {

                    //Increment the count

                    count++;

        �...

Blurred answer
Students have asked these similar questions
Write an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average.
Write an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average. ***Java please***
Write an application that computes and displays the day on which you become(or became) 10,000 days old. For example, if you we're born on January 1st, 2000, the output would be I will be 10000 days old on 2027-05-19.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Files & File Systems: Crash Course Computer Science #20; Author: CrashCourse;https://www.youtube.com/watch?v=KN8YgJnShPM;License: Standard YouTube License, CC-BY
UNIX Programming (Part - 10) The File System (Directories and Files Names); Author: ITUTEES;https://www.youtube.com/watch?v=K35faWBhzrw;License: Standard Youtube License