Write a program that reads a series of test scores

Assignment Help JAVA Programming
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.
*/
}
}

Reference no: EM13850950

Questions Cloud

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.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Implements the measurable interface

Implement a class Quiz that implements the Measurable interface. A quiz has a score and a letter grade (such as B+).

  How many tickets for each class of seats were sold

Prepare a program that asks how many tickets for each class of seats were sold, then shows the amount of income generated from ticket sales.

  Calculates the total at the end

Make a program that asks the user how much change they have and then calculates the total at the end.

  Write java program which will permit user to input data

Write the Java Program which will permit the user to input data. The data will be validated using a loop that requires the user to input the data until it is correct or in the correct range. T

  Implement a probability calculator for the standard normal

implement a probability calculator for the standard normal distribution using GUI.

  Digital image processing using java

Digital image processing using java ..create plugin using Jedit and run it in imageJ

  Represent one book in java

Represent one book in java

  Java :a user-defined starting position (other than 0,0)

modifying the program so that it can start from a user-defined starting position (other than 0,0) and search for a user defined ending point (other than row-1, column-1) .

  Write an application that uses string method region

Write an application that uses String method region - Matches to compare two strings input by the user. The application should input the number of characters to be compared and the starting index of the comparison.

  Write a java program to perform matrix multiplication

In this project you need to write a java program called to perform matrix multiplication and

  Write a java application that allows the user to read

Write a java application that allows the user to read, validate, store, display, sort and search the account number and balance for N bank customers.

  Write a program that starts a player off with a bank of $15

Write a program that starts a player off with a bank of $15.00.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd