1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sveticcg [70]
3 years ago
10

Create a package named one_dimensional_array and write a class that completes the following "OneDimensionalArrays" class. You wi

ll complete the class by filling in code wherever you see the comment:
Engineering
1 answer:
yan [13]3 years ago
7 0

Answer:

The filled in codes are

1) private static int[] arr;

2)  int arr[] = new int[size_of_array];

        int increment = 100;

        for (int i = 0; i < size_of_array; i++) {

       arr[i] = increment * i;

       }

      return arr;

3) for (int i = 0; i < myArray.length; i++) {

      System.out.println(myArray[i]);

4)  OneDimensionalArrays result = new OneDimensionalArrays();

    result.createIntegers(num);

    result.printArray(arr);

Explanation:

Create a package named one_dimensional_array and write a class that completes the following "OneDimensionalArrays" class. You will complete the class by filling in code wherever you see the comment:

//******* FILL IN CODE *********

import java.util.Scanner;

public class OneDimensionalArrays {

   

   int[] createIntegers(int size_of_array)

   {

      //*******  FILL IN CODE *********

      // Your code will create an array of ints as large as specified in size_of_array

      // Fill the array in with the values: 0, 100, 200, 300, ....

      // Return the array that you just created

   }

   void printArray(int[] myArray)

   {

      //*******  FILL IN CODE *********

       // Print out your array with one number per line.  Get the size of the

       // array from the "myArray" parameter (no hard coding the size)

   }

   public static void main(String[] args) {

       Scanner keyboard = new Scanner(System.in);

       

       System.out.println("Enter size of array to create: ");

       int num = keyboard.nextInt();

       //*******  FILL IN CODE *********

       // Construct an instance of the OneDimensionalArrays class

       // Using this object instance, call createIntegers to create

       // an array of integers.  Don't forget to save the results

       // Then call the printArray method to print out the contents

       // of your array.

       }

}

Completed Code when filled in looks this way below:

import java.util.Scanner;

public class OneDimensionalArrays {

  private static int[] arr;

  int[] createIntegers(int size_of_array) {

       int arr[] = new int[size_of_array];

       int increment = 100;

       for (int i = 0; i < size_of_array; i++) {

             arr[i] = increment * i;    

       }

       return arr;

   }

   void printArray(int[] myArray) {

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

           System.out.println(myArray[i]);          

       }

   }

   public static void main(String[] args) {

       Scanner keyboard = new Scanner(System.in);

       System.out.println("Enter size of array to create: ");

       int num = keyboard.nextInt();

       OneDimensionalArrays result = new OneDimensionalArrays();

       result.createIntegers(num);

       result.printArray(arr);

   }

}

You might be interested in
What are the major steps in manufacturing biofuels from biomass?
TiliK225 [7]

Answer:

Pyrolysis

It is a biomass in anaerobic conditions results in the production of solid charcoal, liquid bio-oil and fuel gases. . Pyroolysis can be categorized into three groups depending on environment conditions, namely conventional pyrolysis, fast pyrolysis and flash pyrolysis.

5 0
3 years ago
PLEASEE HELP.!! ILL GIVE BRAINLIEST.!! *EXTRA POINTS* DONT SKIP:((
Trava [24]

Answer:

16

Explanation:

Have a good day my friend

8 0
3 years ago
Read 2 more answers
The output voltage of a power supply is normally distributed with mean 12 V and standard deviation 0.11 V. If the upper and lowe
podryga [215]

Answer:

82.62%

Explanation:

The z score is a score used in statistics to determine by how many standard deviations the raw score is above or below the mean. The z score is given by:

z=\frac{x-\mu}{\sigma} \\\\where\ x=raw\ score,\mu=mean\ and\ \sigma=standard\ deviation.\\\\Given \ that\ \mu=12V, \sigma=0.11V.\\\\For\ x11.85V:\\\\z=\frac{11.85-12}{0.11} =-1.36\\\\

From the normal distribution table, P(11.85 < x < 12.15) = P(-1.36 < z < 1.36) = P(z < 1.36) - P(z < -1.36) = 0.9131-0.0869 = 0.8262 = 82.62%

4 0
2 years ago
The volume fraction of particles in a WC-particle Cu-matrix CERMET is 0.84 Calculate the minimum expected elastic modulus, in GP
Lynna [10]

Answer:

the minimum expected elastic modulus is 372.27 Gpa

Explanation:

First we put down the data in the given question;

Volume fraction V_f = 0.84

Volume fraction of matrix material V_m = 1 - 0.84 = 0.16

Elastic module of particle E_f = 682 GPa

Elastic module of matrix material E_m = 110 GPa

Now, the minimum expected elastic modulus will be;

E_{CT = (E_f × E_m ) / ( E_fV_m  + E_m V_f  )

so we substitute in our values

E_{CT = (682 × 110 ) / ( [ 682 × 0.16 ]  + [ 110 × 0.84] )

E_{CT = ( 75,020 ) / ( 109.12 + 92.4 )

E_{CT = 75,020 / 201.52

E_{CT = 372.27 Gpa

Therefore, the minimum expected elastic modulus is 372.27 Gpa

7 0
2 years ago
The integral of In3x²/×⁵<br><br>​
Gelneren [198K]

Answer:

2737pergunta Resposta correta e a minha amiga Jeciane estamos fazendo uma academia de lima e você vai ver ver o meu perfil completo a minha amiga Jeciane estamos fazendo uma academia de lima e você vai ver o meu perfil completo a minha amiga Jeciane estamos fazendo uma academia de lima e você vai ver o meu perfil completo a minha

Explanation:

Marcar como melhor porfavo

3 0
2 years ago
Other questions:
  • What is the pressure at the bottom of a 25 ft volume of hydraulic fluid with a weight density of 55 lb/ft3 a. 114.6 psi b. 1375p
    7·1 answer
  • Convert 250 lb·ft to N.m. Express your answer using three significant figures.
    6·1 answer
  • Based on these statements:
    14·1 answer
  • Which of the following waste characteristic is considered to be hazardous:
    15·1 answer
  • Fill in the blank to correctly complete the statement below.
    14·1 answer
  • Which of the following characteristics would not give animals an advantage in the ocean?
    13·1 answer
  • A car travells at 67.5 km\h in 120 km.how long will it take to reach the destination
    14·1 answer
  • A 9 -slug mass hangs by a rope from the ceiling. Using the standard value of gravitational acceleration g = 32.2 fts 2, what is
    12·1 answer
  • What factors need to be considered when building housing on a waterway
    10·2 answers
  • All of these are true about a magnesium part EXCEPT that it:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!