Title: Arrays
Course: COP1000: Introduction to Programming > Section: Module Six

Introduction

Generally, arrays are a collection of data items that can be selected by indices computed at run-time. The array typically holds variables of the same type and stores them under one variable name. Each value is accessed by index starting at 0 and running through the length of the array. The first value is located at the 0 index of the array and the last at n-1 of the array.

Multi-dimensional arrays are arrays within arrays and 2D arrays are often referred to as a matrix. Each array location is accessed by a combination of row and column indices. (http://en.wikipedia.org/wiki/Array_data_structure)

Objectives

Upon completion of this module, the student will be able to:

Define the following: "Array" and "multi-dimensional array"
Declare an array and populate it with values
Declare a multi-dimensional array and populate it with values

Readings & Resources

Chapter 17: Graphics and Animation p. 321