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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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