question 1 for an assignment you wrote the method sort largest depth in the class quakesortinplace to sort earthquakes by their depth from largest depth to smallest depth using the selection sort algorithm. modify this method to do exactly 50 passes and then modify testsort to run this method on the file earthquakedatadec6sample2.atom. the file may not be completely sorted as there are more than 50 quakes in the file. after running your program of 50 selection sort passes on this file, what is the depth of the last earthquake in the arraylist?

Answers

Answer 1

ArrayList is a class in the java.util package and a component of the Java collection system. In Java, it offers us dynamic arrays.

The depth of the last earthquake in the arraylist exists -100000.00.

What is meant by arraylist?

ArrayList is a class in the java.util package and a component of the Java collection system. In Java, it offers us dynamic arrays. Although it might be slower than conventional arrays, it can be useful in programs that require a lot of array manipulation. Java contains a class like this.

A resizable array that is part of the java.util package is the ArrayList class. Built-in arrays have a fixed size, but ArrayLists have a dynamic size. An ArrayList can have elements added and removed as needed, which aids in memory management for the user.

The elements are kept in a dynamic array by ArrayList internally. Internally, LinkedList stores the elements in a double-linked list.

The depth of the last earthquake in the arraylist exists -100000.00.

To learn more about ArrayLists refer to;

https://brainly.com/question/26666949

#SPJ4


Related Questions

write a function called remove duplicates that accepts a list and returns a list containing the same elements in the same order but with duplicates removed. for example, if the argument is [7, 4, 2, 7, 2, 2, 9, 4], the returned list would be [7, 4, 2, 9].

Answers

The function that called remove duplicates that accepts a list and returns a list containing the same elements in the same order but with duplicates removed is def remove_duplicates(lst).

The method of obtaining the unique list from a list that may contain duplicates is the subject of this article. Remove duplicates from list procedure has a wide range of uses, thus understanding it is beneficial.

This is the simplest and quickest way to complete a specific activity. After eliminating the duplicates, it returns a dictionary that must be transformed into a list.

List in the beginning: [1, 2, 4, 2, 1, 4, 5]

[1, 2, 4, 5] is the list after deleting duplicate elements.

Depending on the elements contained in the list, its size, whether or not the element order should be retained, and the effectiveness of the removal method, duplicates can be removed from Python lists using a variety of techniques. These processes might be iterative, implement themselves using built-in functions, or import functionality from modules.

To know more about duplicates click on the link:

https://brainly.com/question/28609285

#SPJ4

write a sql statement to show the average item cost for each vendor. the output should list vendor company names, vendor phone numbers, and the average item cost

Answers

The SQL statement to show the average item cost of each vendor is avg(vendor_avg_item_cost).

GROUP BY Vendor_companyname, Vendor_phonenumber, Ven_avgcost

What is avg() function?

The syntax for the avg() function is as follows: SELECT AVG(column name) FROM table name; Data from a table can be retrieved using the avg() function and a SELECT query.

what is a GROUP BY statement in SQL?

Finding summary rows, such as "find the number of consumers in each country," is done with the GROUP BY statement, which groups rows with similar values. The COUNT(), MAX(), MIN(), SUM(), and AVG() aggregate functions are frequently used with the GROUP BY statement to group the result set by one or more columns.

Therefore, the SQL statement to show the average is avg().

To learn more about the SQL from the given link

https://brainly.com/question/27851066

#SPJ4

mohammed needs to open a firewall port so that web traffic can be passed through the firewall. what protocol is used for web pages, and on which port does it work?

Answers

HTTP protocol with port number 80 is used to open a firewall port

What is an HTTP protocol?

An application-layer protocol called Hypertext Transfer Protocol (HTTP) is used to send hypermedia documents like HTML. Although it was created for web browser and web server communication, there are other uses for it as well.

Explanation :

Your computer sends network data identifying itself as traffic intended for port 80 of the web host whenever you want to view a website. The firewall on the web server is configured to allow incoming traffic to port 80, so it acknowledges your request (and the web server, in turn, sends you the web page in response). 

How HTTP protocol controls the network traffic ?

By controlling network traffic, a firewall can assist in protecting your computer and data. By preventing unwanted and unsolicited incoming network traffic, it accomplishes this. By scanning this incoming traffic for malicious content like hackers and malware that could infect your computer, a firewall verifies access.

Thus we can conclude that at port 80 HTTP protocol is used

https://brainly.com/question/12921030

#SPJ4

Other Questions
How do I write the Empirical Formula for: A compound composed of: 9.93% carbon, 58.6% chlorine, and 31.4% fluorine The figure on the right is a scale drawing of the figure on the left. What is the scale factor? What is the initial velocity of an automobile acquiring a final velocity of 32 m/s with an acceleration of 4.0m/s A steel cable on a bridge has a linear mass density of 15 kg/m. If the cable has been pulled taunt with a tension of 5536 N, what is the speed of a wave on it? I need help with review on functions I need help answering the 2nd part of this question Elaine just accepted a new job and is working with the company's HR department to fill outpaperwork. Which of the following steps is she responsible for?a. Determine how much tax to withhold from her paychecks based on W-4 informationb. Complete a W-4 formc. Send withholding amounts to the federal governmentd. Complete a W-2 form Convert the polar equation r=3 to a Cartesian equation.x^2+y^2=3x^2+y^2=3x^2+y^2=9 PLEEEEASE ANSWER ASSAPSubtract and simplify:812 523 = _____ for self-constructed assets, the costs incurred include labor, materials, and multiple choice question. overhead. depreciation expense. research and development. operating costs. copper has two stable isotopes,and , with masses of 62.939598 amu and 64.927793 amu, respectively. calculate the percent abundances of these isotopes of copper. Which graph does not represent a function? simplify the expression (a^3)^k*a^k 4. Compare and contrast the media of the two stories. In your opinionmedia of the stories affect audiences in similar or different ways? Give examples. Solve the equation. Check your solution.20x - 4= 50x + 2x=(Simplify your answer. Type an integer or a simplified fraction.) Find the perimeter of a rectangular garden that has a width of 4x6 and a length of 2x+4. A6x2B12x4C8x^2+4x24D12x^2+20 To make an open box from a 175cm by 100cm piece of cardboard, equal-sized squares will be cut from each of the four corners and then the sides will be folded up. What is the approximate volume of the largest possible box that can be made?Group of answer choices:A) 324,146 cm^3B)162,073cm^3C) 251,707cm^3D)189,640cm^3 Write the sum of (4 10) + (3.2 10) in scientific notation.A) 43.2 x 104B 4.32 x 105C) 43.2 x 105D) 7.2 x 10 How to solve 9/10 x 5/2 -5/4 a reaction involving acetic acid has an enthalpy change of 55.7 kj/mol. what is the concentration of 27.90-ml of this acetic acid solution if the reaction it is involved in evolves 716.12-j of heat?