Homework: Insertion Sort
Create a public class named InsertionSorter. It should provide one class method sort. sort accepts an array of Comparables and sorts them in ascending order. You should sort the array in place, meaning that you modify the original array, and return the number of swaps required to sort the array as an int. That's how we'll know that you've correctly implemented insertion sort. If the array is null you should throw an IllegalArgumentException. You can assume that the array does not contain any null values.
To receive credit implement insertion sort as follows. Have the sorted part start at the left and grow to the right. Each step takes the left-most value from the unsorted part of the array and move it leftward, swapping elements until it is in the correct place. Do not swap equal values. This will make your sort unstable and cause you to fail the test suites.

Answers

Answer 1

Answer:

Explanation:

I have written the code in Java. It contains the class Insertion Sorter which has the InsertionSort function. This function uses the insertion sort algorithm to sort a comparable array and if it fails to do so for whatever reason it throws an Illegal ArgumentException. If it sorts the array correctly it returns the number of changes that needed to be made in order to correctly sort the array. Due to technical difficulties I have attached the code as a text document below and proof of output in the picture below as well.

Homework: Insertion Sort Create A Public Class Named InsertionSorter. It Should Provide One Class Method

Related Questions

NO LINKS
Do you need to pay monthly to stream on Twitch?

Answers

I think so yeah $$$$

PLZZ HELP!!!
Select the correct answer.
Brian’s team has built a new application based on the client’s requirements. They will deploy this application in multiple locations on the client side. Brian is unsure about the hardware and software specifications at the client side. Which option will help him best solve this issue?
A.
creating multiple test scripts
B.
automating test scripts
C.
creating multiple test plans
D.
creating multiple test environments
E.
communicating with the development team

Answers

Answer: Option D creating muiltiple test enviroments

Explanation: I had the same question and I hope this helps ( :

The option that will help Brain best solve this issue is by creating multiple test environments.

What is the specification of software?

A software requirements specification (SRS) is known to be a type of requirement that are often written in a document that tells more about what the software can do.

Hence in the above scenario, what will help help Brain best solve this issue is by creating multiple test environments where the client can see a demonstration and be convince in getting the product.

Learn more about application from

https://brainly.com/question/24847617

red + blue =
Red + green =
Magenta - blue =
Yellow - green =
Cyan - blue =​

Answers

Answer:

red + blue is green

red + green is blue

HELPPPPPP How is does technology impact the career of your choice? Write 5-6 sentences about how technology impacts the career of your choice.

Answers

Answer:

Explanation:

Summary. Technology has had a dramatic impact on the nature of work itself, individual applicants and employees, employers, and career counselors. It has changed the nature of work and the types of jobs that people do today. It has altered the knowledge and skills individuals need to be effective workers.

Your manager asks you to get details on a computer crash. What Windows Administration Tool could you use?
A. System Information
B. Performance Monitor
C. Windows Memory Diagnostic
D. Event Viewer
E. Log Viewer

Answers

The answer is "Option C" because the WMD is a freeware memory test software that works excellently. It is a comprehensive math question, and it is also quite straightforward to use.They suggest that you first test your ram with Memtest86, but you really should always test a second time with a different memory testing application to be certain.Microsoft Windows Diagnostic is the second tool, that scans your laptop's physical memory & identifies any faults. It requires a reboot to be used the system that will restart, and you'll be unable to your mouse in the Memory Diagnostic Tool.

The wrong choices can be defined as follows:

In option a, it is wrong because the data warehouse transforms data into information that may be used by an organization's decision-making process.In option b, it is wrong because by using Metrics Collector Groups and logging the data, it was able to display real-time market data as well as collect and store data.In option d, it is wrong because this is a tool used in Windows, which displays detailed information about major events that have taken place on your machine.In option e, it is wrong because messages and trace logs could be viewed and sorted using the Log Viewer.

Learn more:

Memory Diagnostic: https://brainly.com/question/13606234

what is information richness

Answers

Information Richness is the ability of information to change understanding within a time interval.

Hope it helps. Have a great day.

Brainliest would be greatly appreciated.

___________________________________________________________

#SaveTheEarth

#SpreadTheLove

- Mitsu JK

HELPPPPP PLZZZZZZZZZZZZZZZ!!!!!!!!


Select the correct answer.
What type of diagram does the following image depict?


A.
class diagram
B.
deployment diagram
C.
activity diagram
D.
sequence diagram
E.
use case diagram

Answers

Answer:

A

Explanation:

A hope this helped ;)

An array stores data using multiple variable names.

True

False

Answers

Answer: False

Explanation:

It is false that an array stores data using multiple variable names, as it may not as, for starters, an Array cannot store multiple types of variable values. A container object that holds a fixed number of single-type values is known as an array.

