attachmentsSlide 1 of 2

• attachment_1attachment_1
• attachment_2attachment_2

### UNFORMATTED ATTACHMENT PREVIEW

IDS201 Homework 4 Write a program to perform functions like below: 1. Create an array (size = 50) – Assign random* integer numbers to the array (generate an unsorted list) – Range of random values between 1 and N (N >= 100) – Display data (format: 10 values per line) in the list (no comma for the last value) – Search a data (user input) from the list and there are two cases like: o Data can be found o Data does not exist in the list Display how many times of comparison made in the list for conclusion 2. Search Nth smallest data in the list (if duplicate values, do not count the 2nd or more same value) e.g. 1, 2, 2, 2, 4, 6, 9… the third smallest value = 4 3. Sort the data and display the sorted list (same format as option 1) Example (no need to make the same design, use your own creative and brilliant design +———————————————–+ | IDS201 HW4: Array Processing | +———————————————–+ 1. Generate 50 random integer unsorted list 20, 66, 70, 68, 14, 86, 66, 34, 23, 30, 88, 34, 72, 84, 69, 94, 80, 68, 39, 35, 92, 23, 22, 87, 43, 98, 44, 71, 33, 30, 92, 13, 79, 56, 76, 72, 13, 81, 68, 97, 84, 20, 85, 33, 61, 48, 38, 97, 63, 96 Search value [1 … 100]? 48 Found 48 in array[9] 2. Nth smallest value? 5 The 5th smallest value = 23 3. Sort the list: 13, 33, 56, 71, 86, 13, 33, 61, 72, 87, 14, 34, 63, 72, 88, 20, 34, 66, 76, 92, 20, 35, 66, 79, 92, 22, 38, 68, 80, 94, 23, 39, 68, 81, 96, 23, 43, 68, 84, 97, 30, 44, 69, 84, 97, 30, 48, 70, 85, 98 ********* End of homework 4 ******* Note: blue font in the above example = display result. No need blue color to print. ): Follow General assignment Rubric and HW rubric available in the BB. ** all above functions must be implemented/coded except the random generator. Submit: 1. HW4.java // no need to create a user defined class with this assignment) 2. HW4.class 3. HW4_pseudocode.ppt // pseudocode and screenshots of output only, no need to capture the entire eclipse framework Submission (through BB) due: BB sets the data/time (all based on US CST) Again, no email submission is allowed in any situation. Note * Need to use Random number generation class what Java community provides: Import java.util.Random; Instantiate random object the same way of instantiating an object: Random obj = new Random( ); // instantiate a random generator To generate a random integer number range between 0 and N-1 and to assign to a variable: number = obj.nextInt(N); QnA about HW4: Q: Do 50 random numbers repeat? A: No, new 50 random numbers are generated every time the program runs. Using the same 50 numbers by the program run is not the correct approach. Q: What is the “display number of comparisons to conclude made in the list of conclusion”? A: Simply display the number of comparisons (ie.count) to conclude FOUND OR NOT FOUND. It depends on your algorithm and implementation of searching. (multiple different ways are possible)

Do you similar assignment and would want someone to complete it for you? Click on the ORDER NOW option to get instant services at essayloop.com

Do you have a similar assignment and would want someone to complete it for you? Click on the ORDER NOW option to get instant services at essayloop.com. We assure you of a well written and plagiarism free papers delivered within your specified deadline.