Write a program to read a list of nonnegative integers and to display the largest integer, the smallest integer, and the average of all the integers. The user indicates the end of the input by entering a negative sentinel value that is not used in finding the largest, smallest, and average values. The average should be a value of type double, so that it is computed with a fractional part.

The solution for this project includes a default case to print a message if no positive integers are entered.


See the code in LargeSmallAverage.java.

Computer Science & Information Technology

You might also like to view...

Which of the following statements is false?

a. Each class can be used only once to build many objects. b. Reuse helps you build more reliable and effective systems, because existing classes and components often have undergone extensive testing, debugging and performance tuning. c. Just as the notion of interchangeable parts was crucial to the Industrial Revolution, reusable classes are crucial to the software revolution that has been spurred by object technology. d. Avoid reinventing the wheel—use existing high-quality pieces wherever possible. This software reuse is a key benefit of object-oriented programming.

Computer Science & Information Technology

With HTML5, definition lists were changed to what?

a. Unordered lists b. Nested list c. Ordered lists d. Description lists

Computer Science & Information Technology

If you wish to monitor logon failures, what should you do?

What will be an ideal response?

Computer Science & Information Technology

Describe ADSL upload and download speeds.

What will be an ideal response?

Computer Science & Information Technology