Chapter 8 Outcomes
Arrays
Knowledge Outcomes
Define each of the key terms listed in the chart below.
| array element | array index | array subscript |
| frequency distribution | related lists | dynamic arrays |
| init | one-dimensional arrays | two-dimensional arrays |
| upper | sequential search | binary search |
| client programs | array parameters | scalar variables |
| n2 running time | n (log n) running time | big O notation |
Describe the difference between subprograms (procedures and functions) and classes (8.0).
State what an array declaration must contain, and give an example (8.1).
Explain why it is considered good style to create named constants rather than actual numbers when controlling loop boundaries (8.1).
Explain how an array is used to determine the frequency distribution of characters found in a file (8.1).
Describe how a class (and the associated client program) can be used in combination with an array to maintain a list of items using operations such as insert, delete, and print (8.1).
Explain how an array is used in the sieve of Eratosthenes to calculate prime numbers (8.1).
Describe the principle used to manage multiple data types using related lists of arrays (8.2).
Show how to initialize single and two-dimensional arrays (8.3 - 8.4).
Explain how information is stored when an array has more than one index (i.e. as in a two-dimensional array) (8.4).
Show how a procedure can be designed to handle arrays of various sizes (8.5).
Using "list2.tu" and "list3.tu" as an example, describe the general principle of how sorted arrays are maintained by insertions and deletions of elements into the array (8.6).
Explain how a sequential search algorithm works (8.6).
Using "list4.tu" as an example, explain how a binary search algorithm works (8.6).
Describe the factors that contribute to the speed of an algorithm (8.7).
State the general relationship between the running time of an algorithm and the number of items that the algorithm is expected to handle (8.7).
State the difference between the running time of binary searches compared to sequential searches (8.7).
State the importance of big O notation to calculating the running time of an algorithm (8.7).
List the two immaterial details when calculating big O running time (8.7).
State the important constructs that must be considered when determining the big O time of an algorithm (8.7).
Skills Outcomes
Create and correctly utilize arrays in an appropriate manner to solve a variety of problems. This might include;
Create a dynamic array (8.3).
Pass array parameters as either fixed or var (8.5).
Categorize sorting algorithms into either n2 or n(log n) types based on their efficiency (8.7).