answer.
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]
1 year 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]1 year 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
1. A pure aggregator is best defined as a blog that
miss Akunina [59]
A pure aggregator is best defined as a blog that aggregates blog content from other sources.

An Aggregator blog or website don't write its own content. It aggregates information or content from third-party websites. There are different types of aggregator websites such as a poll aggregator, a review aggregator, and a search aggregator.
5 0
1 year ago
Kayle is building a web form. He has included space where users can input their phone numbers and email addresses. However, he w
Digiron [165]

Answer:

D. javascript

Explanation:

use form validation method bro

8 0
1 year ago
Assume the array of integers values has been created. Which condition must be used in the indicated area so the loop below will
scZoUnD [109]

Answer:

val > max

Explanation:

Assuming the values array is already created, inside the loop, we need to check if the val, a value in the values array, is greater than max. If it is greater than the max, that means it is our new max. Then we would set the max as the val. This way, if there is any value greater than max, it will be our max at the end of the loop.

7 0
1 year ago
You are a technical consultant for many businesses in your community. One of your clients, a small law firm, has a single Active
stellarik [79]

COMPLETE QUESTION:

You are a technical consultant for many businesses in your community. One of your clients, a small law firm, has a single Active Directory domain. They have two servers running Windows Server 2012 R2. Both servers are configured as domain controllers while also serving as file and printer servers.This client is calling you on a regular basis because users are deleting or damaging their files. You must visit the client's site and restore the files from backup. Your client has asked you to create an alternate solution. What should you do?

Answer:

Use the Windows VSS to create shadow copies on important data

Explanation:

Volume Snapshot Service (VSS) is a service available to Windows Operating Systems which allows safe backup of open files as well as locked ones. It does this by taking a snapshot the state of the drive, this snapshot information will be provided to the backup application whenever needed. It is important to mention that this service is only available on files which are in the NTFS format

8 0
2 years ago
When a product owner adds a new feature/idea in the backlog and brings it up for discussion during refinement session, how shoul
Drupady [299]

Answer:

2 is the correct answer.

5 0
1 year ago
Read 2 more answers
Other questions:
  • The __________ of a desktop computer is the case that houses the computerâs critical parts, such as the processing and storage d
    5·1 answer
  • Allie is choosing a URL for her band’s website, which is the best method of making the URL easy to understand? creating a URL wi
    8·2 answers
  • Classify the given items as belonging to the public domain or protected by copyright law.
    6·2 answers
  • Someone else can drive your car if _____.
    12·2 answers
  • The number of operations executed by algorithms A and B is 40n2 and 2n3, respectively. Determine n0 such that A is better than B
    12·1 answer
  • Suppose that cells B1 through B100 of an Excel spreadsheet contain the quantity of units ordered on each of 100 different days.
    13·1 answer
  • Identify the articulation site that allows us to nod our head ""yes"".
    13·1 answer
  • Calvin is an aspiring graphic designer. He wants to achieve Adobe Certified Expert certification in software that will be helpfu
    9·1 answer
  • Which of the following could NOT be represented by a boolean variable?
    8·1 answer
  • A sum amounts to ₹2400 at 15% simple interest per annum after 4 years fond the sum.​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!