Question: NEED IN PSEUDOCODE & FLOWCHART - - Assignments What to Do create a module called fillArray that has two input parameters; one is for the
NEED IN PSEUDOCODE & FLOWCHART Assignments
What to Do
create a module called fillArray that has two input parameters; one is for the array to be filled and the other is for its size.
create a module called displayArray that has two input parameters; one is for the array to be displayed and the other is for its size.
create a sorting module of your choice and the binary search function:
bubbleSort: pages lines
selectionSort: pages lines
insertionSort: pages lines
binarySearch: page line
Hints:
don't try to create a sorting module or a search function yourself; study, understand, and use the pseudocode from the textbook only
it can be seen from the textbook, there is an input parameter for array size in all the sorting and the binary search algorithms. However you don't need such a parameter in Flowgorithm, because you can use the size function to get array size.
sorting algorithms are called modules, but the binary search algorithm is called a function. The rule is that if a block of pseudocode doesn't return a value, it is called a module; if a block of pseudocode returns a value, it is called a function.
Create main and in main do the following in sequence:
create an integer array of size
fill the array with random numbers in the range of through
display every element in the array
sort the array using the sorting module of your choice
display every element in the array
create a random number in the range of through
use the binary search function to search the number
display your search results: the number is or is not in the array
Hints:
create a constant and use it as array size
use the constant in array creation and display
pay attention to the usage difference of function random in pseudocode and in Flowgorithm
you cannot create a constant in Flowgorithm, but can use function size to get array size
you can copy the flowcharts in this instruction
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
