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]
2 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]2 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
Drag each connector name to match the connector type shown.
Setler79 [48]

Answer:

The first one is usb-c, the second is mini-usb, the third is micro-usb.

Explanation:

8 0
3 years ago
How many fixes are available for Adobe Photoshop CS4 (64 Bit)?
arsen [322]

Answer:

There are three (3) fixes in adobe cs4.

Explanation:

Adobe photoshop cs4 is a version of the creative cloud's professional graphic applications used to edit pictures, design interfaces, make graphical illustrations, draw and animate the drawings, etc.

It can be installed in several computer operating system platforms like linux, mac and windows. The adobe photoshop cs4 doesn't support the windows installation and might run into several issues. There are other issues in other supported platforms, but unlike for windows, there are three fixes for these problems.

4 0
3 years ago
What would be a situation in which you could use an Excel chart to present your data?
Minchanka [31]
The second one is correct
5 0
3 years ago
Read 2 more answers
10. In about 100 words Describe two or three social networking apps that could use a smartphone GPS capability be sure to make c
AlekseyPX

Answer:

Check the explanation

Explanation:

Almost all smartphone devices have global positioning satellite (GPS) service capabilities in them, which mean that apps will be able to combine the phone user's location with the available retail outlets and services to build better mobile business opportunities. For instance, some applications can navigate the user to a particular business locations (such as movie theaters, restaurants, or a nearby auto repair facilities) based on the user's present location.

App like twitter can use the GPS capability to tailor yhier user feeds and timelines with digital contents that are intresting to users in that location.

amazon can advertise based on the need of consumers in a particular location.

Google also tailor thier adword and adsense advert based on the location of the user.

6 0
3 years ago
In computing descriptive statistics from grouped data, a. data values are treated as if they occur at the midpoint of a class. b
koban [17]

Answer: Option A: data values are treated as if they occur at the midpoint of a class

Explanation: In computing descriptive statistics from grouped data, data values are treated as if they occur at the midpoint of a class

7 0
3 years ago
Read 2 more answers
Other questions:
  • Give two examples of desktop publishing software
    7·1 answer
  • Numeric data is stored in ___________ for direct processing.
    10·2 answers
  • Leslie’s form collected a huge amount of data. Over time the employees felt that the applications slowed down. What should lesli
    12·1 answer
  • What is one important feature of an aup? 1. a list of all available courses. 2. a clear out line of the consequences of violatin
    12·2 answers
  • 5. Write a program to remove any duplicate letters from a word and display the new word maintaining the original order. For exam
    12·1 answer
  • True or False <br><br> Rootkits are only made by black-hat hackers.
    8·1 answer
  • ___________ system allows us to talk to any person in the world it any time​
    15·2 answers
  • A host is on the 192.168.146.0 network that has a subnet mask of 255.255.255.0. The binary value of the host portion is 11010101
    8·1 answer
  • Help me please. I'LL MARK BRAINIEST
    15·1 answer
  • That’s what I have so far. I need help!
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!