IDS 201 MVCC Write a Program Code Computer Programming Questions

IDS201 Homework 4Write 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)

Calculate your order
275 words
Total price: $0.00

Top-quality papers guaranteed

54

100% original papers

We sell only unique pieces of writing completed according to your demands.

54

Confidential service

We use security encryption to keep your personal data protected.

54

Money-back guarantee

We can give your money back if something goes wrong with your order.

Enjoy the free features we offer to everyone

  1. Title page

    Get a free title page formatted according to the specifics of your particular style.

  2. Custom formatting

    Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.

  3. Bibliography page

    Don’t pay extra for a list of references that perfectly fits your academic needs.

  4. 24/7 support assistance

    Ask us a question anytime you need to—we don’t charge extra for supporting you!

Calculate how much your essay costs

Type of paper
Academic level
Deadline
550 words

How to place an order

  • Choose the number of pages, your academic level, and deadline
  • Push the orange button
  • Give instructions for your paper
  • Pay with PayPal or a credit card
  • Track the progress of your order
  • Approve and enjoy your custom paper

Ask experts to write you a cheap essay of excellent quality

Place an order