Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab Description : Create a random array of numbers from 1 10. Then, move all of the 7s to the front of the array. The

image text in transcribedimage text in transcribedimage text in transcribed

Lab Description : Create a random array of numbers from 1 10. Then, move all of the 7s to the front of the array. The order of the other numbers is not important as long as all numbers follow the group of Lucky 7s. Looking at the code for insertion sort and selection sort might be very helpful for this assignment Attays toStig) wil also be useful. For instance, if you are given the list: 4 56712 3 7 The list could become- all 7s must be first:: 7764 12 3 5 Files Needed: NumberShifter.Java NumbershifterRunner.java Sample Data Data is all random Sample Output [1, 10, 9, 2, 8, 2, 5, 6, 10, 7, 9, 8, 6, 7, 2, 7, 6, 10, 5, 3 [y, ., .1, 2, B, 2, , 6, 10, 1, 9, 8, 6, 10, 2, 9, G. .LO, 5, 3] 12, 2, 2, 6, 2, 2, 4, 5, 3, 6, 10, 7. 5, 1, 9, 10, 7,2, 2, 7 7, 7, 7, 6, 2, 2, 4, 5, 3. 6, 10, 2, 5, 1, 9, 10, 2, 2, 2,2 [5, 9, 9, 5, 10, 5, 7, 5, 6, 7, 10, 8, 9, 9, 5, 4, 6, 6, 3, 3] import java.util.Arrays; import java.util.Scanner; import java.io.File; import java.io. IOException; import static java.lang.System.*; public class NumberShifter public static int[] makeLucky7Array( int size) return null; public static void shiftEm(int[] array) import java.util.Arrays; import java.util.Scanner; import java.io.File; import java.io. IOException; import static java.lang.System.*; public class NumberShifterRunner public static void main( String args throws IOException //add test cases

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Howdoes decentralized routing differ fromcentralized routing?

Answered: 1 week ago

Question

Differentiate sin(5x+2)

Answered: 1 week ago

Question

Compute the derivative f(x)=1/ax+bx

Answered: 1 week ago

Question

What is job enlargement ?

Answered: 1 week ago

Question

a. When did your ancestors come to the United States?

Answered: 1 week ago

Question

d. What language(s) did they speak?

Answered: 1 week ago

Question

e. What difficulties did they encounter?

Answered: 1 week ago