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
2. BCD uses 6 bits to represent a symbol. a) True b) False​
Goshia [24]

Answer:

true because BCD used 6 bits to represent a symbol .

Explanation:

mark me brainlist

4 0
2 years ago
Engineers create a new metal that is stronger than steel but much lighter. This material is also significantly cheaper than what
zysi [14]

The best step for the engineers to make next is option D. Begin to design an airplane using this metal.

<h3>What is the metallic is plane parts?</h3>

Aluminum and its alloys are nevertheless very famous uncooked substances for the production of business planes, because of their excessive electricity at exceedingly low density. Currently, excessive-electricity alloy 7075, which includes copper, magnesium and zinc, is the only used predominantly withinside the plane industry.

The solution is D, due to the fact even as it's far crucial to marketplace the fabric and ensure humans are inquisitive about buying, they first want to attempt to layout aircraft the usage of this fabric. There isn't anyt any use promoting an aircraft constituted of this material_ if a aircraft can not be built.

Read more about the aircraft:

brainly.com/question/5055463

#SPJ1

7 0
2 years ago
The boy in the wagon begins throwing bricks out of the wagon to simulate rocket propulsion. The wagon begins at rest, and the bo
Digiron [165]

Q:What velocity does the boy attain if he throws the bricks one at a time?

Answer:Linear velocity since it moves back and firth and does not rotate like angular velocity.

5 0
3 years ago
If a shear stress acts in one plane of an element, there must be an equal and opposite shear stress acting on a plane that is
xxMikexx [17]

Answer:

90 degrees

Explanation:

In the case when the sheer stress acts in the one plane of an element so it should be equal and opposite also the shear stress acted on a plan i.e. 90 degrees from the plane

Therefore as per the given situation it should be 90 degrees from the plane

hence, the same is to be considered and relevant too

5 0
3 years ago
Read 2 more answers
Brainly and points if you want
Tju [1.3M]

Answer:

thank you

Explanation:

have a nice day

8 0
3 years ago
Read 2 more answers
Other questions:
  • To unload a bound stack of plywood from a truck, the driver first tilts the bed of the truck and then accelerates from rest. Kno
    7·1 answer
  • Please select the word from the list that best fits the definition I love horses and want to be a veterinarian
    12·2 answers
  • A 20.0 µF capacitor is charged to a potential difference of 800 V. The terminals of the charged capacitor are then connected to
    12·1 answer
  • The change in specific internal energy depends on the path of a process. a)-True b)-False
    14·1 answer
  • Single point cutting tool removes material from a rotating work piece to generate a cylinder is called • Facing Tuming • Both 1
    6·1 answer
  • You are an engineer working in a auto crash test lab. Some members of your team have raised objections against the use of cadave
    10·1 answer
  • Which utility program reads an assembly language source file and produces an object file?
    6·1 answer
  • Nitrogen gas is compressed at steady state from a pressure of 14.2 psi and a temperature 60o F to a pressure of 120 psi and a te
    7·1 answer
  • Mnsdcbjksdhkjhvdskjbvfdfkjbcv hjb dfkjbkjfvvfebjkhbvefgjdf
    7·2 answers
  • In your opinion...
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!