Project 01
Home ] Up ]

 

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].

  1. Display the array elements.

  2. Sort the array values in increasing order using the Bubble sort method.

  3. Display the distinct (unique) values in increasing order from the array.

  4. 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:

  1. Problem specification in your own words.

  2. Five algorithms, each with an example showing that the algorithm really works.

  3. 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