Reference no: EM13850950
Topics covered in this Lab: Java IDE, loops, sentinel value, incrementing variables.
Write a program that reads a series of test scores from a recent test (integers in the range 0 to 100) until a sentinel value is read. A sentinel value is the value used to determine when to stop. The program then prints the following statistics for the test scores read in:
1. Count (how many test scores were read in)
2. Sum (of all of the test scores)
3. Average (mean). Be sure this is a double to retain the precision.
4. Minimum Test score read in
5. Maximum Test score read in
Be sure your output is labeled as to what it is and easy to read.
Use the following multiple Strings for your sentinel: stop, exit.
Test your program using the following data:
72
89
100
45
78
60
34
89
93
74
/*
Comment block
*/
import java.util.Scanner;
//
// Import the class that holds the min and max integer values.
public class Lab6Loop
{
public static void main( String args [] )
{
/*
1. Initialize variables for the:
a. "count",
b. minimum,
c. maximum,
d. running sum.
2. Write a while-loop to prompt for each score:
If the score is not the exit or stop string, then
a. Count it.
b. Sum it.
c. Check to determine if it is the minimum.
d. Check to determine if it is the maximum.
4. Compute the Average. This is not part of the loop.
5. Display your results.
*/
}
}
Find the value of k
: Let "x" be a random variable from the standard normal distribution. Find the value of "K" for the following problems. (a) P(x=0)=K (b) P(x ≤ K)= 0.9
|
The calculators will be defective
: 1. The J.O. Supplies Company buys calculators from a Korean supplier. The probability of a defective calculator is 20%. If 14 calculators are selected at random, what is the probability that less than 3 of the calculators will be defective?
|
What is the probability that the third woman
: In 2015, a survey of women from Country X found that 56 percent are married. (a) If we randomly select three women from Country X, what is the probability that the third woman is the only one of the three that is married? (Give each answer to the ne..
|
What proportion of full-grown female beagles
: A full-grown female beagle was brought in for an exam and found to weigh 15 pounds. Based on the provided weight model, what proportion of full-grown female beagles weigh less than 15 pounds?
|
Write a program that reads a series of test scores
: Write a program that reads a series of test scores from a recent test (integers in the range 0 to 100) until a sentinel value is read. A sentinel value is the value used to determine when to stop. The program then prints the following statistics f..
|
Management of cardiogood fitness
: Write a report to be presented to the management of CardioGood Fitness, detailing your findings -
|
A coin is biased such that a head is three times
: A coin is biased such that a head is three times as likely to occur as a tail. Find the expected number of tails when the coin is tossed twice
|
The economic policy institute reports
: The Economic Policy Institute reports that the average entry-level wage for male college graduates is $22.82 per hour and for female college graduates is $18.01 per hour. The standard deviation for male graduates is $3.72 and for female graduates is..
|
Discuss challenge that hr managers face in developing policy
: Discuss the challenges that HR managers face in developing policies and practices to manage the workforce within the third sector. Things to take note of, while doing this essay.
|