Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For this programming question, you'll write a single java file, with a main method, and two accessory methods. The pseudocode for the program is shown
For this programming question, you'll write a single java file, with a main method, and two accessory methods. The pseudocode for the program is shown in Figure 1. This coding assignment is VERY similar to lab 8, so be sure to refer to it, if you have questions. The main method will: 1. 2. 3. Ask the user to specify how many double values he/she wants to tally Create an array of appropriate size, and randomly generate double numbers to fill the array Invoke a method that takes as input an array of doubles, and which will sum and print to the screen the values of the array Invoke a method that takes as input an array of doubles, and which will calculate and output to the screen the average, maximum, and minimum values in the array 4. Sum Method Takes as input an array of doubles Returns void Prints the number of elements in the array and the sum of the entries Average, Maximum, Minimum Method Takes as input an array of doubles Returns void For the input array, calculates the average, maximum, and minimum entries, and prints/displays them to the user Main method 1. Set up Scanner Object 2. Ask user, "How many double numerical entries do you have?" 3. Read from the keyboard, the user's input, and save that into the variable sizeOfArray 4. Declare an array of size sizeOfArray 5. Use the Random number Class and walk over the array, and input into each slot, a random number 6. Invoke the SumMethod 7. Invoke the Average, Maximum, Minimum Method Figure 1: Pseudocode for a program that creates an array, and calculates the sum, average, maximum, and minimum values of the array This programming assignment is on purpose open-ended and quite vague. You need to: choose the name of the program choose the variable names etc
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started