What is an array?

A data structure that stores a collection of elements of the same data type under a single variable name is known as an array.

The index number, which is an integer value that represents the element's position within the array, is used to access it.

In other words, an array stores multiple values of the same data type in contiguous memory locations using a single variable name.

For starters, we cannot store multiple types of variable values in an Array. An array is a container object that holds a fixed number of single-type values.

Thus, the given statement is false.

For more details regarding an array, visit:

https://brainly.com/question/19570024

#SPJ3

Mattias's friend asked him to critique his presentation about gorillas. Mattias noticed that there weren't any images of gorillas. What feedback can Mattias give to improve his friend's presentation?
a I like your title, but did you not think to add pictures of gorillas?
b It's ok, but it would be better if I just added pictures to your presentation.
c Really great information, but I think adding a picture of a gorilla would be great.
d You're missing a gorilla picture. Add one.

Answers

Answer:

c

Explanation:

Answer:B

Really great information, but I think adding a picture of a gorilla would be great.

Explanation:

Mattias's friend asked him to critique his presentation about gorillas. Mattias noticed that there weren't any images of gorillas. What feedback can Mattias give to improve his friend's presentation?

Group of answer choices

A)You're missing a gorilla picture. Add one.

B)Really great information, but I think adding a picture of a gorilla would be great.

C)I like your title, but did you not think to add pictures of gorillas?

D)It's ok, but it would be better if I just added pictures to your presentation.

PLZ HELP!!!

Select the correct answer.
Emma, the quality control manager in a software development company, asks the testing team to check whether the user interface is friendly. To which type of testing is Emma referring?
A.
usability testing
B.
data comparison
C.
validation testing
D.
stress testing
E.
destruction testing

Answers

Answer: A. Usability testing
Explanation:
Usability testing would be the correct answer because if the user interface isn't "frendly" then people won't be able to use it properly. Or if you are refering to the word friendly as looking safe, then even more so would be usability testing. Because if people don't like the fonts and styles of the user interface, they might not use it at all.

"Wake up to reality! Nothing ever goes as planned in this world. The longer you live, the more you realize that in this reality only pain, suffering and futility exist.
Where is this quote from

Answers

Answer:

Naruto Shippuden and from madara uchiha

Explanation:

Answer:

Madara to Obito in Naruto Shippuden after Obito regains conscious from passing out under the rock from the third graet ninja war

Explanation:

What keys on the keyboard have the ability to move the cursor around on a window?

No links and files or I report!
Will give Brainliest!​

Answers

Answer:

Press the Windows key on your keyboard. In the box that appears, type Ease of Access mouse settings and press Enter . In the Mouse Keys section, toggle the switch under Use numeric pad to move mouse around the screen to On. Press Alt + F4 to exit this menu.

Is this correct? I say its B, but my friend says its D.

Answers

The answer is B, best of luck!

Why data mining is crucial for the success of a business, explain with examples

Answers

Answer:

For businesses, data mining is used to discover patterns and relationships in the data in order to help make better business decisions. Data mining can help spot sales trends, develop smarter marketing campaigns, and accurately predict customer loyalty.

HELP! WILL GIVE BRANLIESt!

Answers

Answer:

36:12, 36/12, 3/1

Explanation:

I’ve never solved a problem like this but mathematically this answer makes sense

PLEASEE HELPP.... QUESTION... how does coding impact your life​

Answers

Answer: It allows us to do everyday tasks on the internet

Explanation: We wouldn’t be able to email, research, etc without coding!

It helps us use things such as the internet, TVs and many other things coding is a Vidal asset in are everyday life.

The process of using the new

information system and doing away

with the old system is known as

system ___.​

Answers

Answer:

The process of using the new

information system and doing away

with the old system is known as

system development

Write a program that computes the sum of squares for a sequence of positive whole numbers. The program asks the user to enter the starting number. Then it asks the user to enter an ending number. It computes the square for each number from the starting number to the ending number. It also calculates the sum of these squares. It displays the numbers, their squares and the sum of the squares.

Answers

Answer:

In Python:

start = int(input("Start: "))

end = int(input("End: "))

total = 0

print("Number\t Squares")

for num in range(start,end+1):

   print(num,"\t",num**2)

   total+=num**2

print("Total: ",total)

Explanation:

This gets the starting number

start = int(input("Start: "))

This gets the ending number

end = int(input("End: "))

This initializes total to 0

total = 0

This prints the header

print("Number\t Squares")

This iterates through start to end

for num in range(start,end+1):

This prints each number and its square

   print(num,"\t",num**2)

This calculates the total squares

   total+=num**2

This prints the calculated total

print("Total: ",total)

9.6 code practice edhesive

Answers

Answer: i got 50% for this I don’t know what to fix

