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

  What position along the chord does minimum pressure occur

At what position along the chord does the minimum pressure occur? What is special about the point where C p is a maximum?

  Describe how an eavesdropped can gain access

Describe how an eavesdropped can gain access to the remote server with a relatively modest number of guesses ( Hint:  The eavesdropped starts guessing after the original user has typed all but one character of the password.

  Cognitive-based approaches to understanding motivation

Compare and contrast the need-based and cognitive-based approaches to understanding motivation?

  Write a method to get list of all the books

Make a map for a book with Book ISBN as key and book title as value - Write a method to get list of all the books in JSON format using restul client.

  Write an application that extends jframe

Write an application that extends JFrame and that displays a phrase in every font size from 6 through 20.

  Carry out additions and subtraction

You are to design a Java application to carry out additions and subtractions for numbers of any length. A number is represented as an object which includes a sign and two strings for the whole and decimal parts of the number.

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Write a program that creates two string arrays

Write a program that creates two String arrays, one to store names of 5 boys and another to store names of 5 girls

  Problem 1 the queue adta queue is a fundamental abstract

problem 1. the queue adta queue is a fundamental abstract data type. it is an ordered collection of items in which the

  Record managing system application

Build a student record managing system application

  Java enumeration lettergrade represent letter grades

Write a java enumeration LetterGrade that represents letter grades A through F, including plus and minus grades. Define a private instance variable holding a boolean value.

  Prepare a java program to random pick

The user and computer will each randomly pick one and common rules of winning apply. The game ends when the user and computer pick the same item.

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