Wednesday July 26, 2000


Quiz 28


1. What is the one field associated with an array?

2. When an array is sent as a parameter to a method, is it sent pass by value or pass by reference?

3. What is the syntax for declaring a two-dimensional array?

4. Given an array of size n, about how many times will we need to examine the array in order to find the element we are looking for using the Binary Search technique?
































The breakdown of the final exam will be

20% Fill in the Blank
10% Matching
20% Short Answer
30% Discussion
20% Coding

The exam will be comprehensive and you may use the reviews for Exam1 and Exam2 as a guide. The material on the final exam will be found in those reviews and the following topics.

  • How to declare multi-dimensional arrays.

  • Explain the difference between a pass by value and a pass by reference

  • How does the BubbleSort work?

  • How does the SelectionSort work?

  • How does the Binary Search technique work?

  • Given an array of size n, about how many subarrays will we need to examine in order to find the element we are looking for?

  • What is the complexity or efficiency of the QuickSort algorithm? the BubbleSort?

    In the coding portion you will be asked to write a small program involving one-dimensional arrays. Make sure that you are familiar with the Binary Search technique and either the BubbleSort or SelectionSort.

    Recall our discussion from yesterday about pass by value vs. pass by reference.


    On the exam there will be one bonus question. One possible question might be the following.

    Suppose you are given an array with 3 rows and 4 columns and are allowed to perform either of the following operations.

    1. Multiply a row by a non-zero constant.

    2. Replace a row by taking its sum with a non-zero multiple of any other row.

    Using these operations transform the array into one which has the following form.

    1 0 0 x
    0 1 0 y
    0 0 1 z