Chapter 12 Outcomes
Structured Data Types: Array, Record, and File
Knowledge Outcomes
Define each of the key terms listed in the chart below.
| array | list | index of the array |
| look up | open | assert |
| close | filenumber | filename |
| skip | related lists | row |
| column | record | record data type |
| field of a record | type definition | type |
| frequency distribution | table |
Explain the difference between a basic variable (also called a scalar) and a structured data type.
Explain why the type of information which is contained in an array is all of similar type.
Explain when it is appropriate to use an array in a program.
State the four different methods for storing information into an array.
Explain why we would use a loop when putting information into an array or getting information from an array.
Explain how an exchange sort program like the bubble sort works.
Explain how a selection sort program like the select sort program works.
Explain the purpose of the assert statement when opening or closing a file.
Explain the differences between each of the following data structures:
Draw a diagram showing how two related lists are organized in computer memory.
Draw a diagram showing how a table is organized in memory.
Draw a diagram showing how a record is organized in memory.
Explain the purpose of the asterisk when used to declare the size of a string variable (e.g. ...of string (*) ).
Describe how the asterisk (*) assists in moving an array of items to and from a procedure (or function). Explain the purpose of this in a procedure (or a function).
Explain how to use an array to create a frequency distribution.
List some of the advantages of using a record over other types of data structures.
Skills Outcomes
Create an array variable for numbers or strings (for example you might be asked to create an array which is to contain 100 lastNames).
Output the elements stored in an array in reverse order.
Open a file and read information from the file you opened.
Open a file and write information to a file.
Write the necessary program statements to create each of the following data structures in a program:
Move information into each of the following data structures, and be able to display the information found in each of the these data structures:
Create a bubbleSort program which will put information into its correct order (ascending or descending).
Create a type definition for a data structure which is made up of mixed data types.
Detect and correct a variety of common errors when creating structured data types as outlined in the chapter.