Write a program that uses an array to find the average
Course:- JAVA Programming
Reference No.:- EM131599412

Assignment Help
Assignment Help >> JAVA Programming

1. Show two ways to declare a one-dimensional array of 12 doubles.
{1.0, 2.0, 3.0, 4.0, 5.0, 6.0,7.0, 8.0, 9.0, 10.0, 11.0, 12.0};
For the first example print the 7.0 and 10.0 in a println.
Example - Your println should match
For the first example print the 2.0 and 12.0 in a println.
Example - Your println should match

2.Write a program that uses an array to find the Average of 10 double values.
Use Math.random() in combination with a for loop to fill the array with 10 random values.
Then use a different for loop to iterate through the array when summing the total for all 10 double values.

Put your comment

Ask Question & Get Answers from Experts
Browse some more (JAVA Programming) Materials
Write a menu based program to maintain student records. Your program should take the following inputs: 1. Student first name (max. 20 characters) 2. Student last name, (max.
Read a data file, create the internal data structure, create a GUI to display the structure, and let the user search the structure. Sort the structure, use hash maps to crea
To use a class, call the constructor. Below are two Java classes. The name of the first isFirstClassOOPS. It defines variables, constructors, and methods. Identify the Const
Write a Java program that uses a search tree of strings to sort text lines in alphabetic order. You may choose how you de?ne alphabetic order as long as there is some sense in
Calculate the premium and multiply the value of the object being insured by the corresponding RATE. Note: See the RATE tables above. Get a quote and add all the premiums for
Write a program that prompts a user to enter a US dollar amount. Output a table similar to the one in the example below. The second prompt should ask the user to enter a 1
Write a java application that accomplishes the following tasks with built in exception handling: ask the number of homework assignment students have submitted in a semester
Create a Java GUI app, implement the following criteria inside a main method 1) set up a visible frame with width 500, height 300; 2) frame title is "CSE205 Frame app"; and