Explanation:

Answer:

def printIt(ar):

   for row in range(len(ar)):

       for col in range(len(ar[0])):

           print(ar[row][col], end=" ")

       print("")

N= []

for r in range(4):

   N.append([])

for r in range(len(N)):

   value = 1

   for c in range(5):

       N[r].append(value)

       value = value +1

printIt(N)

print("")

newValue = 1

for r in range(len(N)):

   for c in range(len(N[0])):

       N[r][c] = newValue

   newValue = newValue + 1

printIt(N)

Explanation: Ez clap

Write a program to display MPH (Miles per Hour). Create a function to calculate the MPH. Ask the user for the number of miles driven and the number of minute it took to drive that many miles. Validate that both the number of miles and the number of minutes is a positive, non-zero number. Pass both the number of miles and the number of minutes to the function, and have the function return the MPH.

Answers

Answer:

In Python:

def MPH(miles,minutes):

   mph = round(60 * miles/minutes,1)

   return mph

   

miles = float(input("Miles: "))

minutes = float(input("Minutes: "))

if miles>0 and minutes>0:

   print("MPH: ",MPH(miles,minutes))

else:

   print("Positive inputs only")

Explanation:

This defines the function

def MPH(miles,minutes):

This calculates mph rounded to 1 decimal place

   mph = round(60 * miles/minutes,1)

This returns the calculated mph

   return mph

The main begins here

This gets input for miles    

miles = float(input("Miles: "))

This gets input for minutes

minutes = float(input("Minutes: "))

If miles and minutes are positive

if miles>0 and minutes>0:

This calls the MPH function

   print("MPH: ",MPH(miles,minutes))

If otherwise, this prompts the user for positive inputs

else:

   print("Positive inputs only")

Click this link to view O*NET’s Work Contexts section for Librarians.

It describes the physical and social elements common to this work. Note that common contexts are listed toward the top, and less common contexts are listed toward the bottom. According to O*NET, what are common work contexts for Librarians? Check all that apply.

face-to-face discussions
pace determined by speed of equipment
cramped work space, awkward positions
indoors, environmentally controlled
telephone and electronic mail
freedom to make decisions

Answers

Answer:

1. b,d,f  2. a,b,c,f  3. b,c,e,f  4. a,c  5. a,b,c,e  6. a,b,c

7. d,e,f  8. a,b,e,f   9. a,c,d  10. b,d,f  11. c,e,f  12. a,c,e,f

Explanation:

all the answers to Finance Workplaces and Tasks Assignment 100%

Answer:

1, 4, 5, 6

Explanation:

the only options that are on the website

What information will you find in the 16-bit field in an IP datagram?

Answers

Answer: This 16-bit field defines the entire packet size in bytes, including header and data. The minimum size is 20 bytes (header without data) and the maximum is 65,535 bytes. All hosts are required to be able to reassemble datagrams of size up to 576 bytes, but most modern hosts handle much larger packets.

Explanation: Hopefully this helps you with what ever u are doing.

An information which you will find in the 16-bit field in an IP datagram is: the total length of the datagram it's attached to.

An IP address is an abbreviation of internet protocol address and it can be defined as a unique number assigned to a computer or other network devices such as routers, switches, etc., in order to differentiate each device from one another in an active network system. Thus, an IP address is typically used to uniquely identify each computer or network device connected to the internet or an interconnected network.

In Computer networking, IP address are classified into two (2) main categories and these are;

Local (internal) IP address.Global (external) IP address.

An IP datagram can be defined as the standard format of data that an internet protocol (IP) recognizes.

Generally, an IP datagram comprises two (2) main components and these include:

1. The header: it is used for sending messages on a computer to the protocol in the same layer of a destination (recipient) computer.

2. The data: this is a set of information that is transmitted from one computer to another over an interconnected network.

On a related note, an IP datagram contain three (3) fields which are typically used for the transmission of data;

Header length.IP version.Total length.

The Total length is a field that is used to specify the total length of an IP datagram and it is typically 16-bits in size.

In conclusion, an information which is found in the 16-bit field in an IP datagram is the total length of the datagram it's attached to.

Find more information here: https://brainly.com/question/19204809

Draw a data flow diagram that indicates the condition and factors that must be satisfied before a customer request for goods can be granted from a factory

Answers

Skies in here and the beach and

the process of preparing and setting up a software on a computer is called​

Answers

Answer:

installation

Explanation:

Installation (or setup) of a computer program (including device drivers and plugins), is the act of making the program ready for execution.

Writing a function that implements a loop to collect a set amount of data. The function should use the serial object, the recording time, and the iteration (city number) as input arguments and return an N x 2 array with the time in the first column and the recorded light level in the second. (4 pts). Include in this function outputs to the Command Window noting the starting and stopping of the recording.

