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
OleMash [197]
3 years ago
8

Brian has created the following selection sort class in Java. In which line is the index of the smallest value returned? In whic

h line is the input array given as an argument?
public class SelectionSort{
private static int positionMin (int] vals, int startPosition) {
int minPosition startPosition;
for (int i startPosition; i
if (vals[i] vals[min Position]) {

minPosition = i;
return min

Position; private static void swap(int] vals, int firstPosition, int secondPosition) {

int temp; temp vals[firstPosition];
vals[firstPosition] vals[second Position];
vals[secondPosition] temp return public static void selSort(int| vals) {
int minPos for (int startPos 0; startPos< vals.length; startPos++){

minPos positionMin(vals,startPos); swap(vals,startPos, min Pos) ;

for (int i 0; i< vals.length; i++) { if(i
}else Jelse { System.out.println(vals[i]); } }; }

return; } }
Computers and Technology
1 answer:
katen-ka-za [31]3 years ago
8 0

Answer:

Explanation:

Since there are no line numbers in this question I will start counting from public class SelectionSort{ as line 1 and so on, as well as provide the code on that line.

The index of the smallest value is returned on line 8 where it says return min which shouldn't have any spaces and should be return minPosition;

The input array is given as an argument at the beginning of the function on line 2 where it says private static int positionMin (int] vals, int startPosition) {, as the variable vals.

This input array is also used as an argument on line 10 where it says Position; private static void swap(int] vals, int firstPosition, int secondPosition) and line 15 where it says vals[secondPosition] temp return public static void selSort(int| vals) {

You might be interested in
Put the pieces of a function into the correct order as if you were writing a formula.
riadik2000 [5.3K]

The correct order for the pieces of a function is:

  1. =
  2. function
  3. arguments

<h3>What is a function?</h3>

In Computer programming, a function can be defined as a named portion of a block of executable code that performs a specific task, which is usually a single, related action.

This ultimately implies that, a function comprises a group of related statements (block of code) that only runs and returns a data when it is called.

In conclusion, =NOW() is an example of the correct order for the pieces of a function.

Read more on a function here: brainly.com/question/19181382

4 0
3 years ago
C) Explain GIGO briefly.​
hodyreva [135]

Answer:

Is is also a computer science acronym that implies bad input will result in bad output. Requiring valid input also helps programs avoid errors that can cause crashes and other erratic behavior.

IT'S FORMULA IS GIGO: GARBAGE IN GARBAGE OUT...

HOPE IT'S HELPFUL FOR U!!

AND PLZ MARK ME AS BRAINLIEST IF U LIKE THIS ANSWER!!!!

4 0
3 years ago
The tuning systems were not always reliable during the Baroque period. Why did composers use key signatures?
lapo4ka [179]

Key signatures were used because simply by knowing how many sharps or flats there were, the tuning would be more uniform. Tuning systems were not developed yet during the Baroque era and the concept of key was not introduced by then.

<span> </span>

7 0
4 years ago
Data validation is the process of a. preventing errors due to invalid data b. preventing errors due to incorrect Transact-SQL sy
professor190 [17]

Answer:

The correct answer to the following question will be "Option A".

Explanation:

Data validation seems to be an important part of every data managing mission unless you are in that area of information or data collection, data processing or planning to deliver the information to stakeholders.

  • Validation could be viewed as something of an integral component of your process instead of as a further move.
  • If your data set isn't correct from the beginning, then your outcomes will undoubtedly not be correct either. That's why the data needs to be checked or tested until it becomes used.

The other three options are not related to the given topic. So Option A is the right answer.

6 0
4 years ago
List five applications of personal computers. do these applications depend on 32 bit or 64 bit processor?
Semenov [28]
For the list of application, either check in the book or come up with yourself.
All application not depend on the 32 bit or 64 bit processor. 
8 0
3 years ago
Other questions:
  • A weak fuel to air mixture along with normal airflow through a turbine engine may result in?
    8·1 answer
  • Type the correct answer in the box. Spell all words corre ctly.
    15·2 answers
  • Question 2 Unsaved Which of these is NOT an example of an emerging technology? Question 2 options: Sixth Sense Close Range Drone
    6·1 answer
  • Question 14 (3 points)
    5·1 answer
  • The two main methods of verification
    6·1 answer
  • How will you ensure that all of the network's applications and tcp/ip services also support ipv6?
    10·1 answer
  • Which of the following are activities that today’s companies would perform?
    5·1 answer
  • The list listOne is a sorted list of numbers that contains 700 elements. The list listTwo is a sorted list of numbers that conta
    8·1 answer
  • What was the in-app phrase listed as SC answer? <br> A) MasterCard <br> B) No fee<br> C) Apple Pay
    15·2 answers
  • 3.There are 3 arrays that hold related data at each position (parallel). The first array holds product codes. The second holds t
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!