Write a program using an array that will store

Assignment Help JAVA Programming
Reference no: EM13164906

Using java programing : Write a program using an array that will store input data. Prompt the user for and read 6 numbers between 70 and 90. Verify the numbers should be greater than 70 and less than 90. If the number is less than or equal to 70 or greater than 90, reprompt for a valid value.

The output by using the array data:

  • Print all the elements of the array.
  • The average of all the elements of the array.
  • The minimum element with its index
  • The difference between the largest and smallest elements of the array.

Ive started with

import java.util.Scanner;

public class Lab12

{

   public static void main (String [] args)

{

   Scanner scan = new Scanner(System.in);

   double [] num= new double [6];

   for ( int i=0; i < num.length;i++)

   {

   while (num[i] <=70 || num [i] >90)

   {

 

   System.out.println("Enter a number grater bigger then 70 and less then 90 ");     

      num [i]= scan.nextInt();

 

}

}

}}

Reference no: EM13164906

Questions Cloud

Use a search engine to identify : Use a search engine to identify the positions of Google and Apple regarding cell phone tracking. What reasons do the give for tracking cell phones? What limitations do you think they might support?
How much heat is required to vaporize : How much heat is required to vaporize 55.0 of acetone at its boiling point? The heat of vaporization of acetone at its boiling point is 29.1.
Palindrome is a sequence of char that reads backward forwrd : A palindrome is a sequence of characters that reads the same backward as forward. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 45554, and 11611. Write an application called Palindrome.java that asks the user t..
How many grams of solvent are in the solution : You have 1005.3 g of a bleach solution. The percent by mass of the solute sodium hypochlorite, NaOCl, is 3.62%. How many grams of solvent are in the solution?
Write a program using an array that will store : Using java programing : Write a program using an array that will store input data. Prompt the user for and read 6 numbers between 70 and 90. Verify the numbers should be greater than 70 and less than 90. If the number is less than
What is mass in grams of the liquid propylene gylcol : what is the mass in grams of 30.0 mL of the liquid propylene gylcol, a moisturizing agent for foods, which has a density 1.036 g/mL at 25 degree Celsius.
State what by product might have formed : how might the addition of water helped convert this by product into the desired product?
What is the key value of the 4th index : What is the key value of the 4th index record on the top level, assuming each index record points to the record with the highest key value in a block of the next level down?
Create an array of objects from the provided code : Create an array of objects from the provided code and run a for loop to assign strings and numbers. In this assignment, I will need to see the main function. Make sure there is a default constructor.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write java program to receive input and displayed interest

Write a Java program that receive some input and displayed the interest. Format the number into 2 decimal places. Using loop is an advantage.

  Java project

Prompt the user for an int between lower and upper boundary.

  Consider a typical certification hierarchy

Why might Bob still not trust that the certificate for Alice truly establishes Alice as the owner of the public key in the certificate?

  Write a java program to implement the finite field

Write a program called "GF2.java" to implement the finite field GF(p n ) where p is a prime number and n is a positive integer.  You also need to write four methods to realize "+", "-", "´", and "/".

  The program reads in names

Write a program and include the following methods. The program reads in names and ages (use 2 parallel arrays, maximum size 50) from a file called Stuff.dat.

  Web application that allows user to specify six lottery nums

Write a web application that allows a user to specify six lottery numbers. Generate your own combination on the server, and then print out both combinations together with a count of matches.

  Develop java applet that will help elementary school student

Develop a Java applet that will help an elementary school student learn multiplication. Use the Math.random method or a Random object to produce two positive one-digit integers.

  Write java program to print price of table-furniture company

Write down the Java program for furniture company. Ask user to select P for Pine, O for Oak or M for Mahogany. Illustrate the price of table produced with chosen wood.

  Create the working applet to compute tax

Write down a java applet. Your applet assits to find out how much federal tax we require to pay suppose the tax rate is 12%. Create and implement the working applet to compute tax.

  The class constructor should accept an array

Write a class named TestScores. The class constructor should accept an array of test scores as its arguments. The class should have a method that returns the average of the test scores. If any test score in the array is negative or greater than 10..

  Implement an intrusion detection system in java

You are to implement an intrusion detection system in java. Calculate a threshold for detecting an intrusion. The threshold is 2*(Sums of weights).

  Web engineering principles

web application development, Web Engineering methodology, UML-based Web Engineering (UWE), models to the expansion of web applications, Object Oriented Web Solutions (OOWS),Web Modeling Language (WebML) methodology, Object-Oriented Hypermedia Design..

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