Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a GUI application that accepts up to 20 integers and calculates some statistics about those integers. If the user enters a value that is

Write a GUI application that accepts up to 20 integers and calculates some statistics about those integers. If the user enters a value that is not a valid integer, then display an error message next to that field instead of crashing the program. The entered integers should be stored in an integer array named numbers. And the count of numbers entered sofar should be stored in an integer named count. Create a method named CalculateStats() which: 1. Has an int output parameter named min for the lowest number passed in 2. Has an int output parameter named max for the highest number passed in 3. Has a double output parameter named sum for the sum of the numbers passed in 4. Has a double output parameter named avg for the average of the numbers passed in 5. Accepts a parameter array of ints containing all of the numbers you wish to calculate statistics for 6. Does not have a return value 7. Has no side effects

image text in transcribed

Integer Stats 80 Enter Numbers Entered: 4/20 Lowest: 30 Highest: 90 Sum: 240.0 Average: 60.0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions