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
garik1379 [7]
3 years ago
15

Write an application that allows a user to enter any number of student quiz scores until the user enters 99. If the score entere

d is less than 0 or more than 10, display an appropriate message and do not use the score. After all the scores have been entered, display the number of scores entered, the highest score, the lowest score, and the arithmetic average. Save the file as QuizScoreStatistics.java.
Computers and Technology
1 answer:
maria [59]3 years ago
3 0

Answer:

import java.util.Scanner;

import java.util.*;

import java.util.Collections;

class Main

{

public static void main(String[] args)  

{

     List<Integer> Scores = new ArrayList<Integer>();

     Scanner sc1=new Scanner(System.in);

     int i =0;

     int a=0;

     do

     {

       System.out.println("Enter score");

       a =sc1.nextInt();

       if (a <= 0)

       {

           System.out.println("You entered wrong score");

           continue;

       }

       else if ( a < 10 && a >0)

       {

           System.out.println("You entered wrong score");

           continue;

           

       }

       else

       {

           Scores.add(a);

       }

       i++;

     }while(a!=99);

     int max= Collections.max(Scores);

     int min=Collections.min(Scores);

     int sum=0;

     float averg =0;

     for(i=0; i<=Scores.size()-1;i++)

     {

        sum += Scores.get(i);

     }

     averg= sum/Scores.size();

     System.out.println("Maximum score" +max);

      System.out.println("Minimum score"+min);

     System.out.println("Average:"+averg);

   

}

}

Explanation:

Remember we need to use Arraylist and not array, as we do not know how many scores we are going to have. And we use Collections for this, where we have functions for finding maximum and minimum for arraylist, however, for average, we need to calculate. However, one should know that Arraylist has better options available as compare to arrays.

You might be interested in
Measurement consists of:__________
Naddik [55]

Answer:

The answer is choice "a".

Explanation:

Measurement is a number allocation in which the entity or event attributes that would be comparable with other objects or events. Its scope and implementation depending on context and discipline.  

  • Its main purposes could be defined as measurements for efficiency, tracking, health, fitness (design, mounting), and solving problems.  
  • Its calculation consists of the numerical assignment, representing attribute amounts according to the rules for objects and events.
3 0
3 years ago
Linux distributions overview? information​
disa [49]

Answer:

Debian

Arch Linux

Ubuntu

Fedora

Manjaro

Linux Mint

Elementary OS

openSUSE

Explanation:

6 0
3 years ago
The following characteristics are common to the majority of cloud environments, except: 1. on-demand usage 2. resiliency measure
irga5000 [103]

Answer: 4. Availblitliy is not a major characteristic.

Explanation:

-Manufacturing organization can provide additional computing resources without going through the cloud service provider.

-Multi-tenancy allows multiple customers to share the same applications/the same physical infrastructure while retaining privacy and security over their information.

-Cloud computing resources usage is metered and organizations pay accordingly for what they have used.

-Elasticity is a landmark of cloud computing and it implies that organizations can rapidly provision and de-provision any of the cloud computing resources.

4 0
4 years ago
The ____ is a new feature in versions of microsoft office, starting with office 2007; it consists of tabs, which contain groups
lions [1.4K]
Excel i think that's correct
5 0
3 years ago
Write and test a Python program to find and print the largest number in a set of real (floating point) numbers. The program shou
fenix001 [56]

I can't read oooooyeaaaa

3 0
4 years ago
Other questions:
  • The n modifier after the tilde forces the index variable to expand only to the ______
    15·1 answer
  • Ipv6 includes a native information security framework (ipsec) that provides both data and control packets. true false
    15·1 answer
  • When paying bills online, a payee is:
    9·1 answer
  • We use them every day, but what is the overall purpose of a search engine?​
    10·2 answers
  • The Maui coffee shop sells coffee at $10.50 a pound plus the cost of shipping. Each order ships for $0.86 per pound + $1.50 fixe
    14·1 answer
  • Which of the following names in a program is equivalent to the name int?
    15·2 answers
  • Do you think that people have a “right” to remain anonymous online? Why or why not?
    6·1 answer
  • Does anyone know answers for reading plus level h and j
    13·2 answers
  • • Suppose an application generates chunks of 40 bytes of data every 20 msec, and each chunk gets encapsulated in a TCP segment a
    5·1 answer
  • To be fluent in computer language you must learn 8000 __________? (9 letter word)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!