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
rosijanka [135]
3 years ago
11

Create a Visual Logic flow chart with four methods. Main method will create an array of 5 elements, then it will call a read met

hod, a sort method and a print method passing the array to each. The read method will prompt the user to enter 5 numbers that will be stored in the array. The sort method will sort the array in ascending order (smallest to largest). The print method will print out the array.

Computers and Technology
1 answer:
pogonyaev3 years ago
6 0

Answer:

See explaination

Explanation:

import java.util.Scanner;

public class SortArray {

public static void main(String[] args) {

// TODO Auto-generated method stub

Scanner sc = new Scanner(System.in);

System.out.println("Enter Size Of Array");

int size = sc.nextInt();

int[] arr = new int[size]; // creating array of size

read(arr); // calling read method

sort(arr); // calling sort method

print(arr); // calling print method

}

// method for read array

private static void read(int[] arr) {

Scanner sc = new Scanner(System.in);

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

System.out.println("Enter " + i + "th Position Element");

// read one by one element from console and store in array

arr[i] = sc.nextInt();

}

}

// method for sort array

private static void sort(int[] arr) {

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

for (int j = 0; j < arr.length; j++) {

if (arr[i] < arr[j]) {

// Comparing one element with other if first element is greater than second then

// swap then each other place

int temp = arr[j];

arr[j] = arr[i];

arr[i] = temp;

}

}

}

}

// method for display array

private static void print(int[] arr) {

System.out.print("Your Array are: ");

// display element one by one

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

System.out.print(arr[i] + ",");

}

}

}

See attachment

You might be interested in
Darian has a gourmet cupcake business and needs a website to compete with the other bakeries in his area. He has a Google My Bus
Amiraneli [1.4K]

Answer:

The sequences are given below that is 3, 4, 5, 2, and 1.

Explanation:

The following steps are taken to develop the site via Google My Business.

  • In the first case, He signs his Google My Business.
  • In the second case, the site is accessed from the Home menu.
  • In the third case, the appropriate business details become modified.
  • In the fourth case, he attaches photos, like such a cover picture as well as a virtual guide.
  • In the fifth case, he selects the particular domains as well as directs this to the site.
7 0
3 years ago
Prove that any amount of postage greater than or equal to 64 cents can be obtained using only 5-cent and 17-cent stamps?
elixir [45]
Let P(n) be "a postage of n cents can be formed using 5-cent and 17-cent stamps if n is greater than 63".Basis step: P(64) is true since 64 cents postage can be formed with one 5-cent and one 17-cent stamp.Inductive step: Assume that P(n) is true, that is, postage of n cents can be formed using 5-cent and 17-cent stamps. We will show how to form postage of n + 1 cents. By the inductive hypothesis postage of n cents can be formed using 5-cent and 17-cent stamps. If this included a 17-cent stamp, replace this 17-cent stamp with two 5-cent stamps to obtain n + 1 cents postage. Otherwise, only 5-cent stamps were used and n  65. Hence there are at least three 5-cent stamps forming n cents. Remove three of these 5-cent stamps and replace them with two 17-cent stamps to obtain n + 1 cents postage.Hence P(n + 1) is true.
6 0
3 years ago
Anyone who play online game drop your name​
aleksley [76]

Answer:

kevinj720

Explanation:

4 0
3 years ago
Role and responsibility of an IT professional
RUDIKE [14]
Create the computer, network, and communication systems that an organization needs
4 0
2 years ago
What is a box with dotted border that holds a place for content on a slide called?
FinnZ [79.3K]

Answer:

Placeholders

Explanation: Placeholders are boxes with dotted borders that hold content in its place on a slide layout. Slide layouts contain different types of placeholders (for example, for text, pictures, videos, and more). You can change a placeholder by resizing or repositioning it on a slide layout. You can also delete a placeholder.

7 0
2 years ago
Other questions:
  • List and explain the error in the code
    14·1 answer
  • c++ You are given an array A representing heights of students. All the students are asked to stand in rows. The students arrive
    5·1 answer
  • The number of bits that can be transferred per second over a given transmission medium.
    6·1 answer
  • Using a single formatting _______ helps to make reading researched information easier; it lets the reader know what to expect.
    7·1 answer
  • In addition to ranking the relevance of a particular site according to the keywords entered by the user, which of the following
    10·1 answer
  • S.B. manages the website for the student union at Bridger College in Bozeman, Montana. The student union provides daily activiti
    7·1 answer
  • 13) An-Excel-file-is-generally called-a-l-an:
    6·1 answer
  • What is Microsoft marketing ?
    10·1 answer
  • What is the importance of the international employment​
    8·2 answers
  • The people, procedures, hardware, software, data, and knowledge needed to develop computer systems and machines that can simulat
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!