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
Write an application that allows a user to enter the names and birth dates of up to 10 friends. Continue to prompt the user for
mylen [45]
Sorry I don’t know the answer I am really sorry
5 0
3 years ago
Please complete the following questions. It is important that you use complete sentences and present the questions and answers w
Vanyuwa [196]

Answer:

well... i came for the same answer

Explanation:

7 0
3 years ago
Read 2 more answers
Two types of business communications enhanced by desktop publishing are
Likurg_2 [28]
The correct option is D.
The two types of business communication that are enhanced by desktop publishing are internal and external communication. Internal communication refers to the information and ideas that are exchange within the organisation while external communication refers to information and ideas that are exchange between the organisation and the outside world.<span />
4 0
3 years ago
Read 2 more answers
What is adb command???​
Sedaia [141]

Answer:

<em>Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.</em>

Explanation:

<h3>I hope this helps!!</h3>
8 0
2 years ago
Read 2 more answers
I need Help!!<br> 4. Explain the importance of including negative space as part of a design.
vova2212 [387]
Negative space is the space between, within and surrounding an object in an image. The positive space is the focus of the image, the object itself, but the negative space is just as important. It shares edges with the positive space, defining the outline of the object and creating proportion
5 0
3 years ago
Other questions:
  • In poor weather , you should ___ your following distance.
    12·1 answer
  • Fix the 2 error codes.
    14·1 answer
  • Data arranged and stored in a data set
    9·1 answer
  • why is it important for you to understand and describe the internal and external components of a computer in the workplace​
    14·1 answer
  • Which of the following is a job description for a person with a degree in information technology
    15·1 answer
  • A summer camp offers a morning session and an afternoon session. The list morningList contains the names of all children attendi
    6·1 answer
  • You're making great progress on your assignment. You've defined the purpose of your message, identified both the primary and sec
    9·1 answer
  • A license may limit the use of a software application to a specific device. Group of answer choices True False
    7·1 answer
  • What are 2 ways to send a message to your client when signed in as an accountant user?.
    9·1 answer
  • when inputting a formula into excel or other spreadsheet software, what components are required for the formula to function prop
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!