Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ASAP 1. 2. Create a class called ArrayReview with one data field of an integer array. (2 points) Add a constructor to populate the array

ASAP
image text in transcribed
1. 2. Create a class called ArrayReview with one data field of an integer array. (2 points) Add a constructor to populate the array in the class using Java random number generator, and a setter/getter for the array, and tostring0. The array length is passed to the constructor. (3 points) Add the following methods to the class and use them in the main method: (5 points) 3. setKthltem(k, item) that set the kth element of the array to the value given in "item" b. a. pickMaxindex(arr, start, end) that returns the index of the largest value of the array from index start to index end. c. Swaplarr, index-i, index-i) that swaps the value in index I with the value in index 4. Popular a two-dimension array from an input file of 5 rows and 10 columns, sort each row and 5. Create a main method to print the integer array after sorted, using for-each state without using d. selectionSort() that sorts the array in descending order, i.e. the largest one comes first sort each column, then print out the data to an output file. (5 points) indexes. (5 points) Bonus: (5 points) 6. Create a swap method without temporary variable. 7. Implement an algorithm to figure out if someone has won a game of tic-tac-toe

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

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions

Question

Define succession planning. Why is it important?

Answered: 1 week ago