Write a program that uses an array to find the average

Assignment Help JAVA Programming
Reference no: EM131599412

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
7.0
10.0
For the first example print the 2.0 and 12.0 in a println.
Example - Your println should match
2.0
12.0

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.

Reference no: EM131599412

Questions Cloud

What is statistics about : What is statistics about and why does everyone complain that it's hard?
Analyze the requirements needed to perform the investigation : Analyze the specific requirements needed to perform this investigation. Identify whether this incident was an actual breach of privacy according to HIPAA law.
Comprehension is probably a little ambiguous : The phrase text comprehension is probably a little ambiguous. When I read the title Ithink of understanding a bodyof language in print like a textbook.
Happens to ionic solids : Describe what happens to ionic solids when they dissolve in water.
Write a program that uses an array to find the average : 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
Potential hazards when storing dangerous : Describe two potential hazards when storing dangerous chemical and identify a proper method of preventing a harmful accident.
Identify the obtained t value for this data set using spss : Compare a sample to the whole population or another targeted sample of people can help researchers make predictions about future behavior or phenomena.
Should students wear school uniform : Should students wear school uniform? Can heterosexual men and women truly be friends with no hopes or expectations of anything more?
How many grams of water are produced : How many grams of water are produced in the reaction? If 55 grams of salt were actually produced, what is the percent yield?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Implementation the two classes

Program Specifications: In the new implementation, the two classes, Student and Grades, are defined with the following operations/methods.

  Calculation or a calendar of some activity.

1. Provide Java code for a simple class of your choice. Be sure to include at least one constructor, two methods and two fields. The fields should be private.Create a test class to construct and call the methods of your class. Describe your class and..

  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.

  Which is not a component of a try block

Which of the following is NOT a component of a try block? In the case where a method might throw more than one exception type, you specify a list of potential exceptions in the method header by separating them with ______.

  Implement a class person with two fields name

Implement a class Person with two fields name and age, and a class Car with three fields - implement a class that saves the details of the person.

  Select and submit a behavioral design pattern

Select and submit a Behavioral Design Pattern; explain why you selected that particular pattern - It is preferred to submit a running code but it is optional

  Create the jframes and the gui to work with the app

You need to create the JFrames and the GUI to work with the app - I want the program to work with the radio buttons and the applet

  Implement a client program

Implement a client program with a main method to demonstrate the evolution of the sales tax rates in the 50 US states over the last 10 years. Declare a two-dimensional array of values representing the sales tax rates. Dimension 1 represents the st..

  Design a class checkoutsystem

Design a class CheckoutSystem. Each checkout system has a method checkout that accepts the order and a credit cart as arguments and checkouts the items.

  How can i connect from an applet to a database on the server

1) How do I create an applet that accepts an unlimited number of parameters? 2) How can I connect from an applet to a database on the server?

  Write a custom java exception class named badarrayexception

A constructor taking a String parameter (the exception message) that must be passed to the parent Exception(String) constructor.

  Create a japplet that contains two parallel arrays

Create a "JApplet" that contains two parallel arrays with at least five friends' names and phone numbers. Allow the user to enter either a name or phone number and to click a "JButton" to display the other.

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