Answers

You can still go on a date with you if I get a text from my friend that is in a relationship and you don’t know why


Write
algorithm to read 100 numbers
then display the largest.

Answers

Answer:

see picture

Explanation:

There is no need to store all the values, you can just keep track of the highest. Up to you to create a numbers file with 100 values.

All of the following are problem-solving steps except:
A. taking action.
B. defining the problem.
c. doing the first solution that comes to mind.
D. creating possible solutions.

Answers

Answer:

C. Doing the first solution that comes to mind.

Explanation:

Lets break this down a bit.

A is a great problem solving step, so we can mark that off.

We can do the same for B.

However, for C, I am hesitant about this one, so I wont mark it off quite yet.

Finally, for D, it is definitely a step, so I can mark that off.

You should never do the first solution that comes to mind, since you haven't done enough brainstorming about other ideas.

Hope this helps!

Select the correct answer.
Who takes care of the final layout of the product that meets the standards set by UX designers?
O A web developer
ОВ.
design director
OC. UX designer
OD. UI designer
Reset
Next
Hi

Answers

Answer:

UI designer

Explanation:

Let's talk about this cryptocurrency: Vechain (VET)​

Answers

Answer:

This is gonna be interesting

Digital computers use a........ system to encode date and programs.

Answers

Answer:

Digital computers use a binary system to encode date and programs.

Other Questions
Find the value of x.5x130O A. 10O B. 36O c. 26O D. 18 Which of the following best describes the message of the old man who fell into the river?Don't walk to close to the edge of the riverGo with the flowHold your breath and things will work out.take swimming lessons: you never know when you might need them.Based on taoism and i really need help How many cubic units are in this box?A. 6B. 9C. 11D. 18E.none of these Given 300mL of a gas at 17.0 degrees Celsius, what is the volume at 10 degrees Celsius if the pressure remains constant? Why is it so important as humans to take care of the cardiovascular system? A town government is designing a new bus system. The planners are deciding where to put the different bus stops. They want to pick a set of bus stop locations that will minimize the distance anyone needs to walk in order to get to any bus stop in town. What term best defines this kind of problem The energy transferred to the water in 100 seconds was 155 000 J. specific heat capacity of water = 4200 J/kg CDetermine the mass of water in the kettle.Use Figure 10.Give your answer to 2 significant figures.Any help would be appreciated Plz someone help, really struggling How many liters of carbon monoxide are needed to react with 32.65 g oxygen gas to produce carbon dioxide? What are the four organelles that process, transport, and stone materials?ANSWER QUICK PLZZ no website What is the mood i need help Solve the following quadratic equation for all values of x in simplest form (x+4)+38=47 Help me please and i will give you a brainlist There are 3 flag stamps and 7 follower stamps in Noelles stamp collection. What is the ratio of flower stamps to flag stamps Mhanifa please help! Look at the picture attached!!! Zr + O B + O Zn + C Co + I Mg + Br In her Infinity Rooms, Kusama places mirrors on the walls and ceilings. This creates an endless ___________ of space.montagerepetitionformpainting PLS HELP PLS PLS PLS For #1-2, determine if the sequence is arithmetic or geometric. Then find its common difference or ratio.1.1/2, 1, 2, 42. -5, 1, 7, 13 Read the conclusion from a student's rhetoricalanalysis essayWhich sentence could be added to improve thisconclusion?Natalie Wexler effectively argues that reform in civicseducation is needed. She believes that "Instead ofrethinking civics, we need to rethink basic assumptionsabout teaching and learning." She juxtaposes currentteaching methods like "action civics" with new ideaslike the use of journalism. This compels the audience toconsider how reform can help students engage in theircommunities and understand multiple perspectives onissues. She also appeals to authority to make herclaim. She effectively explains why it is more importantto reconsider principles of teaching and learning whenconsidering how to improve civics educationO Wexler blames weaknesses in our educationalsystem for why many students do not know factsabout historyO Wexler cites expert research that current methodsare resulting in a disheartening lack of civicsknowledgeO Wexler cares a great deal about the topic and is anexpert in educational reformO Wexler relies on strong reasoning, but some of herpoints are rooted more in opinion than in fact Which situations illustrate that the sum of opposite numbers is zero?A) Will receives a gift card for $60 and spends all of it on a video game.B) John receives $50 for mowing a lawn and an additional $50 for walkingdogs this weekC) Kyle deposits $600 into his account on Monday and withdraws $600 at theD) ATM the next day.Sheila advances 5 squares on a board game. On her next turn, she goesforward 5 squares.E) The animal shelter receives $3000 in donations and pays an invoice of$3000 for food and supplies. HELP ASAP!!! WILL GIVE BRAINLIEST!!!