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
What impact did congress declaration on copyrighting sound recordings have on home recording and record sales
cricket20 [7]

Answer:

By the late 1980s, several manufacturers were prepared to introduce read/write digital audio formats to the United States. These new formats were a significant improvement over the newly introduced read-only (at the time) digital format of the compact disc, allowing consumers to make perfect, multi-generation copies of digital audio recordings. Most prominent among these formats was Digital Audio Tape (DAT), followed in the early 1990s by Philips' Digital Compact Cassette (DCC) and Sony's Minidisc.

DAT was available as early as 1987 in Japan and Europe, but device manufacturers delayed introducing the format to the United States in the face of opposition from the recording industry. The recording industry, fearing that the ability to make perfect, multi-generation copies would spur widespread copyright infringement and lost sales, had two main points of leverage over device makers. First, consumer electronics manufacturers felt they needed the recording industry's cooperation to induce consumers – many of whom were in the process of replacing their cassettes and records with compact discs – to embrace a new music format. Second, device makers feared a lawsuit for contributory copyright infringement.[1]

Despite their strong playing hand, the recording industry failed to convince consumer electronics companies to voluntarily adopt copy restriction technology. The recording industry concurrently sought a legislative solution to the perceived threat posed by perfect multi-generation copies, introducing legislation mandating that device makers incorporate copy protection technology as early as 1987.[2] These efforts were defeated by the consumer electronics industry along with songwriters and music publishers, who rejected any solution that did not compensate copyright owners for lost sales due to home taping.[3]

The impasse was broken at a meeting in Athens in 1989, when representatives from the recording industry and the consumer electronics industry reached a compromise intended to enable the sale of DAT recorders in the United States. Device manufacturers agreed to include SCMS in all consumer DAT recorders in order to prevent serial copying. The recording industry would independently pursue legislation requiring royalties on digital audio recording devices and media.[4]

A year later the songwriter Sammy Cahn and four music publishers, unhappy with the absence of a royalties provision in the Athens agreement, filed a class action copyright infringement suit against Sony.[5] The plaintiffs sought declaratory and injunctive relief that would have prevented the manufacture, importation or distribution of DAT recorders or media in the United States. The suit brought Sony to heel. In July 1991, Sony, as part of larger agreement between the recording industry and consumer electronics makers, agreed to support legislation creating a royalty scheme for digital media. In exchange, Cahn and the publishers agreed to drop the suit.[6]

With all the major stakeholders satisfied, the bill easily passed both houses of Congress. President George H. W. Bush signed the AHRA into law in 1992 proclaiming " S. 1623 [AHRA] will ensure that American consumers have access to equipment embodying the new digital audio recording technology. It also protects the legitimate rights of our songwriters, performers, and recording companies to be fairly rewarded for their tremendous talent, expertise, and capital investment. This will be accomplished by fairly compensating these artists for the copying of their works and by creating a system that will prevent unfettered copying of digital audio tapes."

3 0
3 years ago
Read 2 more answers
This sensor is used for burglar alarms<br>A. temperature<br>b. humidity<br>c. movement<br>d. PH​
bogdanovich [222]

Answer:

C

Explanation:

Have a great summer :)

8 0
3 years ago
Rows within a spreadsheet are identified by:
EleoNora [17]

Answer:

Option C: Numbers.

Explanation:

By default, rows within a spreadsheet are identified by Numbers i.e. 1,2,3,............

Total rows are 1048575 in one spreadsheet.

7 0
3 years ago
Beneficios del reciclaje electrónico
kykrilka [37]

English:

Recycling, in general, is good, it saves space in landfills and prevents pollution. Because some of the materials used to make the electronic piece are made with toxic ingredients its better to recycle them instead of having them end up in our oceans. Also, some pieces of electronics contain valuable metals like gold and copper. These Metals can be reused to make new better electronics with having to use the energy and money to produce new materials  

Español:

El reciclaje, en general, es bueno, ahorra espacio en los vertederos y evita la contaminación. Debido a que algunos de los materiales utilizados para fabricar la pieza electrónica están hechos con ingredientes tóxicos, es mejor reciclarlos en lugar de que terminen en nuestros océanos. Además, algunos componentes electrónicos contienen metales valiosos como el oro y el cobre. Estos metales se pueden reutilizar para fabricar nuevos y mejores productos electrónicos con la necesidad de utilizar la energía y el dinero para producir nuevos materiales.

4 0
3 years ago
_____ can be used to convert digitized documents into ASCII (American Standard Code for Information Interchange) text that can b
solniwko [45]

Answer:

Optical Character Recognition

Explanation:

Optical Character Recognition is a method that is used to read character and bar codes. They convert scanned image into digital format. In other words ASCII text can be formed when a digitized document is converted.OCR is a method that convert document into word.

Here are some OCR tools which convert digitized format into machine readable text.

  • Microsoft Document
  • Microsoft One Note

8 0
3 years ago
Other questions:
  • How do you insert a new row into a worksheet
    5·1 answer
  • You find that you are missing a very important file. After much searching, you have determined that it is no longer on your comp
    13·2 answers
  • What did Francis Ford Coppola and George Lucas create?
    10·1 answer
  • Quiz
    6·2 answers
  • i set up an account and paid the yearly fee, now it's asking me to join. i've tried to log in and brainly isn't accepting my ema
    8·1 answer
  • Which of the following can computer maintenance software determine?
    6·1 answer
  • Which branch of science helps avoid or minimize stress-related injuries at workplace?
    14·2 answers
  • What is Fill handle?
    12·1 answer
  • SOMEONE PLEASE HELP ME OUT WITH THIS PLEASE
    13·1 answer
  • How do I fix when it hits the second session it skips scanf.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!