CSIS
250-01
|
Spring
2001
|
Date
Assigned
|
01/29/2001
|
Project
Number
|
01
|
Date
Due
|
02/05/2001
|
Write algorithms to:
Create an array of random size
n of random integer values a[0]…a[n-1]. The value of n should be
randomly selected from the closed interval [0, 99]. Values for array
elements should be selected randomly from the closed interval [1, 20].
-
Display the array elements.
-
Sort the array values in
increasing order using the Bubble sort method.
-
Display the distinct (unique)
values in increasing order from the array.
-
Display the distinct values in
increasing order with their counts.
With each algorithm, give an
example showing that your algorithm works.
Use your favorite word
processor to prepare your response. Include the following items in your
answer:
-
Problem specification in your
own words.
-
Five algorithms, each with an
example showing that the algorithm really works.
-
Completed self-evaluation
sheet.
Self-Evaluation Sheet
Component
|
Max
Score
|
Your Score
|
Problem
specification
|
1
|
|
Algorithm to
generate a random array
|
1
|
|
Example showing the
above
|
1
|
|
Algorithm to
display the array elements
|
1
|
|
Example showing the
above
|
1
|
|
Algorithm to sort
the array values in increasing order using the Bubble sort method
|
1
|
|
Example showing the
above
|
1
|
|
Algorithm to
display the distinct (unique) values in increasing order from the array
|
1
|
|
Example showing the
above
|
1
|
|
Algorithm to
display the distinct values in increasing order with their counts
|
1
|
|
Example showing
the above
|
1
|
|
Total
|
11
|
|